Skip to content

Commit babe1dd

Browse files
committed
fix: fixed StaticPopup_Show hook + dismiss loop throwing errors
1 parent 4aa7380 commit babe1dd

4 files changed

Lines changed: 25 additions & 20 deletions

File tree

CombatMode/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/2.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.3.3] - 2026-08-20
9+
10+
### Fixed
11+
12+
- Fixed issue where upgrading items would cause a Lua error due to `StaticPopup_Show` hook + dismiss loop.
13+
814
## [4.3.2] - 2026-08-20
915

1016
### Fixed
@@ -358,7 +364,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
358364

359365
- Reticle Targeting blacklist not excluding spells from targeting macro injection, which broke Hold To Cast and empowered spell options (e.g. Hold & Release). Excluding a spell by name on the list now restores expected behavior.
360366

361-
[Unreleased]: https://github.com/djsmithdev/combatmode/compare/4.3.2...HEAD
367+
[Unreleased]: https://github.com/djsmithdev/combatmode/compare/4.3.3...HEAD
368+
[4.3.3]: https://github.com/djsmithdev/combatmode/compare/4.3.2...4.3.3
362369
[4.3.2]: https://github.com/djsmithdev/combatmode/compare/4.3.1...4.3.2
363370
[4.3.1]: https://github.com/djsmithdev/combatmode/compare/4.3.0...4.3.1
364371
[4.3.0]: https://github.com/djsmithdev/combatmode/compare/4.2.1...4.3.0

CombatMode/CombatMode.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## Interface: 120100
2-
## Version: 4.3.2
2+
## Version: 4.3.3
33

44
## Title: |A:::|a|TInterface\Addons\CombatMode\assets\cmtitle:22:95|t
55
## Notes: Combat Mode brings modern action-game controls to World of Warcraft, replacing traditional tab-targeting with intuitive aiming, more engaging controls, and immersive combat.

CombatMode/Core/Runtime/Bootstrap.lua

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,30 +27,21 @@ local GetCurrentBindingSet = _G.GetCurrentBindingSet
2727
local GetMacroInfo = _G.GetMacroInfo
2828
local SaveBindings = _G.SaveBindings
2929
local SetBinding = _G.SetBinding
30+
local UIParent = _G.UIParent
3031

3132
-- Lua stdlib
3233
local pairs = _G.pairs
3334

3435
-- Suppress the experimental CVar confirmation popup so Action Camera CVars
3536
-- don't trigger a dialog on every login/reload. CM sets experimental CVars
3637
-- (e.g. test_cameraHeadMovementStrength) intentionally for the Action Camera
37-
-- feature, so the warning is noise. We hook StaticPopup_Show directly because
38-
-- UIParent registers for EXPERIMENTAL_CVAR_CONFIRMATION_NEEDED during Blizzard
39-
-- init and its OnEvent fires before any addon-created frame can react.
40-
local origShow = _G.StaticPopup_Show
41-
_G.StaticPopup_Show = function(which, ...)
42-
if which == "EXPERIMENTAL_CVAR_WARNING" then
43-
return nil
44-
end
45-
return origShow(which, ...)
46-
end
47-
-- Dismiss any popup already on screen from earlier in this session (edge case:
48-
-- e.g. a previous /reload where the popup was already queued).
49-
for i = 1, _G.STATICPOPUP_NUMDIALOGS or 20 do
50-
local popup = _G["StaticPopup" .. i]
51-
if popup and popup:IsShown() and popup.which == "EXPERIMENTAL_CVAR_WARNING" then
52-
popup:Hide()
53-
end
38+
-- feature, so the warning is noise.
39+
-- WoW 12.1 moved this event out of UIParent into Blizzard_Game's internal
40+
-- event router. Use GameEvent.UnregisterInternalEvent when available.
41+
if _G.GameEvent and _G.GameEvent.UnregisterInternalEvent then
42+
_G.GameEvent.UnregisterInternalEvent("EXPERIMENTAL_CVAR_CONFIRMATION_NEEDED")
43+
else
44+
UIParent:UnregisterEvent("EXPERIMENTAL_CVAR_CONFIRMATION_NEEDED")
5445
end
5546

5647
local function CreateTargetMacros()

CombatMode/UI/Changelog/ChangelogData.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ All notable changes to this project will be documented in this file.
1414
The format is based on [Keep a Changelog](https://keepachangelog.com/en/2.0.0/),
1515
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1616
17+
## [4.3.3] - 2026-08-20
18+
19+
### Fixed
20+
21+
- Fixed issue where upgrading items would cause a Lua error due to `StaticPopup_Show` hook + dismiss loop.
22+
1723
## [4.3.2] - 2026-08-20
1824
1925
### Fixed
@@ -367,7 +373,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
367373
368374
- Reticle Targeting blacklist not excluding spells from targeting macro injection, which broke Hold To Cast and empowered spell options (e.g. Hold & Release). Excluding a spell by name on the list now restores expected behavior.
369375
370-
[Unreleased]: https://github.com/djsmithdev/combatmode/compare/4.3.2...HEAD
376+
[Unreleased]: https://github.com/djsmithdev/combatmode/compare/4.3.3...HEAD
377+
[4.3.3]: https://github.com/djsmithdev/combatmode/compare/4.3.2...4.3.3
371378
[4.3.2]: https://github.com/djsmithdev/combatmode/compare/4.3.1...4.3.2
372379
[4.3.1]: https://github.com/djsmithdev/combatmode/compare/4.3.0...4.3.1
373380
[4.3.0]: https://github.com/djsmithdev/combatmode/compare/4.2.1...4.3.0

0 commit comments

Comments
 (0)