From c7067f91ca11c035902a947111b176fd5559de4a Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 21 May 2019 23:03:10 +0200 Subject: [PATCH] tooltip: add support for MobHealth3 values Thanks @Rumchiller --- modules/tooltip.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/tooltip.lua b/modules/tooltip.lua index 20243b35..641922c4 100644 --- a/modules/tooltip.lua +++ b/modules/tooltip.lua @@ -99,6 +99,18 @@ pfUI:RegisterModule("tooltip", 20400, function () local hp = GameTooltipStatusBar:GetValue() local _, hpm = GameTooltipStatusBar:GetMinMaxValues() + if MobHealthFrame then + local perc = UnitHealth("mouseover") + local name = UnitName("mouseover") or "" + local level = UnitLevel("mouseover") or "" + local index = name .. ":" .. level + local ppp = MobHealth_PPP(index) + if perc and ppp and ppp > 0 then + hp = round(perc * ppp) + hpm = round(100 * ppp) + end + end + if hp and hpm then if hp >= 1000 then hp = round(hp / 1000, 1) .. "k" end if hpm >= 1000 then hpm = round(hpm / 1000, 1) .. "k" end