{
player.sendMessage("You get items from pet too fast.");
return;
}
L2PetInstance pet = (L2PetInstance) player.getPet();
if(player.getActiveEnchantItem() != null)
{
Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " Tried To Use Enchant Exploit , And Got Banned!", IllegalPlayerAction.PUNISH_KICKBAN);
return;
}
if(_amount < 0)
{
player.setAccessLevel(-1);
Util.handleIllegalPlayerAction(player, "[RequestGetItemFromPet] count < 0! ban! oid: " + _objectId + " owner: " + player.getName(), Config.DEFAULT_PUNISH);
return;
}
else if(_amount == 0)
return;
if(player.getDistanceSq(pet) > 40000) // 200*200
{
player.sendPacket(new SystemMessage(SystemMessageId.TARGET_TOO_FAR));
sendPacket(ActionFailed.STATIC_PACKET);
return;
}
if(pet.transferItem("Transfer", _objectId, _amount, player.getInventory(), player, pet) == null)
{
_log.warning("Invalid item transfer request: " + pet.getName() + "(pet) --> " + player.getName());
}
player.sendPacket(new ItemList(player, true));
}