}
if(_amount >= playerItem.getCount())
{
playerInventory.dropItem(_objectId, playerItem.getCount(), false);
playerItem.setCustomFlags(playerItem.getCustomFlags() | L2ItemInstance.FLAG_PET_EQUIPPED, true);
petInventory.addItem(playerItem);
}
else
{
L2ItemInstance newPetItem = playerInventory.dropItem(_objectId, _amount, false);
petInventory.addItem(newPetItem);