Commit 70b80bf5 authored by Simpy's avatar Simpy 🐹
Browse files

correctly handle some of the nameplate variables when nameplate is removed

parent 30298448
...@@ -175,6 +175,7 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColorChanged, BorderCha ...@@ -175,6 +175,7 @@ function mod:StyleFilterSetChanges(frame, actions, HealthColorChanged, BorderCha
return --We hide it. Lets not do other things (no point) return --We hide it. Lets not do other things (no point)
end end
if FrameLevelChanged then if FrameLevelChanged then
frame.StyleChanged = true
frame.FrameLevelChanged = actions.frameLevel -- we pass this to `ResetNameplateFrameLevel` frame.FrameLevelChanged = actions.frameLevel -- we pass this to `ResetNameplateFrameLevel`
end end
if HealthColorChanged then if HealthColorChanged then
......
...@@ -543,15 +543,34 @@ function mod:NAME_PLATE_UNIT_REMOVED(_, unit, frame) ...@@ -543,15 +543,34 @@ function mod:NAME_PLATE_UNIT_REMOVED(_, unit, frame)
frame.unitFrame.Level:SetText("") frame.unitFrame.Level:SetText("")
frame.unitFrame.NPCTitle:ClearAllPoints() frame.unitFrame.NPCTitle:ClearAllPoints()
frame.unitFrame.NPCTitle:SetText("") frame.unitFrame.NPCTitle:SetText("")
frame.unitFrame.Elite:Hide()
frame.unitFrame.DetectionModel:Hide() frame.unitFrame.DetectionModel:Hide()
frame.unitFrame.Elite:Hide()
frame.unitFrame:Hide() frame.unitFrame:Hide()
frame.unitFrame.isTarget = nil frame.unitFrame.isTarget = nil
frame.unitFrame.isTargetingMe = nil frame.unitFrame.isTargetingMe = nil
frame.unitFrame.displayedUnit = nil frame.unitFrame.displayedUnit = nil
frame.ThreatData = nil
frame.unitFrame.UnitType = nil frame.unitFrame.UnitType = nil
frame.unitFrame.TopLevelFrame = nil frame.unitFrame.TopLevelFrame = nil
frame.unitFrame.TopOffset = nil
frame.unitFrame.isBeingTanked = nil
frame.unitFrame.ThreatScale = nil
frame.unitFrame.ThreatData = nil
--StyleFilter Variables
frame.unitFrame.StyleFilterWaitTime = nil
frame.unitFrame.StyleChanged = nil
--StyleFilter Actions
frame.unitFrame.VisibilityChanged = nil
frame.unitFrame.FrameLevelChanged = nil
frame.unitFrame.HealthColorChanged = nil
frame.unitFrame.BorderChanged = nil
frame.unitFrame.FlashingHealth = nil
frame.unitFrame.TextureChanged = nil
frame.unitFrame.ScaleChanged = nil
frame.unitFrame.AlphaChanged = nil
frame.unitFrame.NameColorChanged = nil
frame.unitFrame.PortraitShown = nil
frame.unitFrame.NameOnlyChanged = nil
if self.ClassBar and (unitType == "PLAYER") then if self.ClassBar and (unitType == "PLAYER") then
mod:ClassBar_Update() mod:ClassBar_Update()
...@@ -731,8 +750,8 @@ function mod:NAME_PLATE_CREATED(_, frame) ...@@ -731,8 +750,8 @@ function mod:NAME_PLATE_CREATED(_, frame)
frame.unitFrame.Highlight = self:ConstructElement_Highlight(frame.unitFrame) frame.unitFrame.Highlight = self:ConstructElement_Highlight(frame.unitFrame)
if frame.UnitFrame and not frame.unitFrame.onShowHooked then if frame.UnitFrame and not frame.unitFrame.onShowHooked then
self:SecureHookScript(frame.UnitFrame, "OnShow", function(self) self:SecureHookScript(frame.UnitFrame, "OnShow", function(blizzPlate)
self:Hide() --Hide Blizzard's Nameplate blizzPlate:Hide() --Hide Blizzard's Nameplate
end) end)
--print('Hooked on NAME_PLATE_CREATED') --print('Hooked on NAME_PLATE_CREATED')
frame.unitFrame.onShowHooked = true frame.unitFrame.onShowHooked = true
......
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