Quantcast
WoWInterface - View Single Post - Taint from script to move the arena frames (retail)
View Single Post
11-10-19, 07:16 AM   #6
LBXZero
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 61
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);
  Reply With Quote