Core/Group: implement automatic party/raid leader change when the leader has been offline for two minutes
Port From (https://github.com/TrinityCore/TrinityCore/commit/cc141e9bad5dc06a56179f820670bd6944651804)
This commit is contained in:
@@ -89,6 +89,12 @@ namespace Game.Groups
|
||||
return GroupStore.LookupByKey(groupId.GetCounter());
|
||||
}
|
||||
|
||||
public void Update(uint diff)
|
||||
{
|
||||
foreach (var group in GroupStore.Values)
|
||||
group.Update(diff);
|
||||
}
|
||||
|
||||
public void AddGroup(Group group)
|
||||
{
|
||||
GroupStore[group.GetGUID().GetCounter()] = group;
|
||||
@@ -222,15 +228,6 @@ namespace Game.Groups
|
||||
}
|
||||
}
|
||||
|
||||
public void Update(uint diff)
|
||||
{
|
||||
foreach (var group in GroupStore.Values)
|
||||
{
|
||||
if (group)
|
||||
group.Update(diff);
|
||||
}
|
||||
}
|
||||
|
||||
Dictionary<ulong, Group> GroupStore = new();
|
||||
Dictionary<uint, Group> GroupDbStore = new();
|
||||
ulong NextGroupId;
|
||||
|
||||
Reference in New Issue
Block a user