View Single Post
10-03-10, 04:39 PM   #21
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
This one actually works for player, party, etc.

Code:
oUF.Tags["threatpercent"] = function(unit)
    local _,_,threatpct,_ ,_ = UnitDetailedThreatSituation(unit, "target")
    if threatpct and UnitExists("target") then
        return floor(threatpct + 0.5)
    else
        return
    end
end
oUF.TagEvents["threatpercent"] = "UNIT_THREAT_SITUATION_UPDATE UNIT_THREAT_LIST_UPDATE PLAYER_TARGET_CHANGED"
Not sure how to make it update more frequently, though. Maybe a tag just isn't the right thing for this after all.
__________________
Rock: "We're sub-standard DPS. Nerf Paper, Scissors are fine."
Paper: "OMG, WTF, Scissors!"
Scissors: "Rock is OP and Paper are QQers. We need PvP buffs."

"neeh the game wont be remembered as the game who made blizz the most money, it will be remembered as the game who had the most QQ'ers that just couldnt quit the game for some reason..."

  Reply With Quote