While trying to work out why my simple spell overlay addon stopped working reliably I noticed that the eventlog is being spammed by many SPELL_ACTIVATION_OVERLAY_HIDE messages.
The addon in question shows an overlay when you have tidal wave stacks as a Resto Shaman. This addon has been working for a very long time at this point.
The only fixes I needed to make in BFA was to the texturepath id and a move to AuraUtil from the older method .
The issue is the display of the overlay is inconsistent, something is randomly hiding the overlay frame non stop. This is not caused by another addon as the base game seems to be constantly hiding the overlay frame.
Can I make any changes or is this a bug that Blizzard need to fix?
The addon is pasted below.
local f = CreateFrame("Frame")
local spellID = 53390 -- Tidal Waves
local texturePath = 592058
local scale = 1
local r,g,b = 60, 255, 200
local function overlayOn(tidalstacks)
if tidalstacks == 1 then
--print("1 tidal stack")
SpellActivationOverlay_ShowOverlay(SpellActivationOverlayFrame, spellID, texturePath, "LEFT", scale, r, g, b, false, false) -- left on
SpellActivationOverlay_ShowOverlay(SpellActivationOverlayFrame, spellID, "", "RIGHT", scale, 0, 0, 0, false, true) -- right off
elseif tidalstacks == 2 then
--print("2 tidal stacks")
SpellActivationOverlay_ShowOverlay(SpellActivationOverlayFrame, spellID, texturePath, "LEFT", scale, r, g, b, false, false) -- left on
SpellActivationOverlay_ShowOverlay(SpellActivationOverlayFrame, spellID, texturePath, "RIGHT", scale, r, g, b, false, true) -- right on
end
end
local function overlayOff()
SpellActivationOverlay_HideOverlays(SpellActivationOverlayFrame, spellID) -- both off
end
f:SetScript("OnEvent", function(self, event, ...)
local _, _, count = AuraUtil.FindAuraByName("Tidal Waves", "player", "HELPFUL")
if count then
overlayOn(count)
else
overlayOff()
end
end)
f:RegisterUnitEvent("UNIT_AURA", "player")
–
## Title: Tidal Waves
## Interface: 80200
## Author: Me
## Version: 1.0
## Notes: Provides an alert when you have the the Tidal Waves Buff.
TidalWaves.lua