From 288b465b7a30797acbdd0a7a603c5e56da9cafa7 Mon Sep 17 00:00:00 2001 From: Paul Emmerich Date: Wed, 18 Dec 2024 23:29:20 +0100 Subject: [PATCH] AQ Trash: Show trash HP in info frame --- DBM-Raids-Vanilla/AQ40/AQ40Trash.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DBM-Raids-Vanilla/AQ40/AQ40Trash.lua b/DBM-Raids-Vanilla/AQ40/AQ40Trash.lua index f74534ce..d9856c6d 100644 --- a/DBM-Raids-Vanilla/AQ40/AQ40Trash.lua +++ b/DBM-Raids-Vanilla/AQ40/AQ40Trash.lua @@ -462,16 +462,18 @@ local function updateInfoFrame() end table.wipe(lines) table.wipe(sortedLines) - for k, mob in pairs(mobs) do + for guid, mob in pairs(mobs) do + local hp = DBM:GetBossHP(guid) + mob.hp = hp or mob.hp local name = HIGHLIGHT_FONT_COLOR:WrapTextInColorCode(mob.name) if mob.icon > 0 then name = DBM:IconNumToTexture(mob.icon) .. " " .. name end - addLine(name) + addLine(name, mob.hp and ("%d%%"):format(mob.hp)) for _, ability in ipairs(mob.sortedAbilities) do addLine(NORMAL_FONT_COLOR:WrapTextInColorCode((" "):rep(6) .. ability)) end - if next(mobs, k) then + if next(mobs, guid) then addLine(" ") end end