From 51cee935e6445dc839eb4f90bfb23d3f67313da2 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sun, 6 Apr 2014 18:47:48 +0000 Subject: [PATCH] Move spellInfo damageAura into a sub-table of the existing aura table. This is a code-consistency change. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1284 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCompile.lua | 4 ++-- OvaleData.lua | 4 ++-- OvaleFuture.lua | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/OvaleCompile.lua b/OvaleCompile.lua index 9e23059..93b784b 100644 --- a/OvaleCompile.lua +++ b/OvaleCompile.lua @@ -345,14 +345,14 @@ local function ParseSpellDamageBuff(params) local paramList = ParseParameters(params) local spellId = paramList[1] local si = OvaleData:SpellInfo(spellId) - return ParseSpellAuraList(si.damageAura, "HELPFUL", paramList) + return ParseSpellAuraList(si.aura.damage, "HELPFUL", paramList) end local function ParseSpellDamageDebuff(params) local paramList = ParseParameters(params) local spellId = paramList[1] local si = OvaleData:SpellInfo(spellId) - return ParseSpellAuraList(si.damageAura, "HARMFUL", paramList) + return ParseSpellAuraList(si.aura.damage, "HARMFUL", paramList) end local function ParseSpellInfo(params) diff --git a/OvaleData.lua b/OvaleData.lua index 0a35b85..98f2f50 100644 --- a/OvaleData.lua +++ b/OvaleData.lua @@ -269,9 +269,9 @@ function OvaleData:SpellInfo(spellId) player = {}, -- Auras applied by this spell on its target. target = {}, + -- Auras granting extra damage multipliers for this spell. + damage = {}, }, - -- Auras granting extra damage multipliers for this spell. - damageAura = {}, } self.spellInfo[spellId] = si end diff --git a/OvaleFuture.lua b/OvaleFuture.lua index 3629db6..01b6f05 100644 --- a/OvaleFuture.lua +++ b/OvaleFuture.lua @@ -115,8 +115,8 @@ local function GetDamageMultiplier(spellId, auraObject) auraObject = auraObject or OvaleAura local damageMultiplier = 1 local si = OvaleData.spellInfo[spellId] - if si and si.damageAura then - for filter, auraList in pairs(si.damageAura) do + if si and si.aura and si.aura.damage then + for filter, auraList in pairs(si.aura.damage) do for auraId, multiplier in pairs(auraList) do local aura = auraObject:GetAura("player", auraId, filter) if auraObject:IsActiveAura(aura) then -- 1.7.9.5