Open porch-wow opened 2 months ago
Changing the frame to be a secure template directly causes issues in combat, e.g.
3x [ADDON_ACTION_BLOCKED] AddOn 'PitBull4' tried to call the protected function 'PitBull4_Frame_11:SetScale()'.
[string "@!BugGrabber/BugGrabber.lua"]:485: in function <!BugGrabber/BugGrabber.lua:485>
[string "=[C]"]: in function `SetScale'
[string "@PitBull4/UnitFrameLayout.lua"]:1501: in function <PitBull4/UnitFrameLayout.lua:1443>
[string "@PitBull4/UnitFrameLayout.lua"]:1569: in function `UpdateLayout'
[string "@PitBull4/ModuleHandling/Module.lua"]:321: in function `Update'
[string "@PitBull4/ModuleHandling/Module.lua"]:393: in function `?'
[string "@DevTool/Libs/AceTimer-3.0-17/AceTimer-3.0.lua"]:55: in function <...ceDevTool/Libs/AceTimer-3.0/AceTimer-3.0.lua:50>
Locals:
_ = Frame {
}
event = "ADDON_ACTION_BLOCKED"
events = <table> {
}
So a different approach although is probably needed to fix this, rather than my naive one.
Right-clicking on totems calls
DestroyTotem
, which is a protected function. I fixed it on my end using this:I didn't test this thoroughly, though, so I'm not sure if there are other implications for using the secure button template. I also didn't really dig into the frame pool implementation, so this doesn't use
fetch_control
.