sendPacket(playerIU);
playerIU = null;
}
else
{
sendPacket(new ItemList(this, false));
}
// Update current load as well
StatusUpdate playerSU = new StatusUpdate(getObjectId());
playerSU.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad());
sendPacket(playerSU);
playerSU = null;
// Send target update packet
if(target instanceof PcInventory)
{
L2PcInstance targetPlayer = ((PcInventory) target).getOwner();
if(!Config.FORCE_INVENTORY_UPDATE)
{
InventoryUpdate playerIU = new InventoryUpdate();
if(newItem.getCount() > count)
{
playerIU.addModifiedItem(newItem);
}
else
{
playerIU.addNewItem(newItem);
}
targetPlayer.sendPacket(playerIU);
}
else
{
targetPlayer.sendPacket(new ItemList(targetPlayer, false));
}
// Update current load as well
playerSU = new StatusUpdate(targetPlayer.getObjectId());
playerSU.addAttribute(StatusUpdate.CUR_LOAD, targetPlayer.getCurrentLoad());