Core/Players: Remove player from group on faction change if two side interaction group is not allowed.
Port From (https://github.com/TrinityCore/TrinityCore/commit/f108a50abf82abd0973878ef88fdab47a408238c)
This commit is contained in:
@@ -1761,6 +1761,7 @@ namespace Game
|
||||
|
||||
AtLoginFlags atLoginFlags = (AtLoginFlags)result.Read<ushort>(0);
|
||||
string knownTitlesStr = result.Read<string>(1);
|
||||
uint groupId = !result.IsNull(2) ? result.Read<uint>(2) : 0;
|
||||
|
||||
AtLoginFlags usedLoginFlag = (factionChangeInfo.FactionChange ? AtLoginFlags.ChangeFaction : AtLoginFlags.ChangeRace);
|
||||
if (!atLoginFlags.HasAnyFlag(usedLoginFlag))
|
||||
@@ -1989,6 +1990,13 @@ namespace Game
|
||||
Player.LeaveAllArenaTeams(factionChangeInfo.Guid);
|
||||
}
|
||||
|
||||
if (groupId != 0 && !WorldConfig.GetBoolValue(WorldCfg.AllowTwoSideInteractionGroup))
|
||||
{
|
||||
Group group = Global.GroupMgr.GetGroupByDbStoreId(groupId);
|
||||
if (group != null)
|
||||
group.RemoveMember(factionChangeInfo.Guid);
|
||||
}
|
||||
|
||||
if (!HasPermission(RBACPermissions.TwoSideAddFriend))
|
||||
{
|
||||
// Delete Friend List
|
||||
|
||||
Reference in New Issue
Block a user