mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
UNIT_IN_RANGE_UPDATE (unitTarget, isInRange). Nothing in the client reacts to a distance: the player moves every frame while it moves, and other units in view are moved a little each frame between their movement packets. So a world-tick pass checks the units, only while a frame is registered for the event. The pass walks the event's subscriber chain (Event::Custom::ForEachListener, which FireValues now uses too): a frame registered with RegisterUnitEvent adds its units (Frame::UnitEvent::Units), and a plain registration adds pet and each party and raid member and their pets. A token fires when Unit::Range::InRange changes for it. UnitInRange now calls the same function. A filter unit that is not a unit token is dropped after one protected IsUnitToken check, since the engine's resolver raises a Lua error for it. UNIT_DISTANCE_CHECK_UPDATE (unitTarget, isInDistance) is true while the client holds a group member's object. UpdateRaidMemberRecord (0x004BADC0) has four E8 callers, which are exactly a player object entering the object table (CGPlayer_C::PostInit 0x005DEC43, PostUpdate on reactivation 0x005DECAF) and leaving it (the release slot 0x005E9ACF, ~CGPlayer_C 0x005DD6AB for an object never released). The calls point at a site that notes a party or raid member's GUID (IsRaidMemberOrPet, not the active player), and the next world tick fires for each of its tokens with whether the object table holds it then. The release slot runs before the manager moves the object to the released table, so a fire in place would still show the member to UnitIsVisible. No loaded DLL references the function or the sites.