mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-10 23:50:01 +00:00
Replace libtotem with ClassicAPI's native totem tracker
ClassicAPI now ships GetTotemInfo/GetTotemTimeLeft/GetTotemDuration/ TargetTotem plus a native PLAYER_TOTEM_UPDATE event, backed by a data-driven tracker (slot from the Spell.dbc summon effect, duration from SpellDuration.dbc, and object-manager death detection). That's exactly what libtotem hand-rolled -- and better -- so delete the library outright: its spellid/icon tables, the CastSpellByName/CastSpell/UseAction hooks, the SPELL_GO commit path, and the active-totem bookkeeping. modules/totems.lua becomes a thin consumer of the native API: - Driven by PLAYER_TOTEM_UPDATE; drop the shaman tick-poller that only existed because vanilla had no totem event. - Fix the GetTotemInfo call sites: the native 1st return is tool presence, not "summoned", so key active state on name/start instead. - Right-click a totem icon to TargetTotem it; tooltip shows remaining time via GetTotemTimeLeft. modules/turtle-wow.lua: drop the Totemic Recall handler that poked libtotem:Clean() -- the native tracker detects the totems despawning and clears the slots itself. Also clean up the now-orphaned translation string and a stale libtotem mention in libdebuff's comment.
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ setfenv(1, pfUI:GetEnvironment())
|
||||
-- non-player expirationTime). What remains in libdebuff is the cast-event
|
||||
-- bookkeeping consumed by GetBestAuraCast (libpredict HoT tracking) and the
|
||||
-- libdebuff_*_hooks broadcast surface (subscribers in actionbar / swingtimer
|
||||
-- / libtotem react to SPELL_GO and SPELL_FAILED).
|
||||
-- react to SPELL_GO and SPELL_FAILED).
|
||||
|
||||
-- return instantly when another libdebuff is already active
|
||||
if pfUI.api.libdebuff then return end
|
||||
|
||||
Reference in New Issue
Block a user