From 83f99e6f881c34d2caf376ccb826f1b18cd52c67 Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 21 May 2020 12:00:49 +0200 Subject: [PATCH] nameplates: check for unitstr mismatches --- modules/nameplates.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index cf51134a..494e54ad 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -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