}
int invCount = save.getInvCount();
packet.addShort(invCount);
for (int i = 0; i < invCount; i++) {
InvItem item = save.getInvItem(i);
packet.addShort(item.getID());
packet.addInt(item.getAmount());
packet.addByte((byte) (item.isWielded() ? 1 : 0));
}
int bankCount = save.getBankCount();
packet.addShort(bankCount);
for (int i = 0; i < bankCount; i++) {
BankItem item = save.getBankItem(i);
packet.addShort(item.getID());
packet.addInt(item.getAmount());
}
int friendCount = save.getFriendCount();
packet.addShort(friendCount);
for (int i = 0; i < friendCount; i++) {