Go to Page... |
Thread Tools | Display Modes |
05-21-21, 04:04 PM | #1 |
LF Some1 to do some rework on my UI addon. Compensation will be provided.
So i got an addon, with some scripts inside it, that i would like to get removed, and than be put into a downloadable addon again.
HMU on discord. IiIiiIiIiIiiIIiiI#9538 -- UI Scripts - Shadowlands updated - Emil local f = CreateFrame("FRAME"); f:RegisterEvent("PLAYER_ENTERING_WORLD"); --Event that fires on loadingscreens f:RegisterEvent("PLAYER_REGEN_DISABLED") f:RegisterEvent("PLAYER_REGEN_ENABLED") f:SetScript("OnEvent", function(self, event, ...) if (event == "PLAYER_REGEN_DISABLED") then else MicroButtonAndBagsBar:Hide() local t, f = {"Character","Spellbook","Talent","Achievement","QuestLog","Guild","LFD","Collections","EJ","Store","MainMenu"} for i = 1, #t do f= _G[t[i].."MicroButton"]f:SetScale(.001) end MicroButtonAndBagsBar:Hide() PlayerFrame:SetScale(1.2) TargetFrame:SetScale(1.2) FocusFrame:SetScale(1.2) BuffFrame:ClearAllPoints() BuffFrame:SetPoint("CENTER", PlayerFrame, "CENTER", 980, 80) BuffFrame.SetPoint = function() end SetCVar("cameradistancemaxfactor", 10) local m1 = "MultiBarBottomRight" _G[m1.."Button7"]:SetPoint("BOTTOMLEFT",_G[m1.."Button1"],"TOPLEFT", 0, 4) UIPARENT_MANAGED_FRAME_POSITIONS[m1].xOffset = 6 ActionBarUpButton:Hide() MainMenuBar.GetYOffset=function() return -30 end UIParent_ManageFramePositions() local m2 = "MainMenuBarArtFrame" _G[m2.."Background"]:Hide() _G[m2].PageNumber:Hide() _G[m2].LeftEndCap:Hide() _G[m2].RightEndCap:Hide() ActionButton1:ClearAllPoints() ActionButton1:SetPoint("BOTTOM",_G[m2.."Background"], -340, 35) ActionBarDownButton:Hide() for _, v in pairs({TargetFrame.levelText, FocusFrame.levelText, TargetFrame.name, PlayerFrame.name, FocusFrame.name, PlayerLevelText}) do hooksecurefunc(v, "Show", function(s) s:Hide() end) v:Show() end C_NamePlate.SetNamePlateFriendlySize(40, 20) RegisterStateDriver(StanceBarFrame, "visibility", "hide") RegisterStateDriver(PetActionBarFrame, "visibility", "hide") GameTimeFrame:Hide() MiniMapTrackingBackground:Hide() MiniMapTrackingButton:Hide() MiniMapTrackingIcon:Hide() MiniMapWorldMapButton:Hide() MinimapBorderTop:Hide() MinimapZoneText:Hide() MinimapZoomIn:Hide() MinimapZoomOut:Hide() PetActionBarFrame:Hide() -- Blizzard_TimeManager LoadAddOn("Blizzard_TimeManager") TimeManagerClockButton:Hide() f:UnregisterEvent("PLAYER_ENTERING_WORLD") end end) It is the buff part i would like to have removed. And also, if the coding can be worked, cause i sometimes have to lag problems. When i have this addon script on, compared to not having it on. Idk if that is something with the coding. Last edited by Emukiopa : 05-21-21 at 04:08 PM. |
|
05-21-21, 05:12 PM | #2 |
This code runs every time you leave combat. This is fine, especially since some things may reset themselves in combat, but this also means you're creating several more function hooks (the hooksecurefunc). Let's say you get into and out of combat 100 times. Every time one of those fontstrings tries to show now, such as PlayerLevelText, the game calls PlayerLevelText:Hide() literally 100 times. Next time you leave combat adds another hook, calling :Hide() 101 times. You probably noticed the longer you played, the worse the lag was.
I removed the three buff lines, protected the hooks and the securestatedriver behind a switch so they only happen once, and cleaned up the code, including changing the function hooks into widget hooks. I'm not too familiar with securestatedriver stuff, but I'm pretty sure every time a specific register function is called, it toggles that state, so you should only call it once. Lua Code:
__________________
|
|
05-21-21, 05:18 PM | #3 | |
|
||
05-21-21, 05:30 PM | #4 |
You got this code from a file in an addon folder. Put it back into the file.
__________________
|
|
09-16-23, 12:25 AM | #5 | |
Keep sharing with us.. We will be greatful to you... |
||
WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » LF Some1 to do some rework on my UI addon. Compensation will be provided. |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|