Thread Tools Display Modes
Prev Previous Post   Next Post Next
06-10-09, 10:46 AM   #1
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Help with a threat function issue please ?

Allright so, here's a small threat function, working just fine but not exactly the way i want it to work.
Code:
caelPanels.UNIT_THREAT_SITUATION_UPDATE = function(self)
	local status = UnitThreatSituation("player", "target")
	for i = 1, 7 do
		local panel = panels[i]
		if panel then
			if (status and status > 0) then
				local r, g, b = GetThreatStatusColor(status)
				panel:SetBackdropBorderColor(r, g, b)
			else
				panel:SetBackdropBorderColor(0, 0, 0)
			end
		end
	end
end
As you can see local status = UnitThreatSituation("player", "target")

It will only show my threat toward my current target, but my goal was to have it change color if i have aggro from any mob, not just my target, let's take a quick example, i target a mob in a pack of 10 and start using Volley, and get aggro from one of the mob but not the one i'm targetting...

I've tried to do local status = UnitThreatSituation("player", unit) but that doesn't seems to work.

Any idea ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » Help with a threat function issue please ?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off