Closed cont1nuity closed 1 week ago
This also prevents other changes to the frames. My addon made some minor changes to the default nameplates including changing the height to make them a bit bigger but that now no longer works.
This also prevents other changes to the frames. My addon made some minor changes to the default nameplates including changing the height to make them a bit bigger but that now no longer works.
I would like to see this changed as well!
Meanwhile as a workaround you can do HealthBarsContainer:ClearAllPoints(), which removes the protection from the healthbar and whatever else is anchored to it. Then you just ignore HealthBarsContainer and anchor your bars to UnitFrame or whatever you want. Luckily, LibGetFrame is returning healthBar and not HealthBarsContainer, so WeakAuras etc wil attach to the correct place, but this is a really sketchy fix.
Hope they clear this protection in the future :|
Fixed in 11.0.0.55185.
Changes made in 11.0 protected the whole nameplate.UnitFrame implicitly and prohibits addons from hiding them.
Running the following while targeting a unit with a nameplate shown indicates the root cause:
/dump C_NamePlate.GetNamePlateForUnit("target").UnitFrame:IsProtected()
->true, false
/dump C_NamePlate.GetNamePlateForUnit("target").UnitFrame.HealthBarsContainer:IsProtected()
->true, true
The
namePlateFrameBase.UnitFrame.HealthBarsContainer
is new in 11.0 and fully protected from creation throughSecureFrameParentPropagationTemplate
. Due to how frame protection is inherited upwards the parent structure to theUnitFrame
,UnitFrame
becomes implicitly protected. CallingnamePlateFrameBase.UnitFrame:Hide()
in combat is no longer possible for addons, which causes the base nameplate to stay on screen along with the addon nameplate during combat for all nameplates that newly show on screen.I am unsure if
HealthBarsContainer
is needed on the nameplate at all or if it needs to be fully protected or parented to theUnitFrame
.