mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-30 11:10:00 +00:00
drop MobHealth3 / MobHealthFrame fallbacks
libhealth ships with pfUI and Nampower's GetUnitField (hard-dep) covers the real-HP read; the MobHealth integration was a chained last-resort fallback that could never actually win, and on the nameplate path it also mixed percentage and real-value scales into the bar's SetMinMaxValues since it overwrote hp/hpmax without hpmin.
This commit is contained in:
@@ -2838,8 +2838,6 @@ function pfUI.uf:GetStatusValue(unit, pos)
|
||||
-- Use libhealth for mob health estimation (overrides Nampower/Standard)
|
||||
if pfUI.libhealth and pfUI.libhealth.enabled then
|
||||
rhp, rhpmax = pfUI.libhealth:GetUnitHealth(unitstr)
|
||||
elseif unit.label == "target" and (MobHealth3 or MobHealthFrame) and MobHealth_GetTargetCurHP() then
|
||||
rhp, rhpmax = MobHealth_GetTargetCurHP(), MobHealth_GetTargetMaxHP()
|
||||
end
|
||||
|
||||
if config == "unit" then
|
||||
|
||||
@@ -992,12 +992,6 @@ end
|
||||
-- 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 = 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
|
||||
plate:Show()
|
||||
|
||||
|
||||
@@ -146,14 +146,6 @@ pfUI:RegisterModule("tooltip", function ()
|
||||
rhp, rhpmax = hp, hpmax
|
||||
elseif pfUI.libhealth and pfUI.libhealth.enabled then
|
||||
rhp, rhpmax, estimated = pfUI.libhealth:GetUnitHealthByName(this.name, this.level, tonumber(hp), tonumber(hpmax))
|
||||
elseif MobHealthFrame then
|
||||
local index = (this.name or "") .. ":" .. (this.level or "")
|
||||
local ppp = MobHealth_PPP(index)
|
||||
if perc and ppp and ppp > 0 and not UnitIsUnit("mouseover", "pet") then
|
||||
rhp = round(hp * ppp)
|
||||
rhpmax = round(100 * ppp)
|
||||
estimated = true
|
||||
end
|
||||
end
|
||||
|
||||
if C.tooltip.alwaysperc == "0" and ( estimated or hpmax > 100 or round(hpmax/100*hp) ~= hp ) then
|
||||
|
||||
Reference in New Issue
Block a user