nameplates: add support for mobhealth2

This commit is contained in:
shagu
2021-12-10 15:02:23 +01:00
parent 18a4faeeec
commit 8c61f1fbbb
+3 -1
View File
@@ -488,8 +488,10 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
-- remove unitstr on unit name mismatch
if unitstr and UnitName(unitstr) ~= name then unitstr = nil end
-- use mobhealth values if addon is running
if (MobHealth3 or MobHealthFrame) and target and name == UnitName('target') and MobHealth_GetTargetCurHP() then
hp, hpmax = MobHealth_GetTargetCurHP(), MobHealth_GetTargetMaxHP()
hp = MobHealth_GetTargetCurHP() > 0 and MobHealth_GetTargetCurHP() or hp
hpmax = MobHealth_GetTargetMaxHP() > 0 and MobHealth_GetTargetMaxHP() or hpmax
end
-- always make sure to keep plate visible