}
// Send inventory update packet
if (!Config.FORCE_INVENTORY_UPDATE)
{
InventoryUpdate playerIU = new InventoryUpdate();
if ((oldItem.getCount() > 0) && (oldItem != newItem))
{
playerIU.addModifiedItem(oldItem);
}
else
{
playerIU.addRemovedItem(oldItem);
}
sendPacket(playerIU);
}
else
{
sendPacket(new ItemList(this, false));
}
// Update current load as well
StatusUpdate playerSU = new StatusUpdate(getObjectId());
playerSU.addAttribute(StatusUpdate.CUR_LOAD, getCurrentLoad());
sendPacket(playerSU);
// 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