TargetFrameToT taint?
Hey guys, I'm having a hard time moving my TargetFrameToT. I'm trying to "detach" it from my target frame, basically, and have it display above and to the right so it doesn't overlap my action bars. I really just want to keep it parented to the target frame if I can and just move it a little. Here's a copy of my taint log.
http://pastebin.com/gyQV87xU I'm really new to this lua stuff (even started reading WoW Programming 2nd Edition) but is this because the ToT frame isn't technically movable? Using SetMovable and SetUserPlaced didn't change anything. This is what I'm using to move the ToT frame. Lua Code:
It's the same way I moved my other UFs but haven't had any errors from them. Pet frame works fine, I've successfully "detached" it from my player frame the same way I'm trying with the ToT frame. I think the fix for this is a little over my head yet, I could really use some help tracking this down :) |
This line is your problem that causes taint:
Lua Code:
Instead, you need to hook it securely: Lua Code:
That way, every time the game tries to move the ToT frame, your function will fire immediately after and move it right back. (Note: you may wish to add in a check so that it doesn't try to move it while in combat) |
Quote:
As for the combat check, I'll see if I can figure it out. Does that mean it'll reset when I'm in combat, or will it stay where I place it? |
I don't know, I don't use the default frames and haven't messed with them beyond using the default UI's method of moving the player and target frames around on PTRs.
|
I fixed it! Turns out TargetFrameToT wasn't the source of the taint once I removed
Lua Code:
However, I kept getting taint issues pointing to that frame. I removed similar lines from all my other frames and used SetMovable and SetUserPlaced. Everything seems to work, with one catch. My pet frame resets to default position unless I add Lua Code:
No taint log so far, ToT frame stays where I placed it in combat, so far so good. Does anyone know a better way to keep my pet frame stationary? I tried SetMovable and SetUserPlaced, they didn't work, PetFrame kept resetting. It's working fine with SetPoint = function() end, so far at least, but if this is something that causes taint I'd like a better way to lock my pet frame in place. |
Quote:
|
Quote:
Lua Code:
The big advantage of the SetUserPlaced call if the frame is supported, then you can clear/move protected frames even in combat. There is also a similar hack with secure frames, where you can resize them in combat while StartSizing is active. |
Okay, thanks for the tip, I'll try it out tonight when I have more time. Sorry for the silly questions, this is all still new to me. I've only read the first couple chapters in that WoW Programming book so if it's not a straightforward clearallpoints, setpoint, etc I'm generally in over my head lol.
|
Okay, had a chance to try out the petframe suggestion. It worked, petframe stayed put, but it still caused taint. Near as I can tell it didn't actually cause any problems in the UI, and this is the whole extent of the taint log below. It was only 6 lines, and occurred in the first fight I got into, which was some random elite a few levels above me, so it was long and drawn out.
Code:
7/26 09:25:53.004 Interface\FrameXML\PetActionBarFrame.lua:97 Lua Code:
I feel like I'd prefer to hook them but the ToT frame wouldn't move at all when I did, trying both Seerah's suggestion and adapting Resike's to TargetFrameToT. I just woke up after a really long night at work though so blonde moments may have happened and I may have goofed it up. The suggested hook for the PetFrame caused the above mentioned taint, however small it seems to be. I'll try them again tomorrow morning after work when I have time to play, on a fresh restart and game load and everything. |
Quote:
I tried my code in the PTR and it was working fine for me, i could enter leave combat shoot things, even use the pet bar, without any issue. Ofc i didn't tested it entierely like messing with dropdowns/entering queues which could ponentionally spread taints more, this requires more time. But if your code working as intended and not causing any issues then you should stick with it, as long as it works perfectly. |
Okay, tested Resike's code on a fresh start. I'm on a live realm, no PTR, in Shadowmoon Valley, tested on my hunter. Pet frame and ToT frame stayed put in several little fights. Didn't try LFD or anything, though. So far so good, though, and I think I like this method a little better.
Lua Code:
Here's what it looks like, and it's working fine. Thanks again guys! |
Do you actually need the hooks? I can't find anywhere in the UI where these frames get moved around, except PetFrame once on load.
|
It is for the pet frame apparently. Not hooking it still works on my hunter, but my warlock pet resets to default if I don't.
|
All times are GMT -6. The time now is 04:47 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI