From f392c60ddd9fd2bb0a680c82f2af2a2bf175445f Mon Sep 17 00:00:00 2001 From: Nuno M Date: Sat, 27 Jul 2019 16:43:22 +0100 Subject: [PATCH] First attempt at fixing nameplates issues --- elements/nameplates.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elements/nameplates.lua b/elements/nameplates.lua index e46ff03..4dce21e 100644 --- a/elements/nameplates.lua +++ b/elements/nameplates.lua @@ -109,7 +109,8 @@ local myPostChannelStop = function(self, unit, name, castID, spellID) end -- Target selected -local OnTargetChanged = function(self) +local OnTargetChanged = function(self, event, unit) + if (not self) then return end self.Castbar.iconborder:Hide() -- new target if UnitIsUnit(self.unit, 'target') then @@ -143,7 +144,7 @@ local createStyle = function(self, unit) return end - self:RegisterEvent('PLAYER_TARGET_CHANGED', OnTargetChanged) + -- self:RegisterEvent('PLAYER_TARGET_CHANGED', OnTargetChanged) -- Health bar local health = CreateFrame("StatusBar", nil, self)