Example #1
0
  private void thinkPickUp() {
    if (_actor.isAllSkillsDisabled() || _actor.isCastingNow()) return;

    L2Object target = getTarget();
    if (checkTargetLost(target)) return;

    if (maybeMoveToPawn(target, 36)) return;

    setIntention(AI_INTENTION_IDLE);
    ((L2PcInstance.AIAccessor) _accessor).doPickupItem(target);
  }
Example #2
0
  private void thinkInteract() {
    if (_actor.isAllSkillsDisabled() || _actor.isCastingNow()) return;

    L2Object target = getTarget();
    if (checkTargetLost(target)) return;

    if (maybeMoveToPawn(target, 36)) return;

    if (!(target instanceof L2StaticObjectInstance))
      ((L2PcInstance.AIAccessor) _accessor).doInteract((L2Character) target);

    setIntention(AI_INTENTION_IDLE);
  }