From 8c91d75f8915ba13b185efce373ce252bf77c2f4 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Tue, 3 Feb 2009 21:01:49 +0000 Subject: [PATCH] - bug fix for HasShield git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@17 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 4 ++++ Ovale.toc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Condition.lua b/Condition.lua index 96e93e9..ef0da9e 100644 --- a/Condition.lua +++ b/Condition.lua @@ -140,6 +140,10 @@ Ovale.conditions= end, HasShield = function(condition) local _,_,id = string.find(GetInventoryItemLink("player",GetInventorySlotInfo("SecondaryHandSlot")) or "","(item:%d+:%d+:%d+:%d+)") + if (not id) then + return nil + end + local _,_,_,_,_,_,_,_,itemLoc = GetItemInfo(id) if (itemLoc=="INVTYPE_SHIELD") then return 0 diff --git a/Ovale.toc b/Ovale.toc index f33cc25..48614f5 100644 --- a/Ovale.toc +++ b/Ovale.toc @@ -3,7 +3,7 @@ ## Notes: Show the icon of the next spell to cast ## Notes-frFR: Affiche l'icône du prochain sort à lancer ## Author: Sidoine -## Version: 3.0.2 +## Version: 3.0.3 ## OptionalDeps: Ace3 ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC -- 1.7.9.5