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.");