From 8308ac97e314669f3fdfbe1097ea471807dcdea4 Mon Sep 17 00:00:00 2001 From: fatboy Date: Thu, 18 Apr 2024 13:22:07 -0500 Subject: [PATCH] leaving guild will remove you from groups you are in --- src/engine/net/client/handlers/LeaveGuildHandler.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/engine/net/client/handlers/LeaveGuildHandler.java b/src/engine/net/client/handlers/LeaveGuildHandler.java index 0483469e..ab9d7d2e 100644 --- a/src/engine/net/client/handlers/LeaveGuildHandler.java +++ b/src/engine/net/client/handlers/LeaveGuildHandler.java @@ -12,16 +12,14 @@ package engine.net.client.handlers; import engine.Enum.GuildHistoryType; import engine.exception.MsgSendException; import engine.gameManager.ChatManager; +import engine.gameManager.GroupManager; import engine.gameManager.SessionManager; import engine.net.Dispatch; import engine.net.DispatchMessage; import engine.net.client.ClientConnection; import engine.net.client.msg.ClientNetMsg; import engine.net.client.msg.guild.LeaveGuildMsg; -import engine.objects.Guild; -import engine.objects.GuildStatusController; -import engine.objects.Mine; -import engine.objects.PlayerCharacter; +import engine.objects.*; public class LeaveGuildHandler extends AbstractClientMsgHandler { @@ -61,6 +59,9 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler { return true; } + if(GroupManager.getGroup(playerCharacter) != null) + GroupManager.removeFromGroups(playerCharacter); + // Send left guild message to rest of guild ChatManager.chatGuildInfo(oldGuild, playerCharacter.getFirstName() + " has left the guild.");