| 08-05-2009, 01:37 PM | #1 |
Okay, I've been testing the new natives a bit and comparing them to GetSpellTargetLoc results. They seem to be consistent, but I did notice some general spell casting quirks. In general, when it comes to point target spells, both XY and Loc give the same results, no surprise there. In the case of unit target spells, both XY and Loc return the position of the unit. I'm assuming it's the same for destructable and item target spells, haven't tested it yet though. With no-target spells such as morph and summon spells, Loc returns null while XY returns 0.0. There is one peculiar exception, though, Thunder Clap. It's a no-target spell, but GetSpellTargetUnit() return the caster instead of null. Also, Loc does not return null, however the coordinates of the location returned do not match the "target" unit, but are 0.0 instead. XY also returns 0.0. I haven't tested yet if this is also true for other non-summon, non-morph no-target spells like War Stomp and Thunder Clap. Also haven't tested channel-based spells yet. Edit: tested Fan of Knives, works the same as Thunder Clap. Ressurection also behaves like this. Starfall and Tranquility work like summon or morph spells, though. Also, casting summon treants on an area without trees still runs the channel event for the caster before the casting is canceled, but not any other spell events. |
| 08-05-2009, 01:48 PM | #2 |
That's . . . strange. I'll do a bit of testing myself. |
| 08-10-2009, 09:08 PM | #3 |
Channel that is set as a no-target spell behaves the same as thunder clap/fan of knives. |
