diff --git a/Libs/LibOpenRaid/LibOpenRaid.lua b/Libs/LibOpenRaid/LibOpenRaid.lua index 6dafc9ed..fd25fcd2 100644 --- a/Libs/LibOpenRaid/LibOpenRaid.lua +++ b/Libs/LibOpenRaid/LibOpenRaid.lua @@ -31,7 +31,7 @@ LIB_OPEN_RAID_CAN_LOAD = false local major = "LibOpenRaid-1.0" -local CONST_LIB_VERSION = 137 +local CONST_LIB_VERSION = 138 if (LIB_OPEN_RAID_MAX_VERSION) then if (CONST_LIB_VERSION <= LIB_OPEN_RAID_MAX_VERSION) then @@ -534,10 +534,17 @@ end registeredUniqueTimers = {} } + local timersCanRunWithoutGroup = { + ["mainControl"] = { + ["updatePlayerData_Schedule"] = true + } + } + --run a scheduled function with its payload local triggerScheduledTick = function(tickerObject) local payload = tickerObject.payload local callback = tickerObject.callback + local bCanRunWithoutGroup = tickerObject.bCanRunWithoutGroup if (tickerObject.isUnique) then local namespace = tickerObject.namespace @@ -547,7 +554,9 @@ end --check if the player is still in group if (not openRaidLib.IsInGroup()) then - return + if (not bCanRunWithoutGroup) then + return + end end local result, errortext = xpcall(callback, geterrorhandler(), unpack(payload)) @@ -559,9 +568,10 @@ end end --create a new schedule - function openRaidLib.Schedules.NewTimer(time, callback, ...) + function openRaidLib.Schedules.NewTimer(time, callback, bCanRunWithoutGroup, ...) local payload = {...} local newTimer = C_Timer.NewTimer(time, triggerScheduledTick) + newTimer.bCanRunWithoutGroup = bCanRunWithoutGroup newTimer.payload = payload newTimer.callback = callback --newTimer.stack = debugstack() @@ -581,7 +591,9 @@ end openRaidLib.Schedules.CancelUniqueTimer(namespace, scheduleName) end - local newTimer = openRaidLib.Schedules.NewTimer(time, callback, ...) + local bCanRunWithoutGroup = timersCanRunWithoutGroup[namespace] and timersCanRunWithoutGroup[namespace][scheduleName] + + local newTimer = openRaidLib.Schedules.NewTimer(time, callback, bCanRunWithoutGroup, ...) newTimer.namespace = namespace newTimer.scheduleName = scheduleName --newTimer.stack = debugstack()