From 319da663c652da0fa6c38a128395a2a24927a392 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Tue, 18 Sep 2012 03:07:38 +0000 Subject: [PATCH] Add IsAggroed() function. TargetIsAggroed() can be used to check if the target's primary target is the player, regardless of if the target is momentarily targeting another toon. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@529 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCondition.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OvaleCondition.lua b/OvaleCondition.lua index 95f3e0b..57d1fdf 100644 --- a/OvaleCondition.lua +++ b/OvaleCondition.lua @@ -817,6 +817,11 @@ OvaleCondition.conditions= itemcharges = function(condition) return compare(GetItemCount(condition[1], false, true), condition[2], condition[3]) end, + -- Check if the target is aggroed to the player + -- returns: bool + isaggroed = function(condition) + return testbool(UnitDetailedThreatSituation("player", getTarget(condition.target)), condition[1]) + end, -- Check if the player is feared -- returns: bool isfeared = function(condition) -- 1.7.9.5