Quantcast

Move spellInfo damageAura into a sub-table of the existing aura table.

Johnny C. Lam [04-06-14 - 18:47]
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
Filename
OvaleCompile.lua
OvaleData.lua
OvaleFuture.lua
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