From bc6c9afaaeb1cfb87e9fd51a6bf54144dd2c7b99 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sat, 23 Oct 2010 13:36:44 +0000 Subject: [PATCH] fix problem where UnitClassification would not return worldboss git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@318 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Condition.lua b/Condition.lua index b3616ff..1db023c 100644 --- a/Condition.lua +++ b/Condition.lua @@ -757,13 +757,18 @@ Ovale.conditions= -- Test the target classification -- 1 : normal, elite, or worldboss TargetClassification = function(condition) - local classification = UnitClassification("target"); - if (classification == "rareelite") then - classification = "elite" - elseif (classification == "rare") then - classification = "normal" + local classification + if UnitLevel("target")==-1 then + classification = "worldboss" + else + classification = UnitClassification("target"); + if (classification == "rareelite") then + classification = "elite" + elseif (classification == "rare") then + classification = "normal" + end end - + if (condition[1]==classification) then return 0 else -- 1.7.9.5