being banished form guild will remove you from any groups

This commit is contained in:
2024-04-18 13:24:06 -05:00
parent 8308ac97e3
commit 7c2915928d
@@ -14,6 +14,7 @@ import engine.Enum.GuildHistoryType;
import engine.exception.MsgSendException;
import engine.gameManager.ChatManager;
import engine.gameManager.DbManager;
import engine.gameManager.GroupManager;
import engine.gameManager.SessionManager;
import engine.net.Dispatch;
import engine.net.DispatchMessage;
@@ -116,6 +117,8 @@ public class BanishUnbanishHandler extends AbstractClientMsgHandler {
GuildListMsg guildListMsg = new GuildListMsg(guild);
dispatch = Dispatch.borrow(source, guildListMsg);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
if(GroupManager.getGroup(target) != null)
GroupManager.removeFromGroups(PlayerCharacter.getFromCache(target));
} else {
ErrorPopupMsg.sendErrorPopup(source, 103); // You may not banish this char
}