Go to Page... |
|
Thread Tools | Display Modes |
|
11-09-19, 12:27 AM | #1 |
Taint from script to move the arena frames (retail)
I got a self made addon (just scripts) to move the default arena frames and do some more stuff (will post down below).
Every time I enter arena I get: "Interface failed because of addon." in the chat (yellow text) (my selfmade addon is called "^Arenaframes"). In my taint log I get this error code: Code:
11/9 05:12:07.005 UnitFrameHealthBar_Update() 11/9 05:12:07.005 An action was blocked in combat because of taint from ^Arenaframes - ArenaEnemyFrames:Show() 11/9 05:12:07.005 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:94 ArenaEnemyFrames_UpdateVisible() 11/9 05:12:07.005 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:185 ArenaEnemyFrame_UpdatePlayer() 11/9 05:12:07.005 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:224 11/9 05:12:07.005 UnitFrameHealthBar_Update() 11/9 05:12:07.005 An action was blocked in combat because of taint from ^Arenaframes - ArenaEnemyFrame2PetFrame:Hide() 11/9 05:12:07.005 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:314 ArenaEnemyFrame_UpdatePet() 11/9 05:12:07.005 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:234 11/9 05:12:49.301 UnitFrameHealthBar_Update() 11/9 05:12:49.301 An action was blocked in combat because of taint from ^Arenaframes - ArenaEnemyFrames:Show() 11/9 05:12:49.301 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:94 ArenaEnemyFrames_UpdateVisible() 11/9 05:12:49.301 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:185 ArenaEnemyFrame_UpdatePlayer() 11/9 05:12:49.301 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:224 11/9 05:12:49.301 UnitFrameHealthBar_Update() 11/9 05:12:49.301 An action was blocked in combat because of taint from ^Arenaframes - ArenaEnemyFrame1PetFrame:Hide() 11/9 05:12:49.301 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:314 ArenaEnemyFrame_UpdatePet() 11/9 05:12:49.301 Interface\AddOns\Blizzard_ArenaUI\Blizzard_ArenaUI.lua:234 Heres the script (put into addon) I'm running that causing the problem. Any suggestion what's causing the taint and how to optimize the coding? Code:
LoadAddOn("Blizzard_ArenaUI") for i=1, 5 do _G["ArenaEnemyFrame"..i]:SetScale(1.5) _G["ArenaEnemyFrame"..i.."CastingBar"]:SetScale(1.5) _G["ArenaEnemyFrame"..i.."Name"]:Hide() _G["ArenaEnemyFrame"..i].specBorder:SetAlpha(0) _G["ArenaEnemyFrame"..i].specPortrait:SetAlpha(0) end ArenaEnemyFrame1:ClearAllPoints() ArenaEnemyFrame2:ClearAllPoints() ArenaEnemyFrame3:ClearAllPoints() ArenaEnemyFrame4:ClearAllPoints() ArenaEnemyFrame5:ClearAllPoints() ArenaEnemyFrame1:SetPoint("CENTER",UIParent,"CENTER",343,44) ArenaEnemyFrame2:SetPoint("CENTER",UIParent,"CENTER",343,18) ArenaEnemyFrame3:SetPoint("CENTER",UIParent,"CENTER",343,-8) ArenaEnemyFrame4:SetPoint("CENTER",UIParent,"CENTER",343,-34) ArenaEnemyFrame5:SetPoint("CENTER",UIParent,"CENTER",343,-60) ArenaEnemyFrame1.SetPoint = function() end ArenaEnemyFrame2.SetPoint = function() end ArenaEnemyFrame3.SetPoint = function() end ArenaEnemyFrame4.SetPoint = function() end ArenaEnemyFrame5.SetPoint = function() end |
|
11-09-19, 05:12 AM | #2 |
The last 5 lines of your script taints those Arena Frames. Why do you need to disable that function?
|
|
11-09-19, 10:49 AM | #3 | |
How would you fix that? I need to lock them in place! |
||
11-09-19, 11:17 AM | #4 |
Find where it gets reset, probably here:
https://github.com/Gethe/wow-ui-sour...rd_ArenaUI.lua https://github.com/Gethe/wow-ui-sour...rent.lua#L3125 Use hooksecurefunc and move it back where you want |
|
11-10-19, 02:25 AM | #5 | |
I got this for arena numbers on nameplates (arena numbers instead of lvl number), maybe that coding can be similar for moving and keeping the arenaframes in place? It uses the "hooksecurefunc" like you mentioned. Code:
-- Arena1-2-3 on nameplates -- local U=UnitIsUnit hooksecurefunc("CompactUnitFrame_UpdateName",function(F)if IsActiveBattlefieldArena()and F.unit:find("nameplate")then for i=1,5 do if U(F.unit,"arena"..i)then F.name:SetText(i)F.name:SetTextColor(1,1,0)break end end end end) |
||
11-10-19, 07:16 AM | #6 |
Looking at the code, the point where the individual ArenaEnemyFrame items are being modified is when "ArenaEnemyFrame_UpdatePlayer" gets called.
Move the lines that clear and set the points for the ArenaEnemyFrame 1 through 5 into its own function. Have the code run that on load, and then use hooksecurefunc to have that function run when ArenaEnemyFrame_UpdatePlayer" runs. I have not tested this code, but... Code:
function relocateArenaEnemyFrames() ArenaEnemyFrame1:ClearAllPoints(); ArenaEnemyFrame2:ClearAllPoints(); ArenaEnemyFrame3:ClearAllPoints(); ArenaEnemyFrame4:ClearAllPoints(); ArenaEnemyFrame5:ClearAllPoints(); ArenaEnemyFrame1:SetPoint("CENTER",UIParent,"CENTER",343,44); ArenaEnemyFrame2:SetPoint("CENTER",UIParent,"CENTER",343,18); ArenaEnemyFrame3:SetPoint("CENTER",UIParent,"CENTER",343,-8); ArenaEnemyFrame4:SetPoint("CENTER",UIParent,"CENTER",343,-34); ArenaEnemyFrame5:SetPoint("CENTER",UIParent,"CENTER",343,-60); end hooksecurefunc("ArenaEnemyFrame_UpdatePlayer", relocateArenaEnemyFrames); |
|
11-11-19, 04:40 AM | #7 | |
Like everytime someone stealthes the arenaframes keep updating and resetting. And if I use the "ArenaEnemyFrame1.SetPoint = function() end" they get locked in place - but I get taint everytime someone stealthes I think. Btw the arena preparation frames are always top right. Then when the game starts, they get in the position. Maybe theres a way to change the arena preparation frames position(?). (Hard to explain what I mean.) |
||
11-11-19, 01:40 PM | #8 |
You could try
Lua Code:
Last edited by Terenna : 11-11-19 at 04:53 PM. |
|
11-12-19, 05:37 PM | #9 | |
It's something with stealthers, invisibility. When the arena frames "update" after it, they reset or give me taint. __ If anyone wanna keep experimenting/trying, can do 3v3 skirmishes and try there, see how it behaves when they update mid game cus of stealth or invisibility. |
||
11-13-19, 05:52 AM | #10 | |
Last edited by LBXZero : 11-13-19 at 06:21 AM. |
||
11-13-19, 06:17 AM | #11 | |
I found this old thread, with exactly same problem: https://www.wowinterface.com/forums/...ad.php?t=46675 He found solution in bottom, but I don't understand the post - I think he used MoveAnything addon and changed some code in that addon. Seems like he used "ArenaPrepFrame1" and not "ArenaEnemyFrame1". Maybe it's a solution, to use ArenaPrepFrame instead of ArenaEnemyFrame? __ Btw I know there's an addon called "sArena" that is basically default arenaframes with some options. But it's missing some options that I want. |
||
11-14-19, 06:55 AM | #12 |
WoWInterface » Developer Discussions » Lua/XML Help » Taint from script to move the arena frames (retail) |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|