Fix ticket 252 - LastSpellSpellPower not working
Johnny C. Lam [07-12-13 - 07:43]
Fix ticket 252 - LastSpellSpellPower not working
This was a code logic error: the broken code only updated the information
if the previous information existed, so it never saved any information as
a result.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@956 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleFuture.lua b/OvaleFuture.lua
index a325ad1..f36971f 100644
--- a/OvaleFuture.lua
+++ b/OvaleFuture.lua
@@ -178,15 +178,16 @@ end
local function UpdateLastSpellInfo(spellcast)
if spellcast then
local targetGUID = spellcast.target
- if targetGUID then
+ local spellId = spellcast.spellId
+ if targetGUID and spellId then
if not self_lastSpellcast[targetGUID] then
self_lastSpellcast[targetGUID] = {}
end
local oldSpellcast = self_lastSpellcast[targetGUID][spellId]
if oldSpellcast then
- self_lastSpellcast[targetGUID][spellId] = spellcast
self_pool:Release(oldSpellcast)
end
+ self_lastSpellcast[targetGUID][spellId] = spellcast
end
end
end