Native Debuff Anchors Griefing

/Interface/FrameXML/BuffFrame.lua | DebuffButton_UpdateAnchors

Can someone think of a good reason as to why this doesn’t :ClearAllPoints() the same way buffs do?

I’ve had a personal addon for quite a long time that lined up and reskinned the native BuffFrame buffs/debuffs to a nice pixel border by hooking OnUpdate. And separated anything without an expiration to its own row. This now errors out, but not on the first debuff (of course the first time I saw it was on Thadius’s polarity debuffs).

Because it’s only ever resetting the same point (TOPRIGHT for button 1, LEFT for the rest).

While generally calling ClearAllPoints first is “recommended” as setting multiple points is addative, it’s not required if you only ever move the same point(s). Blizz. code does this in various places.

Unless I’m missing something on SecureAuraHeader, this is extremely unfortunate because I have no desire to reimplement/maintain stock debuff’s functionality.

I’m not sure what it is you’re trying to do so I don’t see what difference a ClearAllPoints in the Blizz. code would make. Then again, I’m not sure whay you’re using OnUpdate instead of hooking the function?

BuffFrame:HookScript("OnUpdate", function(self)
    update_buffs()
end)

I’m using this to position my all my Buffs / TempEnchants in a custom pixel aligned grid. The end of BuffFrame_Update() uses a :ClearAllPoints() implicitly in BuffFrame_UpdateAllBuffAnchors(), so I don’t run into any problems nudging my buttons into place.

The ClearAllPoints in BuffFrame_UpdateAllBuffAnchors is right before it calls SetPoint for the 1 to BUFF_ACTUAL_DISPLAY buttons. The buttons are positioned (SetPointed) before your code runs just like the debuffs.

Maybe if you posted the error and the code you’re using there might be something more helpful.

Interface\FrameXML\BuffFrame.lua:354: Action[SetPoint] failed because[SetPoint would result in anchor family connection]: attempted from: DebuffButton2:SetPoint.

Specifically, the Buffs are safe because it never assumes a previous set point. The debuffs are not safe on the otherhand because once I set another point, the second time the debuff comes up it creates the anchor family issue.

The error refers to a circular setpoint, anchoring to a frame that is effectively through the anchoring hierarchy, anchored to the frame you’re anchoring (SetPointing). Nothing specifically to do with ClearAllPoints (or lack thereof).

Maybe a change in the structuring of the debuff frame in XML.

Clear that up and the error should go away.

Correct me if I’m wrong but any change to the base FrameXML will end up in non-secure execution, which would cause me to lose the current ability to manage buffs during combat.

My current rows are:

Auras + Enchant
Regular Buffs
Debuffs

You can’t change the xml but your OP suggested this was a new problem. I was suggesting a possible change to the Blizz. frame structure might have caused your code to require finding a different point to anchor your frames to or change a Blizz. frame anchor or whatever it does that’s not “default” when BuffFrame_UpdateAllBuffAnchors() runs.

But then again I’m just shouting into the wind because I have no idea what you are doing so all I can tell you is what the error is saying and that is, it’s not that you have a protected call problem but rather an anchoring problem somewhere and when the Blizz frames try to update the debuff anchors it’s failing to do so because of it.

I’m returning after quite a long break, so it’s a new problem to me. I can only assume at this point there was something compatibility wise for original classic that allowed this to work that is no longer in the current era client.

This was more of a shot in the dark that there was a good work around. I’ll just have to live with the extra bloat of a SecureAuraHeader specifically for the debuffs.

As far as I can tell, I don’t believe you do but the choice is yours.

That’s true. I’ll be opting to just directly use hooksecurefunc() both AuraButton_Update and BuffFrame_Update. I had really hoped to be able to do it all in one function, but such is life when it comes to wow addons. Thanks for the timely responses.

Maybe something in this might help (it’s retail but should apply for WoTLK/Classic). It reconfigures default buffs/debuffs:
https://www.curseforge.com/wow/addons/vremon-ui

Possible alternative solution (or somewhere to borrow code):
https://www.curseforge.com/wow/addons/masque
https://www.curseforge.com/wow/addons/blizzbuffsfacade
https://www.curseforge.com/wow/addons/masque_flatsquares (or any other Masque skin)