Quantcast

Fix item() condition.

Johnny C. Lam [08-14-12 - 18:14]
Fix item() condition.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@489 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCondition.lua
diff --git a/OvaleCondition.lua b/OvaleCondition.lua
index 3c4cd50..a66f6d8 100644
--- a/OvaleCondition.lua
+++ b/OvaleCondition.lua
@@ -733,8 +733,7 @@ OvaleCondition.conditions=
 		return testbool(IsSpellInRange(spellName,getTarget(condition.target))==1,condition[2])
 	end,
 	item = function(condition)
-		local itemId = element.params[1]
-		local actionCooldownStart, actionCooldownDuration, actionEnable = GetItemCooldown(itemId)
+		local actionCooldownStart, actionCooldownDuration, actionEnable = GetItemCooldown(condition[1])
 		return actionCooldownDuration, actionCooldownStart, -1
 	end,
 	ItemCount = function(condition)