public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { int itemId = slea.readInt(); if (c.getPlayer().getInventory(MapleInventoryType.SETUP).findById(itemId) == null) { return; } c.getPlayer().setChair(itemId); c.getPlayer() .getMap() .broadcastMessage( c.getPlayer(), MaplePacketCreator.showChair(c.getPlayer().getId(), itemId), false); c.announce(MaplePacketCreator.enableActions()); }
@Override public final void handlePacket(SeekableLittleEndianAccessor slea, MapleClient c) { int id = slea.readShort(); if (id == -1) { // Cancel Chair c.getPlayer().setChair(0); c.announce(MaplePacketCreator.cancelChair(-1)); c.getPlayer() .getMap() .broadcastMessage( c.getPlayer(), MaplePacketCreator.showChair(c.getPlayer().getId(), 0), false); } else { // Use In-Map Chair c.getPlayer().setChair(id); c.announce(MaplePacketCreator.cancelChair(id)); } }