mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-08 22:50:00 +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:
@@ -86,18 +86,6 @@ pfUI:RegisterModule("turtle-wow", function ()
|
||||
L["debuffs"]['Moonfire'] = {[1]=9.0,[2]=18.0,[3]=18.0,[4]=18.0,[5]=18.0,[6]=18.0,[7]=18.0,[8]=18.0,[9]=18.0,[10]=18.0,[0]=18.0}
|
||||
L["debuffs"]['Deep Wound'] = {[0]=6.0}
|
||||
|
||||
-- turtle wow totemic recall clear totem indicators
|
||||
local _, class = UnitClass("player")
|
||||
if libtotem and class == "SHAMAN" then
|
||||
local trecall = CreateFrame("Frame", "pfTotemsRecall", UIParent)
|
||||
trecall:RegisterEvent("CHAT_MSG_SPELL_SELF_BUFF")
|
||||
trecall:SetScript("OnEvent", function()
|
||||
if arg1 and string.find(arg1, T["You gain (.+) Mana from Totemic Recall"]) then
|
||||
for i = 1, 4 do libtotem:Clean(i) end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local delay = CreateFrame("Frame")
|
||||
delay:SetScript("OnUpdate", function()
|
||||
this:Hide()
|
||||
|
||||
Reference in New Issue
Block a user