Quantcast

Add list=<name> parameter to SpellInfo to add/create to the spell list.

Johnny C. Lam [07-05-13 - 07:02]
Add list=<name> parameter to SpellInfo to add/create to the spell list.

This is an alternative way to create a spell list via SpellInfo as opposed
to listing them all directly in SpellList, i.e, these are equivalent:

    Define(buff1 12345)
      SpellInfo(buff1 list=trinket_proc_intellect)
    Define(buff2 54321)
      SpellInfo(buff2 list=trinket_proc_intellect)

and

    Define(buff1 12345)
    Define(buff2 54321)
    SpellList(trinket_proc_intellect buff1 buff2)

This makes it easier to incrementally append to a spell list definition.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@934 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCompile.lua
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index 610b4d6..8d93078 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -329,6 +329,12 @@ local function ParseSpellInfo(params)
 				spellInfo.duration = spellInfo.duration + v
 			elseif k == "addcd" then
 				spellInfo.cd = spellInfo.cd + v
+			elseif k == "list" then
+				-- Add this buff to the named spell list.
+				if not OvaleData.buffSpellList[v] then
+					OvaleData.buffSpellList[v] = {}
+				end
+				OvaleData.buffSpellList[v][spellId] = true
 			else
 				spellInfo[k] = v
 			end