11
22local major = " LibRaidStatus-1.0"
3- local CONST_LIB_VERSION = 14
3+ local CONST_LIB_VERSION = 15
44LIB_RAID_STATUS_CAN_LOAD = false
55
66-- declae the library within the LibStub
@@ -14,7 +14,6 @@ LIB_RAID_STATUS_CAN_LOAD = false
1414
1515-- default values
1616 raidStatusLib .inGroup = false
17- raidStatusLib .CanReceiveComms = false
1817
1918 -- print failures (when the function return an error) results to chat
2019 local CONST_DIAGNOSTIC_ERRORS = false
@@ -128,7 +127,7 @@ LIB_RAID_STATUS_CAN_LOAD = false
128127
129128 -- return true if the lib is allowed to receive comms from other players
130129 function raidStatusLib .IsCommAllowed ()
131- return raidStatusLib . CanReceiveComms
130+ return IsInGroup () or IsInRaid ()
132131 end
133132
134133 -- stract some indexes of a table
@@ -497,7 +496,7 @@ LIB_RAID_STATUS_CAN_LOAD = false
497496 -- the group has changed, trigger a long timer to send full data
498497 -- as the timer is unique, a new change to the group will replace and refresh the time
499498 -- using random time, players won't trigger all at the same time
500- local randomTime = 4 .0 + math.random (1.0 , 4 .5 )
499+ local randomTime = 1 .0 + math.random (1.0 , 5 .5 )
501500 raidStatusLib .Schedules .NewUniqueTimer (randomTime , raidStatusLib .mainControl .SendFullData , " mainControl" , " sendFullData_Schedule" )
502501 end
503502 end ,
@@ -581,15 +580,13 @@ LIB_RAID_STATUS_CAN_LOAD = false
581580 -- the game client is fully loadded and all information is available
582581 if (raidStatusLib .IsInGroup ()) then
583582 raidStatusLib .Schedules .NewUniqueTimer (1.0 , raidStatusLib .mainControl .SendFullData , " mainControl" , " sendFullData_Schedule" )
584- raidStatusLib .CanReceiveComms = true
585583 end
586584 end
587585
588586 raidStatusLib .mainControl .OnEnterGroup = function ()
589587 -- the player entered in a group
590588 -- schedule to send data
591589 raidStatusLib .Schedules .NewUniqueTimer (1.0 , raidStatusLib .mainControl .SendFullData , " mainControl" , " sendFullData_Schedule" )
592- raidStatusLib .CanReceiveComms = true
593590 end
594591
595592 raidStatusLib .mainControl .OnLeftGroup = function ()
@@ -603,7 +600,6 @@ LIB_RAID_STATUS_CAN_LOAD = false
603600 table .wipe (raidStatusLib .mainControl .playerAliveStatus )
604601
605602 -- toggle off comms
606- raidStatusLib .CanReceiveComms = false
607603 end
608604
609605 raidStatusLib .mainControl .OnPlayerDeath = function ()
0 commit comments