Skip to content

Commit 3e47244

Browse files
committed
fix: #2311 error caused by IconModule_IconEventConditionHandler enabling unconditionally
1 parent db93aae commit 3e47244

File tree

7 files changed

+47
-43
lines changed

7 files changed

+47
-43
lines changed

.vscode/settings.json

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,41 @@
238238
"LE_REALM_RELATION_COALESCED",
239239
"ERR_PETITION_NOT_SAME_SERVER",
240240
"GetUnitName",
241-
"GENERAL"
241+
"GENERAL",
242+
"LOSS_OF_CONTROL_DISPLAY_BANISH",
243+
"LOSS_OF_CONTROL_DISPLAY_CHARM",
244+
"LOSS_OF_CONTROL_DISPLAY_CYCLONE",
245+
"LOSS_OF_CONTROL_DISPLAY_DISARM",
246+
"LOSS_OF_CONTROL_DISPLAY_DISORIENT",
247+
"LOSS_OF_CONTROL_DISPLAY_DISTRACT",
248+
"LOSS_OF_CONTROL_DISPLAY_FREEZE",
249+
"LOSS_OF_CONTROL_DISPLAY_HORROR",
250+
"LOSS_OF_CONTROL_DISPLAY_INCAPACITATE",
251+
"LOSS_OF_CONTROL_DISPLAY_INTERRUPT",
252+
"LOSS_OF_CONTROL_DISPLAY_INVULNERABILITY",
253+
"LOSS_OF_CONTROL_DISPLAY_MAGICAL_IMMUNITY",
254+
"LOSS_OF_CONTROL_DISPLAY_PACIFY",
255+
"LOSS_OF_CONTROL_DISPLAY_PACIFYSILENCE",
256+
"LOSS_OF_CONTROL_DISPLAY_POLYMORPH",
257+
"LOSS_OF_CONTROL_DISPLAY_POSSESS",
258+
"LOSS_OF_CONTROL_DISPLAY_SAP",
259+
"LOSS_OF_CONTROL_DISPLAY_SHACKLE_UNDEAD",
260+
"LOSS_OF_CONTROL_DISPLAY_SLEEP",
261+
"LOSS_OF_CONTROL_DISPLAY_TURN_UNDEAD",
262+
"LOSS_OF_CONTROL_DISPLAY_ROOT",
263+
"LOSS_OF_CONTROL_DISPLAY_CONFUSE",
264+
"LOSS_OF_CONTROL_DISPLAY_STUN",
265+
"LOSS_OF_CONTROL_DISPLAY_SILENCE",
266+
"LOSS_OF_CONTROL_DISPLAY_FEAR",
267+
"SPELL_SCHOOL0_CAP",
268+
"SPELL_SCHOOL1_CAP",
269+
"SPELL_SCHOOL2_CAP",
270+
"SPELL_SCHOOL3_CAP",
271+
"SPELL_SCHOOL4_CAP",
272+
"SPELL_SCHOOL5_CAP",
273+
"SPELL_SCHOOL6_CAP",
274+
"LOSS_OF_CONTROL_DISPLAY_INTERRUPT_SCHOOL",
275+
"CallErrorHandler"
242276
],
243277
"Lua.type.weakUnionCheck": true
244278
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v11.2.9
2+
* Fix: #2311 error caused by IconModule_IconEventConditionHandler enabling unconditionally
3+
14
## v11.2.8
25
* Fix #2310 spec checking broken below level 10 on Classic Era.
36

Components/Core/IconView.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,9 @@ IconView:ImplementsModule("GroupModule_GroupPosition", 1, true)
352352
IconView:ImplementsModule("GroupModule_Alpha", 1.5, true)
353353

