mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
- user-submitted modification to last user-submitted threat fixes
This commit is contained in:
@ -214,23 +214,14 @@ function IceThreat.prototype:Update(unit)
|
|||||||
|
|
||||||
local isTanking, threatState, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation("player", self.unit)
|
local isTanking, threatState, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation("player", self.unit)
|
||||||
local _, _, _, _, tankThreat = UnitDetailedThreatSituation("targettarget", self.unit) -- highest threat target of target (i.e. the tank)
|
local _, _, _, _, tankThreat = UnitDetailedThreatSituation("targettarget", self.unit) -- highest threat target of target (i.e. the tank)
|
||||||
local scaledPercentZeroToOne, rangeMulti -- for melee and caster range threat values (1.1 or 1.3)
|
local rangeMulti = 1.1
|
||||||
|
local scaledPercentZeroToOne
|
||||||
|
|
||||||
if threatValue and threatValue < 0 then
|
if threatValue and threatValue < 0 then
|
||||||
threatValue = threatValue + 410065408 -- the corrected threat while under MI or Fade
|
threatValue = threatValue + 410065408 -- the corrected threat while under MI or Fade
|
||||||
if isTanking then
|
if isTanking then
|
||||||
tankThreat = threatValue
|
tankThreat = threatValue
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
if not self.combat and (scaledPercent == 0 or rawPercent == 0) then
|
|
||||||
self:Show(false)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not rawPercent then
|
|
||||||
rawPercent = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
if threatValue and tankThreat then -- Corrects rawPercent and scaledPercent while under MI or Fade
|
if threatValue and tankThreat then -- Corrects rawPercent and scaledPercent while under MI or Fade
|
||||||
rawPercent = ((threatValue / tankThreat) * 100)
|
rawPercent = ((threatValue / tankThreat) * 100)
|
||||||
@ -242,6 +233,16 @@ function IceThreat.prototype:Update(unit)
|
|||||||
end
|
end
|
||||||
scaledPercent = ((threatValue / rangeMulti) * 100)
|
scaledPercent = ((threatValue / rangeMulti) * 100)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.combat and (scaledPercent == 0 or rawPercent == 0) then
|
||||||
|
self:Show(false)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not rawPercent then
|
||||||
|
rawPercent = 0
|
||||||
|
end
|
||||||
|
|
||||||
if rawPercent < 0 then
|
if rawPercent < 0 then
|
||||||
rawPercent = 0
|
rawPercent = 0
|
||||||
|
Reference in New Issue
Block a user