Commit 9d8e9ed8 authored by Simpy's avatar Simpy 🐹
Browse files

nameplates: in `RegisterEvents` we should check for unit before checking...

nameplates: in `RegisterEvents` we should check for unit before checking `unit` against `frame.displayedUnit`
parent 478bc5fa
......@@ -897,12 +897,10 @@ end
function mod:RegisterEvents(frame, unit)
local displayedUnit
if not unit then unit = frame.unit end
if unit ~= frame.displayedUnit then
displayedUnit = frame.displayedUnit
end
if not unit then
unit = frame.unit
end
if(self.db.units[frame.UnitType].healthbar.enable or (frame.isTarget and self.db.alwaysShowTargetHealth)) then
frame:RegisterUnitEvent("UNIT_MAXHEALTH", unit, displayedUnit);
......
  • originally created the "if not unit then" in 0b01c88b and fixed the "frame.unit" (which should have been "unit") sent into OnEvent in 478bc5fa

    Edited by Simpy
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment