I would say this is about
Lua Code:
if C["duffed"].spellannounce ~= true then return end
C["duffed"].spellannounce is there on reload but not on login.
Move this into the OnEvent function and trigger it on PLAYER_ENTERING_WORLD:
Lua Code:
local D, C, L = unpack(select(2, ...))
if C["duffed"].spellannounce ~= true then return end
D.Spells = {
-- Death Knight
[48792] = true, -- Icebound Fortitude
[48707] = true, -- Anti-Magic-Shell
[55233] = true, -- Vampric Blood
[61999] = true, -- Raise Ally
[113072] = true, -- Symbiosis (Might of Ursoc)
-- Druid
[61336] = true, -- Survival Insticts
[106922] = true, -- Might of Ursoc
-- Monk
[115203] = true, -- Fortifying Brew
[115213] = true, -- Avert Harm
[113306] = true, -- Symbiosis (Survival Insticts)
-- Paladin
[498] = true, -- Divine Protection
[642] = true, -- Divine Shield
[31850] = true, -- Ardent Defender
[113075] = true, -- Symbiosis (Barkskin)
-- Priest
[33206] = true, -- Pain Supression
[47788] = true, -- Guardian Spirit
[62618] = true, -- PW: Barrier
[109964] = true, -- Spirit Shell
-- Shaman
[16190] = true, -- Mana Tide Totem
[98008] = true, -- Spirit Link Totem
[108280] = true, -- Healing Tide Totem
[120668] = true, -- Stormlash Totem
-- Warlock
[20707] = true, -- Soulstone
-- Warrior
[871] = true, -- Shield Wall
[12975] = true, -- Last Stand
[97462] = true, -- Rallying Cry
[114192] = true, -- Mocking Banner
[114203] = true, -- Demoralizing Banner
[114207] = true, -- Skull Banner
[122286] = true, -- Symbiosis (Savage Defense)
}
Do the same with this part:
Lua Code:
D.Delay = function(delay, func, ...)
if(type(delay) ~= "number" or type(func) ~= "function") then
return false
end
if(waitFrame == nil) then
waitFrame = CreateFrame("Frame","WaitFrame", UIParent)
waitFrame:SetScript("onUpdate",function (self, elapse)
local count = #waitTable
local i = 1
while(i <= count) do
local waitRecord = tremove(waitTable, i)
local d = tremove(waitRecord, 1)
local f = tremove(waitRecord, 1)
local p = tremove(waitRecord, 1)
if(d>elapse) then
tinsert(waitTable, i, {d - elapse, f, p})
i = i + 1
else
count = count - 1
f(unpack(p))
end
end
end)
end
tinsert(waitTable, {delay,func,{...}})
return true
end