1
1
<Ui ><Script ><![CDATA[ --[[
2
2
3
- TaintLess [23-05-18 ]
3
+ TaintLess [23-09-09 ]
4
4
https://www.townlong-yak.com/addons/taintless
5
5
6
6
All rights reserved.
7
7
8
8
Permission is hereby granted to distribute unmodified copies of this file.
9
9
]]
10
10
11
- local function purgeKey(t, k)
12
- local logLevel, c = GetCVar("taintLog"), -42
13
- if (tonumber(logLevel) or 0) > 1 then
14
- if CVarCallbackRegistry then
15
- CVarCallbackRegistry:UnregisterEvent("CVAR_UPDATE")
16
- end
17
- SetCVar("taintLog", "1")
18
- else
19
- logLevel = nil
20
- end
21
- t[k] = nil
22
- repeat
23
- if t[c] == nil then
24
- t[c] = nil
25
- end
26
- c = c - 1
27
- until issecurevariable(t, k)
28
- if logLevel then
29
- SetCVar("taintLog", logLevel)
30
- if CVarCallbackRegistry then
31
- CVarCallbackRegistry:RegisterEvent("CVAR_UPDATE")
32
- end
11
+ local purgeKey do
12
+ local e = {}
13
+ function purgeKey(t, k)
14
+ e.textures = t
15
+ TextureLoadingGroupMixin.RemoveTexture(e, k)
33
16
end
34
17
end
35
18
36
19
local patch do
37
- local q, skips = {}, securecall(function()
20
+ local skips = securecall(function()
38
21
local cb, r, _, an = select(4,GetBuildInfo()), {moon="haunted"}
39
22
r.moon, _, an = nil, issecurevariable(r, "moon")
40
- for m, v, clo, chi in (GetAddOnMetadata(an, "X-TaintLess-DisableMitigations") or ""):gmatch("([%a_]+)=(%d+):?(%d*):?(%d*)") do
23
+ for m, v, clo, chi in (C_AddOns. GetAddOnMetadata(an, "X-TaintLess-DisableMitigations") or ""):gmatch("([%a_]+)=(%d+):?(%d*):?(%d*)") do
41
24
if (clo == "" or cb >= clo+0) and (chi == "" or chi+0 >= cb) then
42
25
r[m] = v + 0
43
26
end
44
27
end
45
28
return r
46
29
end)
47
30
function patch(name, version, impl)
48
- if name == nil then
49
- for qf, v in pairs(q) do
50
- securecall(qf, v)
51
- end
52
- elseif not ((tonumber(_G[name]) or 0) >= version or skips and skips[name] == version) then
53
- _G[name], q[impl] = version, version
31
+ if not ((tonumber(_G[name]) or 0) >= version or skips and skips[name] == version) then
32
+ _G[name] = version
33
+ securecall(impl, version)
54
34
end
55
35
end
56
36
end
57
37
58
38
-- https://www.townlong-yak.com/addons/taintless/fixes/RefreshOverread
59
- patch("UIDD_REFRESH_OVERREAD_PATCH_VERSION", 3 , function(V)
39
+ patch("UIDD_REFRESH_OVERREAD_PATCH_VERSION", 5 , function(V)
60
40
hooksecurefunc("UIDropDownMenu_InitializeHelper", function()
61
41
for i=1, UIDD_REFRESH_OVERREAD_PATCH_VERSION == V and UIDROPDOWNMENU_MAXLEVELS or 0 do
62
42
for j=1+_G["DropDownList" .. i].numButtons, UIDROPDOWNMENU_MAXBUTTONS do
@@ -69,7 +49,7 @@ patch("UIDD_REFRESH_OVERREAD_PATCH_VERSION", 3, function(V)
69
49
end)
70
50
71
51
-- https://www.townlong-yak.com/addons/taintless/fixes/DisplayModeTaint
72
- patch("UIDROPDOWNMENU_OPEN_PATCH_VERSION", 1 , function(V)
52
+ patch("UIDROPDOWNMENU_OPEN_PATCH_VERSION", 3 , function(V)
73
53
hooksecurefunc("UIDropDownMenu_InitializeHelper", function(frame)
74
54
if UIDROPDOWNMENU_OPEN_PATCH_VERSION == V
75
55
and UIDROPDOWNMENU_OPEN_MENU and UIDROPDOWNMENU_OPEN_MENU ~= frame
@@ -79,19 +59,8 @@ patch("UIDROPDOWNMENU_OPEN_PATCH_VERSION", 1, function(V)
79
59
end)
80
60
end)
81
61
82
- -- https://www.townlong-yak.com/addons/taintless/fixes/IOFrameSelection
83
- patch("IOFRAME_SELECTION_PATCH_VERSION", 5, function(V)
84
- if type(InterfaceOptionsFrame) == "table" and type(InterfaceOptionsFrame.HookScript) == "function" then
85
- InterfaceOptionsFrame:HookScript("OnHide", function()
86
- if IOFRAME_SELECTION_PATCH_VERSION == V then
87
- InterfaceOptionsFrameCategories.selection = nil
88
- end
89
- end)
90
- end
91
- end)
92
-
93
62
-- https://www.townlong-yak.com/addons/taintless/fixes/EditModeOpenDrop
94
- patch("EDITMAN_OPENDROP_PATCH_VERSION", 3 , function(V)
63
+ patch("EDITMAN_OPENDROP_PATCH_VERSION", 5 , function(V)
95
64
if not (type(EditModeManagerFrame) == "table" and
96
65
type(EditModeManagerFrame.GetAttribute) == "function" and
97
66
type(FriendsFrameStatusDropDown) == "table") then
@@ -117,7 +86,7 @@ patch("EDITMAN_OPENDROP_PATCH_VERSION", 3, function(V)
117
86
end)
118
87
119
88
-- https://www.townlong-yak.com/addons/taintless/fixes/ObjectiveTrackerUpdate
120
- patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 3 , function(V)
89
+ patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 5 , function(V)
121
90
if not (type(ObjectiveTrackerFrame) == "table" and
122
91
type(ObjectiveTrackerFrame.HeaderMenu) == "table" and
123
92
type(ObjectiveTrackerFrame.HeaderMenu.Title) == "table") then
@@ -134,8 +103,7 @@ patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 3, function(V)
134
103
end)
135
104
hooksecurefunc("ObjectiveTracker_Update", function()
136
105
if OBJTRACK_DELAYUPDATE_PATCH_VERSION == V and didDelayUpdate then
137
- didDelayUpdate = nil
138
- purgeKey(ObjectiveTrackerFrame, "isUpdating")
106
+ ObjectiveTrackerFrame.isUpdating, didDelayUpdate = nil
139
107
end
140
108
end)
141
109
hooksecurefunc(ObjectiveTrackerFrame.HeaderMenu.Title, "ClearAllPoints", function()
@@ -154,5 +122,4 @@ patch("OBJTRACK_DELAYUPDATE_PATCH_VERSION", 3, function(V)
154
122
end)
155
123
end)
156
124
157
- patch()
158
125
]]> </Script ></Ui >
0 commit comments