Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. public static final void LeaveCS(final SeekableLittleEndianAccessor slea, final MapleClient c, final MapleCharacter chr) {
  2. final CashShopServer cs = CashShopServer.getInstance();
  3.  
  4. cs.getPlayerStorage().deregisterPlayer(chr);
  5.  
  6. c.updateLoginState(MapleClient.LOGIN_SERVER_TRANSITION, c.getSessionIPAddress());
  7.  
  8. try {
  9. final CashShopInterface wci = cs.getCSInterface();
  10.  
  11. wci.ChannelChange_Data(new CharacterTransfer(chr), chr.getId(), c.getChannel());
  12.  
  13. final String ip = wci.getChannelIP(c.getChannel());
  14. final String[] socket = ip.split(":");
  15. c.getSession().write(MaplePacketCreator.getChannelChange(InetAddress.getByName(socket[0]), Integer.parseInt(socket[1])));
  16.  
  17. } catch (RemoteException e) {
  18. c.getChannelServer().reconnectWorld();
  19. } catch (UnknownHostException e) {
  20. } finally {
  21. c.getSession().close();
  22.  
  23. chr.saveToDB(false, true);
  24. c.setPlayer(null);
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement