fix problem where UnitClassification would not return worldboss
Sidoine De Wispelaere [10-23-10 - 13:36]
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
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