From 65370b5c084f8a3df2f8a0d996d91bee4315fc65 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sat, 20 Jul 2013 08:46:11 +0000 Subject: [PATCH] Fix ticket 88 - Threat does not work? Default to checking threat against the current target and fix the documentation to note that the Threat() condition can take a target parameter. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@985 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCondition.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OvaleCondition.lua b/OvaleCondition.lua index 1c8f7f8..3f17bfd 100644 --- a/OvaleCondition.lua +++ b/OvaleCondition.lua @@ -3176,6 +3176,9 @@ end -- @paramsig number or boolean -- @param operator Optional. Comparison operator: equal, less, more. -- @param number Optional. The number to compare against. +-- @param target Optional. Sets the target to check. The target may also be given as a prefix to the condition. +-- Defaults to target=target. +-- Valid values: player, target, focus, pet. -- @return The amount of threat. -- @return A boolean value for the result of the comparison. -- @usage @@ -3183,7 +3186,7 @@ end -- if Threat(more 90) Spell(fade) OvaleCondition.conditions.threat = function(condition) - local isTanking, status, threatpct = API_UnitDetailedThreatSituation("player", GetTarget(condition)) + local isTanking, status, threatpct = API_UnitDetailedThreatSituation("player", GetTarget(condition, "target")) return Compare(threatpct, condition[1], condition[2]) end -- 1.7.9.5