Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static final void LeaveCS(final SeekableLittleEndianAccessor slea, final MapleClient c, final MapleCharacter chr) {
- final CashShopServer cs = CashShopServer.getInstance();
- cs.getPlayerStorage().deregisterPlayer(chr);
- c.updateLoginState(MapleClient.LOGIN_SERVER_TRANSITION, c.getSessionIPAddress());
- try {
- final CashShopInterface wci = cs.getCSInterface();
- wci.ChannelChange_Data(new CharacterTransfer(chr), chr.getId(), c.getChannel());
- final String ip = wci.getChannelIP(c.getChannel());
- final String[] socket = ip.split(":");
- c.getSession().write(MaplePacketCreator.getChannelChange(InetAddress.getByName(socket[0]), Integer.parseInt(socket[1])));
- } catch (RemoteException e) {
- c.getChannelServer().reconnectWorld();
- } catch (UnknownHostException e) {
- } finally {
- c.getSession().close();
- chr.saveToDB(false, true);
- c.setPlayer(null);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement