mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-22 07:36:56 +00:00
60f953178f
cache.player and cache.minion were filled from unitstr before the two guards that validate it, so a stale identifier poisoned the cache -- and because the fill is gated on `== nil`, the wrong answer was never recomputed. Players read back as cache.player == false until the plate was hidden and shown again, which only appeared to fix it because pool reuse tripped the name/guid wipe. Two paths produce a stale unitstr: OnUpdate dispatches a targetUpdate to OnDataChanged before it refreshes plate.istarget, and frameState.mouseoverGuid is only updated on gaining mouseover, never on losing it. Hoist the PLAYER_TARGET_CHANGED distrust and the UnitName mismatch check above the cache fill so an unverified unitstr leaves the cache nil for the next tick instead of locking in a wrong answer.