Skip to content

Commit 4618b66

Browse files
committed
Disable the custom castbar shown when changing talents, since it causes errors
1 parent 005e798 commit 4618b66

1 file changed

Lines changed: 15 additions & 9 deletions

File tree

core/ReduceTaint.lua

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ function Module:SetupHook()
8686
self:ReplaceCopyLoadoutButton(talentsTab);
8787

8888
self:HandleMultiActionBarTaint();
89+
self:HandleCastbarTaint(talentsTab);
8990
end
9091

9192
function Module:OnUpdateInspecting(talentsTab)
@@ -109,8 +110,8 @@ function Module:ReplaceCopyLoadoutButton(talentsTab)
109110
end);
110111
end
111112

112-
local function purgeKey(table, key)
113-
TextureLoadingGroupMixin.RemoveTexture({textures = table}, key);
113+
local function setNil(table, key)
114+
TextureLoadingGroupMixin.RemoveTexture({ textures = table }, key);
114115
end
115116
local function makeFEnvReplacement(original, replacement)
116117
local fEnv = {};
@@ -146,32 +147,37 @@ function Module:HandleMultiActionBarTaint()
146147
and not self:IsHooked(microButton, 'HasTalentAlertToShow')
147148
then
148149
self:SecureHook(microButton, 'HasTalentAlertToShow', function()
149-
purgeKey(microButton, 'canUseTalentUI');
150-
purgeKey(microButton, 'canUseTalentSpecUI');
150+
setNil(microButton, 'canUseTalentUI');
151+
setNil(microButton, 'canUseTalentSpecUI');
151152
end);
152153
end
153154
end
154155

156+
--- @param talentsTab PlayerSpellsFrame_TalentsFrame
157+
function Module:HandleCastbarTaint(talentsTab)
158+
setNil(talentsTab, 'enableCommitCastBar');
159+
end
160+
155161
function Module:MakeOnHideSafe()
156162
local talentContainerFrame = self:GetTalentContainerFrame();
157163
if not issecurevariable(talentContainerFrame, 'lockInspect') then
158164
if not talentContainerFrame.lockInspect then
159-
purgeKey(talentContainerFrame, 'lockInspect');
165+
setNil(talentContainerFrame, 'lockInspect');
160166
else
161167
-- get blizzard to set the value to true
162168
TextureLoadingGroupMixin.AddTexture({textures = talentContainerFrame}, 'lockInspect');
163169
end
164170
end
165171
local isInspecting = talentContainerFrame:IsInspecting();
166172
if not issecurevariable(talentContainerFrame, 'inspectUnit') then
167-
purgeKey(talentContainerFrame, 'inspectUnit');
173+
setNil(talentContainerFrame, 'inspectUnit');
168174
end
169175
if not issecurevariable(talentContainerFrame, 'inspectString') then
170-
purgeKey(talentContainerFrame, 'inspectString');
176+
setNil(talentContainerFrame, 'inspectString');
171177
end
172178
if isInspecting then
173-
purgeKey(talentContainerFrame, 'inspectString');
174-
purgeKey(talentContainerFrame, 'inspectUnit');
179+
setNil(talentContainerFrame, 'inspectString');
180+
setNil(talentContainerFrame, 'inspectUnit');
175181
RunNextFrame(function()
176182
talentContainerFrame:SetInspecting(nil, nil, nil);
177183
end);

0 commit comments

Comments
 (0)