BindSpellTargetObject
function · spell · primitive
- Address
0x6e5b40· 1445 bytes, up to0x6e60e4- Signature
uint8_t __thiscall (void *this)- Meaning
- Binds a clicked object to the flag word, range-tests a unit or corpse, and sends the cast when the word empties
- Confidence
- verified, proof one
- Finding
- spell/targeting#binding-a-clicked-object
Finding: Binding a clicked object in spell: targeting
0x6e5b40 binds the object in ecx to the flag word and returns 1 when it bound. Each exit
below returns 0 with no write and no message, in this order; the unit arms then run in the order
0x8, 0x4, 0x100, 0x80, 0x2, 0x8000, 0x200, and the first to bind wins. Items, game objects and
corpses take the arms of the flag word's table; a corpse is tried for 0x8000 and then 0x200, each
requiring corpse flag 0x1 clear. A miss of every arm is silent too.
| exit | when |
|---|---|
0x6e5b5e, 0x6e5b67 | the object is null; the word is 0 |
0x6e5b93 | the caster guid at +0x08 resolves to no unit |
0x6e5ba5 | 0x494a50(2) returns 0 |
0x6e5bd2 | the spell id at +0x10 has no record |
0x6e5bf7 | the object is the caster and AttributesEx has 0x80000 |
0x6e5c1d | a unit with unit-flag 0x10000 |
0x6e5c53 | a unit outside a nonzero TargetCreatureType mask |
0x6e5c8b | a dead unit (health ≤ 0) with dynamic flag 0x20 clear, no 0x8600 in the word, AttributesEx2 bit 0 clear |
0x6e5ca2 | a live unit while the word has 0x400 |
The derivation is in the doc.
Callers 7
- Script::ReplaceEnchant ui
- CGGameUI::SelectTarget ui
- ValidateSpellItemTarget ui
- BaseHandlerUse objectlayer
- ArmCastTargets spell
- BindTargetByGuid spell
- CastFeedPetOnItem spell
Callees 12
- ClntObjMgrObjectPtr objectlayer
- CheckActivePlayer ui
- SignalCurrentSpellCastChanged ui
- GetUnitCreatureType objectlayer
- CGUnit_C::CanAssist_Unit objectlayer
- CGUnit_C::CanAssist_Corpse objectlayer
- CGUnit_C::CanAttack objectlayer
- IsInSamePartyAs objectlayer
- IsInSameRaidAs objectlayer
- ReportCastFailure spell
- IsTargetInSpellRange spell
- SendCast spell
Calls and jumps by a bare address, from tables/calls.tsv.