mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-01 08:26:57 +00:00
Every unit frame re-checked its range fade, offline state, combat and aggro glow and indicator icons on a 0.2-0.5s tick, and infight polled aggro every 0.3s. Each now comes from an event. Aggro: the 270-token scan and its cache are gone. UNIT_TARGET fires for every unit in view (SuperWoW registers them all), so a table of which hostile unit attacks which friendly one, by GUID, follows every attacker, including ones no token reaches. A unit that comes into view mid-fight is noted when a token first reaches it (target, focus, mouseover, a nameplate, a member's target). A read drops attackers that left view, where nothing fires, and a loading screen resets the table. Changes go out as "aggro:changed" with the old and the new victim, so only the frames showing those redraw; infight listens too. Combat square and glow follow UNIT_FLAGS. Range fade follows ClassicAPI's UNIT_IN_RANGE_UPDATE, registered only by frames that fade, by GUID for a chained unit; with the 40y check off, frames fade by sight through UNIT_DISTANCE_CHECK_UPDATE, which also swaps a portrait's question mark for the model. A UnitXP threshold has no event and keeps its poll. UNIT_CONNECTION refreshes a member who goes offline or comes back; the PARTY_MEMBER_ENABLE/DISABLE branches were never registered. A full refresh now draws the indicator icons and combat state, so a new unit brings its own. UNIT_FACTION redraws the PvP icon and reaction colour; its "pvp" refresh step drew nothing. Unlock mode and /pftest re-apply the fade on entry and exit. What stays on the tick: the pet frames and the UnitXP range check.