@Override public void processPacket(Player player, int packetType, int packetSize) { int somejunk = player.getInStream().readUnsignedWordA(); // junk int itemFrom = player.getInStream().readUnsignedWordA(); // slot1 int itemTo = (player.getInStream().readUnsignedWordA() - 128); // slot2 // c.sendMessage("junk: " + somejunk); player.getItems().moveItems(itemFrom, itemTo, somejunk); }
@Override public void processPacket(Player player, int packetType, int packetSize) { /* * a = ? * b = ? */ @SuppressWarnings("unused") int a = player.getInStream().readUnsignedWord(); int objectId = player.getInStream().readSignedWordBigEndian(); int objectY = player.getInStream().readSignedWordBigEndianA(); @SuppressWarnings("unused") int b = player.getInStream().readUnsignedWord(); int objectX = player.getInStream().readSignedWordBigEndianA(); int itemId = player.getInStream().readUnsignedWord(); UseItem.ItemonObject(player, objectId, objectX, objectY, itemId); }