354354
IconView:ImplementsModule("IconModule_Self", 0, true)
355-
IconView:ImplementsModule("IconModule_IconEventClickHandler", 2, true)
355+
IconView:ImplementsModule("IconModule_IconEventClickHandler", 2, nil)
356356
IconView:ImplementsModule("IconModule_IconEventOtherShowHideHandler", 2.5, true)
357-
IconView:ImplementsModule("IconModule_IconEventConditionHandler", 2.7, true)
357+
IconView:ImplementsModule("IconModule_IconEventConditionHandler", 2.7, nil)
358358
IconView:ImplementsModule("IconModule_RecieveSpellDrags", 3, true)
359359
IconView:ImplementsModule("IconModule_IconDragger", 4, true)
360360
IconView:ImplementsModule("IconModule_GroupMover", 5, true)

Components/IconModules/IconModule_IconEventConditionHandler/IconEventConditionHandler.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ local print = TMW.print
2020
local UpdateManager = TMW.Classes.UpdateTableManager:New()
2121
UpdateManager:UpdateTable_Set()
2222
local ByConditionObject = UpdateManager:UpdateTable_CreateIndexedView("ByConditionObject", function(target) return target.ConditionObject end)
23-
local ByEventSettingsProxy = UpdateManager:UpdateTable_CreateIndexedView("ByEventSettingsProxy", function(target) return target.eventSettingsProxy end)
2423
local ByIcon = UpdateManager:UpdateTable_CreateIndexedView("ByIcon", function(target) return target.icon end)
2524

2625
local Module = TMW:NewClass("IconModule_IconEventConditionHandler", "IconModule")

Options/CHANGELOG.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ if not TMW then return end
33
TMW.CHANGELOG_LASTVER="10.0.0"
44

55
TMW.CHANGELOG = [==[
6+
## v11.2.9
7+
* Fix: #2311 error caused by IconModule_IconEventConditionHandler enabling unconditionally
8+
69
## v11.2.8
710
* Fix #2310 spec checking broken below level 10 on Classic Era.
811

TellMeWhen.lua

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -515,49 +515,14 @@ local print = TMW.print
515515

516516

517517
do -- TMW.safecall
518-
--[[
519-
xpcall safecall implementation
520-
]]
521518
local xpcall = xpcall
522519

523-
local function errorhandler(err)
524-
return geterrorhandler()(err)
525-
end
526-
527-
local function CreateDispatcher(argCount)
528-
local code = [[
529-
local xpcall, eh = ...
530-
local method, ARGS
531-
local function call() return method(ARGS) end
532-
533-
local function dispatch(func, ...)
534-
method = func
535-
if not method then return end
536-
ARGS = ...
537-
return xpcall(call, eh)
538-
end
539-
540-
return dispatch
541-
]]
542-
543-
local ARGS = {}
544-
for i = 1, argCount do ARGS[i] = "arg"..i end
545-
ARGS = table.concat(ARGS, ", ")
546-
code = code:gsub("ARGS", ARGS)
547-
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
548-
end
549-
550-
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
551-
local dispatcher = CreateDispatcher(argCount)
552-
rawset(self, argCount, dispatcher)
553-
return dispatcher
554-
end})
555-
Dispatchers[0] = function(func)
556-
return xpcall(func, errorhandler)
520+
local errorhandler = _G.CallErrorHandler or function(...)
521+
return geterrorhandler()(...)
557522
end
558523

559524
function TMW.safecall(func, ...)
560-
return Dispatchers[select('#', ...)](func, ...)
525+
return xpcall(func, errorhandler, ...)
561526
end
562527
end
563528
local safecall = TMW.safecall

TellMeWhen.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
## X-WoWI-ID: 10855
1919
## X-Wago-ID: ZQ6aZqKW
2020

21-
## Version: 11.2.8
21+
## Version: 11.2.9
2222
## Author: Cybeloras of Aerie Peak
2323
## IconTexture: Interface\Addons\TellMeWhen\Textures\LDB Icon
2424
## AddonCompartmentFunc: TellMeWhen_OnAddonCompartmentClick

0 commit comments

Comments
 (0)