Skip to content

Commit

Permalink
fix latest division by zero from Konsa on discord
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Jun 14, 2024
1 parent 5b32a2f commit b2fa1be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1253,8 +1253,8 @@ end

local currentCombat = Details:GetCurrentCombat()
if (Details.encounter_table.start and not Details.encounter_table["end"] and currentCombat.is_boss) then
local encounterHealth = UnitHealth("boss1") or 0.000001
local encounterMaxHealth = UnitHealthMax("boss1") or 1
local encounterHealth = math.max(UnitHealth("boss1"), 0.000001)
local encounterMaxHealth = math.max(UnitHealthMax("boss1"), 0.000002)
currentCombat.boss_hp = encounterHealth / encounterMaxHealth
end

Expand Down

0 comments on commit b2fa1be

Please sign in to comment.