Modules/NamePlates: block nameplate events if no nameplate (fix someday maybe???)

This commit is contained in:
andrew6180
2024-04-30 15:30:23 -07:00
parent 5c2a42ebc8
commit ee27d97c00
+3
View File
@@ -574,6 +574,9 @@ function NP:UpdatePlateBase(nameplate)
end
function NP:NamePlateCallBack(nameplate, event, unit)
if not nameplate then
return
end
if event == 'UNIT_FACTION' or event == 'UNIT_FLAGS' then
nameplate.reaction = UnitReaction('player', unit) -- Player Reaction
nameplate.repReaction = UnitReaction(unit, 'player') -- Reaction to Player