|
44 | 44 |
|
45 | 45 | local major = "LibOpenRaid-1.0"
|
46 | 46 |
|
47 |
| -local CONST_LIB_VERSION = 137 |
| 47 | +local CONST_LIB_VERSION = 138 |
48 | 48 |
|
49 | 49 | if (LIB_OPEN_RAID_MAX_VERSION) then
|
50 | 50 | if (CONST_LIB_VERSION <= LIB_OPEN_RAID_MAX_VERSION) then
|
@@ -585,10 +585,17 @@ end
|
585 | 585 | registeredUniqueTimers = {}
|
586 | 586 | }
|
587 | 587 |
|
| 588 | + local timersCanRunWithoutGroup = { |
| 589 | + ["mainControl"] = { |
| 590 | + ["updatePlayerData_Schedule"] = true |
| 591 | + } |
| 592 | + } |
| 593 | + |
588 | 594 | --run a scheduled function with its payload
|
589 | 595 | local triggerScheduledTick = function(tickerObject)
|
590 | 596 | local payload = tickerObject.payload
|
591 | 597 | local callback = tickerObject.callback
|
| 598 | + local bCanRunWithoutGroup = tickerObject.bCanRunWithoutGroup |
592 | 599 |
|
593 | 600 | if (tickerObject.isUnique) then
|
594 | 601 | local namespace = tickerObject.namespace
|
|
598 | 605 |
|
599 | 606 | --check if the player is still in group
|
600 | 607 | if (not openRaidLib.IsInGroup()) then
|
601 |
| - return |
| 608 | + if (not bCanRunWithoutGroup) then |
| 609 | + return |
| 610 | + end |
602 | 611 | end
|
603 | 612 |
|
604 | 613 | local result, errortext = xpcall(callback, geterrorhandler(), unpack(payload))
|
|
610 | 619 | end
|
611 | 620 |
|
612 | 621 | --create a new schedule
|
613 |
| - function openRaidLib.Schedules.NewTimer(time, callback, ...) |
| 622 | + function openRaidLib.Schedules.NewTimer(time, callback, bCanRunWithoutGroup, ...) |
614 | 623 | local payload = {...}
|
615 | 624 | local newTimer = C_Timer.NewTimer(time, triggerScheduledTick)
|
| 625 | + newTimer.bCanRunWithoutGroup = bCanRunWithoutGroup |
616 | 626 | newTimer.payload = payload
|
617 | 627 | newTimer.callback = callback
|
618 | 628 | --newTimer.stack = debugstack()
|
|
632 | 642 | openRaidLib.Schedules.CancelUniqueTimer(namespace, scheduleName)
|
633 | 643 | end
|
634 | 644 |
|
635 |
| - local newTimer = openRaidLib.Schedules.NewTimer(time, callback, ...) |
| 645 | + local bCanRunWithoutGroup = timersCanRunWithoutGroup[namespace] and timersCanRunWithoutGroup[namespace][scheduleName] |
| 646 | + |
| 647 | + local newTimer = openRaidLib.Schedules.NewTimer(time, callback, bCanRunWithoutGroup, ...) |
636 | 648 | newTimer.namespace = namespace
|
637 | 649 | newTimer.scheduleName = scheduleName
|
638 | 650 | --newTimer.stack = debugstack()
|
|
0 commit comments