nameplates: check for unitstr mismatches

This commit is contained in:
shagu
2020-05-21 12:00:49 +02:00
parent 90fdddb1f1
commit 83f99e6f88
+3
View File
@@ -431,6 +431,9 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
-- yet updated. So while being inside this event, we cannot trust the unitstr.
if event == "PLAYER_TARGET_CHANGED" then unitstr = nil end
-- remove unitstr on unit name mismatch
if unitstr and UnitName(unitstr) ~= name then unitstr = nil end
if (MobHealth3 or MobHealthFrame) and target and name == UnitName('target') and MobHealth_GetTargetCurHP() then
hp, hpmax = MobHealth_GetTargetCurHP(), MobHealth_GetTargetMaxHP()
end