Skip to content

Commit

Permalink
Fixed health bars on Death Recap
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Sep 19, 2024
1 parent 71f98f4 commit ee2dd1d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Libs/LibOpenRaid/LibOpenRaid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ end

local major = "LibOpenRaid-1.0"

local CONST_LIB_VERSION = 141
local CONST_LIB_VERSION = 142

if (LIB_OPEN_RAID_MAX_VERSION) then
if (CONST_LIB_VERSION <= LIB_OPEN_RAID_MAX_VERSION) then
Expand Down
1 change: 1 addition & 0 deletions Libs/LibOpenRaid/ThingsToMantain_WarWithin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@ do
[370564] = 370537, -- Evoker Stasis
--[414658] = 45438, -- Ice Block with the talent Ice Cold
--[414658] = 45438, -- Ice Block with the talent IceCold
[406971] = 372048, -- Oppressing Roar, when talented
}
LIB_OPEN_RAID_MULTI_OVERRIDE_SPELLS = {
[106898] = {106898,77764,77761},
Expand Down
4 changes: 2 additions & 2 deletions boot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
local addonName, Details222 = ...
local version, build, date, tvs = GetBuildInfo()

Details.build_counter = 13070
Details.alpha_build_counter = 13070 --if this is higher than the regular counter, use it instead
Details.build_counter = 13072
Details.alpha_build_counter = 13072 --if this is higher than the regular counter, use it instead
Details.dont_open_news = true
Details.game_version = version
Details.userversion = version .. " " .. Details.build_counter
Expand Down
11 changes: 8 additions & 3 deletions functions/deathrecap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,12 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
local event = events [i]

local evType = event [1]
local hp = min (floor(event [5] / maxHP * 100), 100)

local healthPercent = floor(event[5] * 100)
if (healthPercent > 100) then
healthPercent = 100
end

local spellName, _, spellIcon = Details.GetSpellInfo(event [2])
local amount = event [3]
local eventTime = event [4]
Expand Down Expand Up @@ -563,8 +568,8 @@ function Details.OpenDetailsDeathRecap (segment, RecapID, fromChat)
line.amount:SetText("-" .. floor(amount))
end

line.lifePercent:SetText(hp .. "%")
line.lifeStatusBar:SetWidth(line:GetWidth() * (hp/100))
line.lifePercent:SetText(healthPercent .. "%")
line.lifeStatusBar:SetWidth(line:GetWidth() * (healthPercent/100))

line.spellid = event [2]

Expand Down

0 comments on commit ee2dd1d

Please sign in to comment.