Package net.sf.l2j.gameserver.model.actor.instance

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PetInstance


    if(getClient().getActiveChar().getPet() instanceof L2SummonInstance)
    {
      sendPacket(new ActionFailed());
      return;
    }
    L2PetInstance pet = (L2PetInstance)getClient().getActiveChar().getPet();
    if (pet == null || pet.isDead() || pet.isOutOfControl())
    {
      sendPacket(new ActionFailed());
      return;
    }
    pet.getAI().setIntention(CtrlIntention.AI_INTENTION_PICK_UP, item);
  }
View Full Code Here


  @Override
  protected void runImpl()
  {
    L2PcInstance player = getClient().getActiveChar();
        if (player == null || player.getPet() == null || !(player.getPet() instanceof L2PetInstance)) return;
        L2PetInstance pet = (L2PetInstance)player.getPet();

        if(_amount < 0)
        {
          Util.handleIllegalPlayerAction(player,"[RequestGetItemFromPet] count < 0! ban! oid: "+_objectId+" owner: "+player.getName(),Config.DEFAULT_PUNISH);
          return;
        }
        else if(_amount == 0)
          return;

    if (pet.transferItem("Transfer", _objectId, _amount, player.getInventory(), player, pet) == null)
    {
      _log.warning("Invalid item transfer request: " + pet.getName() + "(pet) --> " + player.getName());
    }
  }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.model.actor.instance.L2PetInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.