Ejemplo n.º 1
0
 public static final void updateCCards(LittleEndianAccessor slea, MapleClient c) {
   if ((slea.available() != 36) || (!c.isLoggedIn())) {
     c.getSession().close(true);
     return;
   }
   Map<Integer, Integer> cids = new LinkedHashMap();
   for (int i = 1; i <= 9; i++) {
     int charId = slea.readInt();
     if (((!c.login_Auth(charId)) && (charId != 0))
         || (ChannelServer.getInstance(c.getChannel()) == null)
         || (c.getWorld() != 0)) {
       c.getSession().close(true);
       return;
     }
     cids.put(Integer.valueOf(i), Integer.valueOf(charId));
   }
   c.updateCharacterCards(cids);
 }
Ejemplo n.º 2
0
 public static final void updateCCards(final LittleEndianAccessor slea, final MapleClient c) {
   if (slea.available() != 24 || !c.isLoggedIn()) {
     c.getSession().close();
     return;
   }
   final Map<Integer, Integer> cids = new LinkedHashMap<>();
   for (int i = 1; i <= 6; i++) { // 6 chars
     final int charId = slea.readInt();
     if ((!c.login_Auth(charId) && charId != 0)
         || ChannelServer.getInstance(c.getChannel()) == null
         || c.getWorld() != 0) {
       c.getSession().close();
       return;
     }
     cids.put(i, charId);
   }
   c.updateCharacterCards(cids);
 }