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
+4 -6
View File
@@ -127,18 +127,16 @@ namespace Game.Chat
string nameLink = handler.GetNameLink(target);
Group grp = target.GetGroup();
if (grp == null)
Group group = target.GetGroup();
if (group == null)
{
handler.SendSysMessage(CypherStrings.NotInGroup, nameLink);
return false;
}
for (GroupReference refe = grp.GetFirstMember(); refe != null; refe = refe.Next())
foreach (GroupReference groupRef in group.GetMembers())
{
Player player = refe.GetSource();
if (player == null || player.GetSession() == null)
continue;
Player player = groupRef.GetSource();
// check online security
if (handler.HasLowerSecurity(player, ObjectGuid.Empty))