|
|
@ -21,12 +21,10 @@ import engine.net.DispatchMessage; |
|
|
|
import engine.net.client.ClientConnection; |
|
|
|
import engine.net.client.ClientConnection; |
|
|
|
import engine.net.client.msg.ClientNetMsg; |
|
|
|
import engine.net.client.msg.ClientNetMsg; |
|
|
|
import engine.net.client.msg.ErrorPopupMsg; |
|
|
|
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.BanishUnbanishMsg; |
|
|
|
import engine.net.client.msg.guild.GuildListMsg; |
|
|
|
import engine.net.client.msg.guild.GuildListMsg; |
|
|
|
import engine.objects.Guild; |
|
|
|
import engine.objects.*; |
|
|
|
import engine.objects.GuildHistory; |
|
|
|
|
|
|
|
import engine.objects.GuildStatusController; |
|
|
|
|
|
|
|
import engine.objects.PlayerCharacter; |
|
|
|
|
|
|
|
import org.joda.time.DateTime; |
|
|
|
import org.joda.time.DateTime; |
|
|
|
|
|
|
|
|
|
|
|
public class BanishUnbanishHandler extends AbstractClientMsgHandler { |
|
|
|
public class BanishUnbanishHandler extends AbstractClientMsgHandler { |
|
|
@ -117,8 +115,20 @@ public class BanishUnbanishHandler extends AbstractClientMsgHandler { |
|
|
|
GuildListMsg guildListMsg = new GuildListMsg(guild); |
|
|
|
GuildListMsg guildListMsg = new GuildListMsg(guild); |
|
|
|
dispatch = Dispatch.borrow(source, guildListMsg); |
|
|
|
dispatch = Dispatch.borrow(source, guildListMsg); |
|
|
|
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); |
|
|
|
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); |
|
|
|
if(GroupManager.getGroup(target) != null) |
|
|
|
if(GroupManager.getGroup(target) != null) { |
|
|
|
GroupManager.removeFromGroups(PlayerCharacter.getFromCache(target)); |
|
|
|
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 { |
|
|
|
} else { |
|
|
|
ErrorPopupMsg.sendErrorPopup(source, 103); // You may not banish this char
|
|
|
|
ErrorPopupMsg.sendErrorPopup(source, 103); // You may not banish this char
|
|
|
|
} |
|
|
|
} |
|
|
|