benilla-re systems structs docs

s_playerHasControl

global · ui

Address
0xb4b3e4 · 4 bytes, up to 0xb4b3e7
Type
uint32_t
Meaning
Holds 1 while the player controls the character; 0 at load, written by 0x4958e0 and two stores of 1
Confidence
verified, proof one
Finding
spell/checks#lost-control-exemption

Finding: Lost control exemption in spell: checks

While the control flag 0xb4b3e4 is zero, gate 2 of 0x6e3d60 passes only when a scan exempts the spell: UNIT_FIELD_FLAGS & 0x800000 with 0x6e9f20, & 0x400000 with 0x6e9f40, or a nonzero UNIT_FIELD_CHARMEDBY with 0x6e9f60 (Crowd-control aura scans). With none, every spell greys for as long as control is lost. The flag is zero at load. 0x4958e0 stores its argument and signals PLAYER_CONTROL_GAINED (197) for nonzero or PLAYER_CONTROL_LOST (196) for zero, both without arguments, then tail-jumps to the button refresh 0x4b31c0; two other stores write 1.

The derivation is in the doc.