fixed use of "AceTimer:ScheduleTimer(callback, delay, arg)"

This commit is contained in:
telkar-rg
2025-08-01 13:59:24 +02:00
parent c7dd5efdb5
commit bf181351b8
2 changed files with 12 additions and 4 deletions
@@ -398,7 +398,10 @@ local function ScanKeyRing()
end end
-- *** Event Handlers *** -- *** Event Handlers ***
local function OnBagUpdate(event, bag) -- local function OnBagUpdate(event, bag)
local function OnBagUpdate(arg)
local bag = arg
FCSP_timer_table_OnBagUpdate[bag] = nil -- manual reset (safety redundancy) FCSP_timer_table_OnBagUpdate[bag] = nil -- manual reset (safety redundancy)
-- if bag < 0 then -- if bag < 0 then
@@ -428,7 +431,8 @@ local function FCSP_OnBagUpdate(event, bag)
end end
if FCSP_timer_table_OnBagUpdate[bag] then return end if FCSP_timer_table_OnBagUpdate[bag] then return end
FCSP_timer_table_OnBagUpdate[bag] = addon:ScheduleTimer(OnBagUpdate, 1, event, bag) -- FCSP_timer_table_OnBagUpdate[bag] = addon:ScheduleTimer(OnBagUpdate, 1, event, bag)
FCSP_timer_table_OnBagUpdate[bag] = addon:ScheduleTimer(OnBagUpdate, 1, bag)
end end
@@ -219,7 +219,10 @@ end
-- *** Event Handlers *** -- *** Event Handlers ***
local function OnBagUpdate(event, bag) -- local function OnBagUpdate(event, bag)
local function OnBagUpdate(arg)
local bag = arg
FCSP_timer_OnBagUpdate = nil -- manual reset (safety redundancy) FCSP_timer_OnBagUpdate = nil -- manual reset (safety redundancy)
if addon.isOpen then -- if a bag is updated while the mailbox is opened, this means an attachment has been taken. if addon.isOpen then -- if a bag is updated while the mailbox is opened, this means an attachment has been taken.
@@ -238,7 +241,8 @@ local function FCSP_OnBagUpdate(event, bag)
if addon.isOpen then -- if a bag is updated while the mailbox is opened, this means an attachment has been taken. if addon.isOpen then -- if a bag is updated while the mailbox is opened, this means an attachment has been taken.
if FCSP_timer_OnBagUpdate then return end if FCSP_timer_OnBagUpdate then return end
FCSP_timer_OnBagUpdate = addon:ScheduleTimer(OnBagUpdate, 1, event, bag) -- FCSP_timer_OnBagUpdate = addon:ScheduleTimer(OnBagUpdate, 1, event, bag)
FCSP_timer_OnBagUpdate = addon:ScheduleTimer(OnBagUpdate, 1, bag)
end end
end end