mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 15:46:56 +00:00
756e8840af
PLAYER_LEAVING_WORLD fires on every loading screen, not just logout, but librange treated it as terminal: it latched librange_isLoggingOut and tore OnUpdate off the frame, neither of which was ever restored. So the first zone (into a BG, dungeon, etc.) permanently killed the distance scan -- unitdata stopped updating and UnitInSpellRange defaulted every unit to in-range until /reload, which the next loading screen then undid. Only PLAYER_LOGOUT is terminal now; PLAYER_LEAVING_WORLD just hides for the loading screen and PLAYER_ENTERING_WORLD re-shows it. Also invalidate on RAID_ROSTER_UPDATE / PARTY_MEMBERS_CHANGED: the range state is cached per unit token, so a roster re-index leaves each unitN mapped to a different player with stale data. Clear the token cache and restart the sweep so shifted/joined slots are re-evaluated within one pass instead of inheriting the previous occupant's range.