From 349d0d68ae1068d89f6a4cf267b59cd8ac73a728 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Wed, 14 May 2014 00:37:14 +0000 Subject: [PATCH] Check that an item meets usability requirements by calling IsUsableItem(). This fixes ticket 314 where Ovale was still suggesting using Synapse Springs on gloves even after Engineering was dropped as a profession. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1436 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBestAction.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index fac8f31..5542521 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -55,6 +55,7 @@ local API_IsCurrentAction = IsCurrentAction local API_IsItemInRange = IsItemInRange local API_IsSpellInRange = IsSpellInRange local API_IsUsableAction = IsUsableAction +local API_IsUsableItem = IsUsableItem local OVALE_DEFAULT_PRIORITY = 3 @@ -834,7 +835,7 @@ function OvaleBestAction:GetActionInfo(element, state) actionCooldownStart, actionCooldownDuration, actionEnable = API_GetItemCooldown(itemId) local spellName = API_GetItemSpell(itemId) - actionUsable = (spellName ~= nil) + actionUsable = spellName and API_IsUsableItem(action) actionType = "item" actionId = itemId -- 1.7.9.5