cleanup Spell Activation
This commit is contained in:
@@ -2484,40 +2484,6 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local spellActivationSpells = {};
|
||||
local spellActivationSpellsCurrent = {};
|
||||
local spellActivationFrame;
|
||||
local function InitSpellActivation()
|
||||
spellActivationFrame = CreateFrame("FRAME");
|
||||
WeakAuras.frames["Spell Activation"] = spellActivationFrame;
|
||||
spellActivationFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
|
||||
spellActivationFrame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
|
||||
spellActivationFrame:SetScript("OnEvent", function(self, event, spell)
|
||||
WeakAuras.StartProfileSystem("generictrigger");
|
||||
if (spellActivationSpells[spell]) then
|
||||
spellActivationSpellsCurrent[spell] = (event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
|
||||
WeakAuras.ScanEvents("WA_UPDATE_OVERLAY_GLOW", spell);
|
||||
end
|
||||
WeakAuras.StopProfileSystem("generictrigger");
|
||||
end);
|
||||
end
|
||||
|
||||
function WeakAuras.WatchSpellActivation(id)
|
||||
if (not id) then
|
||||
return;
|
||||
end
|
||||
if (not spellActivationFrame) then
|
||||
InitSpellActivation();
|
||||
end
|
||||
spellActivationSpells[id] = true;
|
||||
end
|
||||
|
||||
function WeakAuras.SpellActivationActive(id)
|
||||
return spellActivationSpellsCurrent[id];
|
||||
end
|
||||
end
|
||||
|
||||
local watchUnitChange
|
||||
|
||||
-- Nameplates only distinguish between friends and everyone else
|
||||
|
||||
Reference in New Issue
Block a user