mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 05:00:02 +00:00
With Nampower as a hard dep, /pfcast for spell names always takes the early CastSpellByName(msg, unit) path. The fallback branch that did the SpellTargetUnit dance (resolve a friendly unit token, disable AutoSelf Cast, call SpellTargetUnit) hasn't been reachable in a while, and it dragged a pile of supporting infrastructure with it. modules/mouseover.lua: - Drop the st_units token list, GetUnitString helper, and the UnitTokenFromGUID rewrite of GetUnitString — all only used by the dead fallback. - Drop the NoSelfCast helper (only the dead fallback called it). - Drop the pfMouseOver frame; its only purpose was to hold a .unit field the dead fallback wrote and libpredict's hook read. - The macro path collapses to: if not the current target, swap target, run the loadstring'd func, restore the previous target. - 99 lines → 34. libs/libpredict.lua: - Drop the dead `local mouseover = pfUI.uf.mouseover.unit` plumbing in the CastSpellByName hook — pfUI.uf.mouseover is gone and the field was permanently nil anyway. The three `target or mouseover or default` fallback chains collapse to `target or default`. Modern mouseover/click-to-cast detection in libpredict goes through pfUI.libpredict_pending_cast (populated by libdebuff from Nampower's SPELL_CAST_EVENT) — that path is GUID-based, server-authoritative, and untouched.