mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-02 08:56:57 +00:00
The module polled: a central OnUpdate at 100 Hz over every visible plate, a full OnDataChanged refresh of each plate every 0.5 s, and per-tick reads of the engine's name/level regions, frame size, mouse state and SpellIsTargeting. ClassicAPI feeds every unit event to the nameplateN tokens, so none of that is needed. Each bound plate now registers its unit events on its own frame against its token (UNIT_HEALTH/MAXHEALTH, UNIT_AURA_DELTA, UNIT_FLAGS, UNIT_DYNAMIC_FLAGS, UNIT_FACTION, UNIT_LEVEL, UNIT_CLASSIFICATION_CHANGED, UNIT_NAME_UPDATE, UNIT_TARGET, the casts) and each handler updates only what that event can change; the module-level events (target, combat, level-up, roster, guild, spell targeting) fan out to the plates they concern. Health comes from UnitHealth on the token instead of the engine bar's OnValueChanged hook; name, level and difficulty colour from UnitName/UnitLevel/GetDifficultyColor instead of the blanked engine regions (UnitLevel's -1 is exactly the engine's skull case, so "??B" survives). The engine resets the plate's size at every bind, so the engine frame's size and click routing are re-applied from its OnShow instead of being checked every tick; the overlay steps aside for ground-target spells on CURRENT_SPELL_CAST_CHANGED. The only OnUpdate left is a driver frame, shown while a castbar sweeps or the target zoom animates and hidden when both sets are empty; the zoom is time-based now rather than per-tick multiplication. The nameplates/nameplates_target/nameplates_mass throttle categories no longer mean anything and are gone from libthrottle and the GUI; nameplates_castbar stays as the sweep rate of non-target castbars. Mouseover tracking is gone (the token already names the unit), and libhealth's "known" return now decides whether absolute health is shown, so a unit whose health is only known as a percentage no longer prints "57 | 57%".