@ -21,12 +21,10 @@ import engine.net.DispatchMessage;
@@ -21,12 +21,10 @@ import engine.net.DispatchMessage;
import engine.net.client.ClientConnection ;
import engine.net.client.msg.ClientNetMsg ;
import engine.net.client.msg.ErrorPopupMsg ;
import engine.net.client.msg.group.GroupUpdateMsg ;
import engine.net.client.msg.guild.BanishUnbanishMsg ;
import engine.net.client.msg.guild.GuildListMsg ;
import engine.objects.Guild ;
import engine.objects.GuildHistory ;
import engine.objects.GuildStatusController ;
import engine.objects.PlayerCharacter ;
import engine.objects.* ;
import org.joda.time.DateTime ;
public class BanishUnbanishHandler extends AbstractClientMsgHandler {
@ -117,8 +115,20 @@ public class BanishUnbanishHandler extends AbstractClientMsgHandler {
@@ -117,8 +115,20 @@ 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 ) ) ;
if ( GroupManager . getGroup ( target ) ! = null ) {
Group group = GroupManager . getGroup ( target ) ;
group . removeGroupMember ( PlayerCharacter . getPlayerCharacter ( target ) ) ;
GroupManager . removeFromGroups ( PlayerCharacter . getPlayerCharacter ( target ) ) ;
GroupUpdateMsg gim ;
gim = new GroupUpdateMsg ( ) ;
gim . setGroup ( group ) ;
gim . setMessageType ( 3 ) ;
gim . setPlayer ( PlayerCharacter . getPlayerCharacter ( target ) ) ;
group . sendUpdate ( gim ) ;
String text = PlayerCharacter . getPlayerCharacter ( target ) . getFirstName ( ) + " has left your group." ;
ChatManager . chatGroupInfo ( source , text ) ;
}
} else {
ErrorPopupMsg . sendErrorPopup ( source , 103 ) ; // You may not banish this char
}