Groups now only disband if all members reject the invitation (as opposed to if any member rejects the invitation).

Port From (https://github.com/TrinityCore/TrinityCore/commit/e3077813d5bf4521fff8be3ea24db231ed00c02f)
This commit is contained in:
hondacrx
2020-07-24 16:22:17 -04:00
parent 13cf935ca7
commit d389faabe7
2 changed files with 7 additions and 3 deletions
+6 -3
View File
@@ -253,11 +253,14 @@ namespace Game.Entities
group.RemoveInvite(this);
if (group.GetMembersCount() <= 1) // group has just 1 member => disband
if (group.IsCreated())
{
if (group.IsCreated())
if (group.GetMembersCount() <= 1) // group has just 1 member => disband
group.Disband(true);
else
}
else
{
if (group.GetInviteeCount() <= 1)
group.RemoveAllInvites();
}
}
+1
View File
@@ -2586,6 +2586,7 @@ namespace Game.Groups
public List<MemberSlot> GetMemberSlots() { return m_memberSlots; }
public GroupReference GetFirstMember() { return (GroupReference)m_memberMgr.GetFirst(); }
public uint GetMembersCount() { return (uint)m_memberSlots.Count; }
public uint GetInviteeCount() { return (uint)m_invitees.Count; }
public GroupFlags GetGroupFlags() { return m_groupFlags; }
bool IsReadyCheckStarted() { return m_readyCheckStarted; }