From 7505e9bf5b49902d6953e47bcfb630f82c013c7c Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 12 Jul 2013 07:43:47 +0000 Subject: [PATCH] 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 --- OvaleFuture.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 1.7.9.5