Core/Groups: Fixes groups staying linked with players.

This commit is contained in:
Hondacrx
2025-09-02 22:43:56 -04:00
parent 6531cd9dc1
commit 3d23a9f162
34 changed files with 385 additions and 402 deletions
+5 -5
View File
@@ -147,6 +147,9 @@ namespace Game.Entities
WorldMgr.DecreasePlayerCount();
m_group.Dispose();
m_originalGroup.Dispose();
base.Dispose();
}
@@ -7531,12 +7534,9 @@ namespace Game.Entities
Group group = GetGroup();
if (group != null)
{
for (GroupReference refe = group.GetFirstMember(); refe != null; refe = refe.Next())
foreach (GroupReference groupRef in group.GetMembers())
{
Player player = refe.GetSource();
if (player == null)
continue;
Player player = groupRef.GetSource();
if (!player.IsAtRecruitAFriendDistance(this))
continue; // member (alive or dead) or his corpse at req. distance