From ee2dd1d02e6fc77e1a267db0906088ff86d008d8 Mon Sep 17 00:00:00 2001 From: Tercio Jose Date: Thu, 19 Sep 2024 17:22:14 -0300 Subject: [PATCH] Fixed health bars on Death Recap --- Libs/LibOpenRaid/LibOpenRaid.lua | 2 +- Libs/LibOpenRaid/ThingsToMantain_WarWithin.lua | 1 + boot.lua | 4 ++-- functions/deathrecap.lua | 11 ++++++++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index a843075c1..2d29c9c74 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -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 diff --git a/Libs/LibOpenRaid/ThingsToMantain_WarWithin.lua b/Libs/LibOpenRaid/ThingsToMantain_WarWithin.lua index 40851660a..db49cdfe1 100644 --- a/Libs/LibOpenRaid/ThingsToMantain_WarWithin.lua +++ b/Libs/LibOpenRaid/ThingsToMantain_WarWithin.lua @@ -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}, diff --git a/boot.lua b/boot.lua index bc54ea49e..ed9bcfa24 100644 --- a/boot.lua +++ b/boot.lua @@ -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 diff --git a/functions/deathrecap.lua b/functions/deathrecap.lua index 1bc865b5c..8fb0c5f8b 100644 --- a/functions/deathrecap.lua +++ b/functions/deathrecap.lua @@ -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] @@ -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]