Thread Tools Display Modes
11-14-10, 01:56 PM   #1
vlakarados
An Aku'mai Servant
 
vlakarados's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 36
oUF threat

Could you add some conditional where threat will be updated by UNIT_THREAT_LIST_UPDATE, instead of that UNIT_THREAT_SITUATION_UPDATE ? Like Threat.FrequentUpdates?

_SITUATION_ is nice to use with raid frames as you see when someone gets aggro or loses, but for a players threat meter it's not enough.
Thank you.
  Reply With Quote
11-14-10, 03:07 PM   #2
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
Originally Posted by vlakarados View Post
Could you add some conditional where threat will be updated by UNIT_THREAT_LIST_UPDATE, instead of that UNIT_THREAT_SITUATION_UPDATE ? Like Threat.FrequentUpdates?

_SITUATION_ is nice to use with raid frames as you see when someone gets aggro or loses, but for a players threat meter it's not enough.
Thank you.
I use this..

Code:
local function UpdateThreat(self, _, unit)
	if (self.unit ~= unit) then 
        return 
    end

    if (self.Aggro) then
        local threat = UnitThreatSituation(self.unit)
        if (threat == 3) then
            self.Aggro:SetText('|cFFFF0000AGGRO')
            self.Health:SetBackdropColor(0.9, 0, 0) 
        else
            self.Aggro:SetText('')
            self.Health:SetBackdropColor(0, 0, 0) 
        end
    end
end

Code:
    self.Aggro = self.Health:CreateFontString(nil, 'OVERLAY')
    self.Aggro:SetPoint('CENTER', self.Health, 'BOTTOM')
    self.Aggro:SetFont(font, 11, 'THINOUTLINE')
	
    table.insert(self.__elements, UpdateThreat)
    self:RegisterEvent('PLAYER_TARGET_CHANGED', UpdateThreat)
    self:RegisterEvent('UNIT_THREAT_LIST_UPDATE', UpdateThreat)
    self:RegisterEvent('UNIT_THREAT_SITUATION_UPDATE', UpdateThreat)
  Reply With Quote
11-14-10, 04:21 PM   #3
vlakarados
An Aku'mai Servant
 
vlakarados's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 36
thanks for the tip, I use Health.PostUpdate and oUF_playerframename.Threat:ForceUpdate() to do it, actually it updates really sweet, but maybe it's too much for cpu..
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF threat


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