Moving Boss1TargetFrame without taint
So here's the entirety of my bossframe code
Lua Code:
Obviously what matters is the Lua Code:
I have tried Lua Code:
with no success. Lua Code:
This is what I could find in UIParent.lua regarding SetPoint for boss1. Anyway, my question is: does anyone have a way to move Boss1TargetFrame and keep it moved without massively tainting everything? |
Boss1TargetFrame.SetPoint = function() end is what is causing taints. You cannot replace anything protected without tainting.
It looks like all you're doing is just moving and scaling frames. Use MoveAnything for that (link goes to curse, the upload here at WoWI hasn't been updated since 2011). |
Yep, all I'm doing is moving and scaling. I'm not interested in getting another addon to do that though, if I'm able to do that via my own. Thanks though.
|
Wouldn't you just be able to do
lua Code:
Though you might need a workaround like here, if you don't want it to just keep recursively calling itself (might make the game crash?): https://us.battle.net/forums/en/wow/...9273821#post-5 Quote:
|
Yeah, I have tried this:
Lua Code:
Also trying this for the sake of it, even though they do the same thing: Lua Code:
And it throws the same error. EDIT: I may have been a bit hasty. It looks like those do function as you would expect, but the frame still moves at almost any type of event in combat (changing actionbars for instance). I'm hoping this isn't a case of "tough shit," as I sometimes have to reload or change actionbars in the middle of boss fights. (I am testing by sitting in RFC on the first boss, and haven't been exiting combat between reloads until now) |
This frame is protected, so this would only be possible outside of combat. Not sure if that's the problem you're facing here.
|
Quote:
With the current code I'm able to move it before combat starts, but it doesn't stay put in combat and reverts to the original location. |
This is the Uganadan wai my bratha:
Lua Code:
Only call it once at ADDON_LOADED my queen. |
What Resike wrote is the correct.
You can set any Blizzard frame to userplaced/movable. It will ignore any point other then the user placed point. I do this in rLib. https://github.com/zorker/rothui/blo...gframe.lua#L87 That is how I am able to repoint/resize frames like the ObjectiveTracker or the TalkingHead. https://github.com/zorker/rothui/blo...r/core.lua#L30 https://github.com/zorker/rothui/blo...d/core.lua#L29 It may be needed to add the ignoreFramePositionManager value. |
For protected frames i don't think using .ignoreFramePositionManager = true is a good idea, since the whole point of the SetUserPlaced(true) call is to fake that the SetPoint was called by Blizzard code, so there is no chance left for any kind of tainting to happen.
But it's really hard to test this in this current "open the worldmap in combat and shit gets tainted" environment. |
Quote:
|
Here is the error I get with Resike's code (and also the position resets) when I swap actionbars in combat.
Code:
1x [ADDON_ACTION_BLOCKED] AddOn '!mUI' tried to call the protected function 'Boss1TargetFrame:ClearAllPoints()'. |
Quote:
|
Quote:
|
I think the problem is that some boss frames get created in combat, so you can't do much about this, just to hide the original boss frames and create your own versions with "BossTargetFrameTemplate", that you create on addon load.
|
Any updates on this?
|
All times are GMT -6. The time now is 11:09 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI