Package com.l2jfrozen.gameserver.ai

Examples of com.l2jfrozen.gameserver.ai.L2CharacterAI


    {
      synchronized (this)
      {
        if(_ai == null)
        {
          _ai = new L2CharacterAI(new AIAccessor());
        }
      }
    }

    return _ai;
View Full Code Here


   *
   * @param newAI the new aI
   */
  public void setAI(L2CharacterAI newAI)
  {
    L2CharacterAI oldAI = getAI();

    if(oldAI != null && oldAI != newAI && oldAI instanceof L2AttackableAI)
    {
      ((L2AttackableAI) oldAI).stopAITask();
    }
View Full Code Here

    // Set the L2Attackable Intention to AI_INTENTION_IDLE
    Collection<L2PcInstance> known = getKnownPlayers().values();

    //FIXME: This is a temporary solution
    L2CharacterAI ai = getActiveChar().getAI();
    if(ai != null && (known == null || known.isEmpty()))
    {
      ai.setIntention(CtrlIntention.AI_INTENTION_IDLE);
    }

    ai = null;

    return true;
View Full Code Here

    // Check if the _aggroList of the L2GuardInstance is Empty
    if(getActiveChar().noTarget())
    {
      // removeAllKnownObjects();
      // Set the L2GuardInstance to AI_INTENTION_IDLE
      L2CharacterAI ai = getActiveChar().getAI();
      if(ai != null)
      {
        ai.setIntention(CtrlIntention.AI_INTENTION_IDLE, null);
      }
    }

    return true;
  }
View Full Code Here

    if(getActiveChar().noTarget())
    {
      //removeAllKnownObjects();

      // Set the L2GuardInstance to AI_INTENTION_IDLE
      L2CharacterAI ai = getActiveChar().getAI();
      if(ai != null)
      {
        ai.setIntention(CtrlIntention.AI_INTENTION_IDLE, null);
      }

      ai = null;
    }
View Full Code Here

      if(object instanceof L2Character)
      {
        // Update the state of the L2Character object client side by sending Server->Client packet MoveToPawn/CharMoveToLocation and AutoAttackStart to the L2PcInstance
        L2Character obj = (L2Character) object;

        L2CharacterAI obj_ai = obj.getAI();
        if(obj_ai != null)
        {
          obj_ai.describeStateToPlayer(active_char);
        }

        obj = null;
      }
    }
View Full Code Here

  }

  @Override
  public L2CharacterAI getAI()
  {
    L2CharacterAI ai = _ai; // copy handle
    if(ai == null)
    {
      synchronized (this)
      {
        if(_ai == null)
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.ai.L2CharacterAI

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.