Add 410065408 threat to all players with negative threat for display purposes. English translation: You can now see the "un-Faded/un-MIed threat" of players under the effects of Fade and Mirror Image.
This commit is contained in:
@@ -1292,11 +1292,18 @@ local function updatethreat(unitid, mobunitid)
|
||||
local guid = UnitGUID(unitid)
|
||||
if guid and not threatTable[guid] then
|
||||
local isTanking, state, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation(unitid, mobunitid)
|
||||
-- Threat can be negative due to temporary threat reduction effects such as Fade and Mirror Image (-410057408).
|
||||
-- So we cap the minimum threat to display at 0. We use the special value -1 to indicate nil here.
|
||||
threatTable[guid] = (threatValue and (threatValue >= 0 and threatValue or 0)) or -1
|
||||
if threatValue and threatValue > topthreat then topthreat = threatValue end
|
||||
if isTanking then tankGUID = guid end
|
||||
if threatValue then
|
||||
-- Threat can be negative due to temporary threat reduction effects such as Fade and Mirror Image (-410065408).
|
||||
if threatValue < 0 then
|
||||
threatValue = threatValue + 410065408
|
||||
end
|
||||
if threatValue > topthreat then topthreat = threatValue end
|
||||
if isTanking then tankGUID = guid end
|
||||
threatTable[guid] = threatValue
|
||||
else
|
||||
-- We use the special value -1 to indicate nil here.
|
||||
threatTable[guid] = -1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user