s_spellTargetFlags
global · spell
- Address
0xcecac0· 2 bytes, up to0xcecac1- Type
uint16_t- Meaning
- Holds the flag word of target kinds the pending spell still needs; 0 at load
- Confidence
- verified, proof one
- Finding
- spell/targeting#the-flag-word
Finding: The flag word in spell: targeting
The word 0xcecac0 holds the target kinds the pending spell still needs; targeting is on while
it is nonzero. A bind tries the bits below in a fixed order; the first arm that binds clears its own bits and ORs
the bound kind into the 16-bit target mask at +0x14 of the pending cast record 0xceac48,
storing the target at +0x18 (an object), +0x20 (an item), +0x30 or +0x3c (a position, three
floats). Bit 0x1 is never tested; 0x1000 occurs only in the mask; 0x2000 is bound by 0x6e5250 from a
pending name (cast), and otherwise read only by unreached code.
| bit | binds | mask bit, slot |
|---|---|---|
| 0x2 | a unit without unit-flag 0x100 | 0x2, +0x18 |
| 0x4 | a unit passing 0x606d20 and 0x6066f0 | 0x2, +0x18 |
| 0x8 | a unit passing 0x606c20 and 0x6066f0 | 0x2, +0x18 |
| 0x10 | an item, or trade slot 6 | 0x10 or 0x1000, +0x20 |
| 0x20 | a position, first | 0x20, +0x30 |
| 0x40 | a position, when 0x20 is clear | 0x40, +0x3c |
| 0x80 | a unit passing 0x606980 | 0x2, +0x18 |
| 0x100 | a unit passing 0x6066f0 | 0x2, +0x18 |
| 0x200 | a dead player failing 0x6066f0; a corpse failing 0x6067d0 | 0x2 or 0x200, +0x18 |
| 0x400 | nothing: refuses a live unit; cleared by a dead unit's 0x2, 0x4, 0x8, 0x80 or 0x100 bind | none |
| 0x800, 0x4000 | a game object (either bit); 0x4000 also an item or trade slot 6 | 0x800, +0x18 |
| 0x8000 | a dead player, or dead unit with +0x214 set, passing 0x6066f0; a corpse passing 0x6067d0 | 0x2 or 0x8000, +0x18 |
The derivation is in the doc.