From 8d39a527f3cf3380cf8cca8f751e4ae54d2ac17e Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 30 Nov 2012 03:07:03 +0000 Subject: [PATCH] Add a new SpellInfo() parameter "if_spell=SPELL" Adding "if_spell=SPELL" causes the SpellInfo() line to be ignored if the given SPELL isn't in the player's spellbook, e.g,: Define(mangle 33876) Spellinfo(mangle combo=1 energy=35 inccounter=ripshreds) SpellInfo(mangle critcombo=1 if_spell=primal_fury) Define(primal_fury 16961) This causes the critcombo=1 to apply only if Primal Fury is in the spellbook (druid is at least level 30). git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@648 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCompile.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OvaleCompile.lua b/OvaleCompile.lua index 11ef51c..cbe4ba3 100644 --- a/OvaleCompile.lua +++ b/OvaleCompile.lua @@ -96,6 +96,11 @@ local function TestConditions(paramList) return false end end + if paramList.if_spell then + if not OvaleData.spellList[paramList.if_spell] then + return false + end + end if paramList.talent and not HasTalent(paramList.talent) then return false end -- 1.7.9.5