Examples of Playable


Examples of lineage2.gameserver.model.Playable

    ClanHallSiegeEvent siegeEvent = getEvent(ClanHallSiegeEvent.class);
    Player temp = null;
    Map<Player, Integer> damageMap = new HashMap<>();
    for (AggroList.HateInfo info : getAggroList().getPlayableMap().values())
    {
      Playable killer = (Playable) info.attacker;
      int damage = info.damage;
      if (killer.isPet() || killer.isServitor())
      {
        temp = killer.getPlayer();
      }
      else if (killer.isPlayer())
      {
        temp = (Player) killer;
      }
      if ((temp == null) || (siegeEvent.getSiegeClan(SiegeEvent.ATTACKERS, temp.getClan()) == null))
      {
View Full Code Here

Examples of lineage2.gameserver.model.Playable

  {
    Player temp = null;
    Map<Player, Integer> damageMap = new HashMap<>();
    for (AggroList.HateInfo info : getAggroList().getPlayableMap().values())
    {
      Playable killer = (Playable) info.attacker;
      int damage = info.damage;
      if (killer.isPet() || killer.isServitor())
      {
        temp = killer.getPlayer();
      }
      else if (killer.isPlayer())
      {
        temp = (Player) killer;
      }
      if ((temp == null) || (temp.getClan() == null) || (temp.getClan().getHasHideout() > 0))
      {
View Full Code Here

Examples of lineage2.gameserver.model.Playable

    ClanHallSiegeEvent siegeEvent = getEvent(ClanHallSiegeEvent.class);
    Player temp = null;
    Map<Player, Integer> damageMap = new HashMap<>();
    for (AggroList.HateInfo info : getAggroList().getPlayableMap().values())
    {
      Playable killer = (Playable) info.attacker;
      int damage = info.damage;
      if (killer.isPet() || killer.isServitor())
      {
        temp = killer.getPlayer();
      }
      else if (killer.isPlayer())
      {
        temp = (Player) killer;
      }
      if ((temp == null) || (siegeEvent.getSiegeClan(SiegeEvent.ATTACKERS, temp.getClan()) == null))
      {
View Full Code Here

Examples of lineage2.gameserver.model.Playable

    RestorationInfo restorationInfo = RestorationInfoHolder.getInstance().getRestorationInfo(this);
    if (restorationInfo == null)
    {
      return;
    }
    Playable playable = (Playable)activeChar;
    int itemConsumeId = restorationInfo.getItemConsumeId();
    int itemConsumeCount = restorationInfo.getItemConsumeCount();
    if ((itemConsumeId > 0) && (itemConsumeCount > 0))
    {
      if (ItemFunctions.getItemCount(playable, itemConsumeId) < itemConsumeCount)
      {
        playable.sendPacket(SystemMsg.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL);
        return;
      }

      ItemFunctions.removeItem(playable, itemConsumeId, itemConsumeCount, true);
    }
View Full Code Here

Examples of lineage2.gameserver.model.Playable

    nextAction nextAction = _nextAction;
    Object nextAction_arg0 = _nextAction_arg0;
    Object nextAction_arg1 = _nextAction_arg1;
    boolean nextAction_arg2 = _nextAction_arg2;
    boolean nextAction_arg3 = _nextAction_arg3;
    Playable actor = getActor();
    if ((nextAction == null) || actor.isActionsDisabled())
    {
      return false;
    }
    Skill skill;
    Creature target;
    GameObject object;
    switch (nextAction)
    {
      case ATTACK:
        if (nextAction_arg0 == null)
        {
          return false;
        }
        target = (Creature) nextAction_arg0;
        _forceUse = nextAction_arg2;
        _dontMove = nextAction_arg3;
        clearNextAction();
        setIntention(AI_INTENTION_ATTACK, target);
        break;
      case CAST:
        if ((nextAction_arg0 == null) || (nextAction_arg1 == null))
        {
          return false;
        }
        skill = (Skill) nextAction_arg0;
        target = (Creature) nextAction_arg1;
        _forceUse = nextAction_arg2;
        _dontMove = nextAction_arg3;
        clearNextAction();
        if (!skill.checkCondition(actor, target, _forceUse, _dontMove, true))
        {
          if ((skill.getNextAction() == NextAction.ATTACK) && !actor.equals(target))
          {
            setNextAction(PlayableAI.nextAction.ATTACK, target, null, _forceUse, false);
            return setNextIntention();
          }
          return false;
        }
        setIntention(AI_INTENTION_CAST, skill, target);
        break;
      case MOVE:
        if ((nextAction_arg0 == null) || (nextAction_arg1 == null))
        {
          return false;
        }
        Location loc = (Location) nextAction_arg0;
        Integer offset = (Integer) nextAction_arg1;
        clearNextAction();
        actor.moveToLocation(loc, offset, nextAction_arg2);
        break;
      case REST:
        actor.sitDown(null);
        break;
      case INTERACT:
        if (nextAction_arg0 == null)
        {
          return false;
View Full Code Here

Examples of lineage2.gameserver.model.Playable

   * Method onEvtThink.
   */
  @Override
  protected final void onEvtThink()
  {
    Playable actor = getActor();
    if (actor.isActionsDisabled())
    {
      return;
    }
    try
    {
View Full Code Here

Examples of lineage2.gameserver.model.Playable

  /**
   * Method thinkFollow.
   */
  protected void thinkFollow()
  {
    Playable actor = getActor();
    Creature target = (Creature) _intention_arg0;
    Integer offset = (Integer) _intention_arg1;
    if ((target == null) || target.isAlikeDead() || (actor.getDistance(target) > 4000) || (offset == null))
    {
      clientActionFailed();
      return;
    }
    if (actor.isFollow && (actor.getFollowTarget() == target))
    {
      clientActionFailed();
      return;
    }
    if (actor.isInRange(target, offset + 20) || actor.isMovementDisabled())
    {
      clientActionFailed();
    }
    if (_followTask != null)
    {
View Full Code Here

Examples of lineage2.gameserver.model.Playable

   * @param object GameObject
   */
  @Override
  protected void onIntentionInteract(GameObject object)
  {
    Playable actor = getActor();
    if (actor.isActionsDisabled())
    {
      setNextAction(nextAction.INTERACT, object, null, false, false);
      clientActionFailed();
      return;
    }
View Full Code Here

Examples of lineage2.gameserver.model.Playable

  /**
   * Method thinkInteract.
   */
  protected void thinkInteract()
  {
    Playable actor = getActor();
    GameObject target = (GameObject) _intention_arg0;
    if (target == null)
    {
      setIntention(AI_INTENTION_ACTIVE);
      return;
    }
    int range = (int) (Math.max(30, actor.getMinDistance(target)) + 20);
    if (actor.isInRangeZ(target, range))
    {
      if (actor.isPlayer())
      {
        //((Player) actor).doInteract(target);
        target.onActionSelect((Player) actor, false);
      }
      setIntention(AI_INTENTION_ACTIVE);
    }
    else
    {
      actor.moveToLocation(target.getLoc(), 40, true);
      setNextAction(nextAction.INTERACT, target, null, false, false);
    }
  }
View Full Code Here

Examples of lineage2.gameserver.model.Playable

   * @param object GameObject
   */
  @Override
  protected void onIntentionPickUp(GameObject object)
  {
    Playable actor = getActor();
    if (actor.isActionsDisabled())
    {
      setNextAction(nextAction.PICKUP, object, null, false, false);
      clientActionFailed();
      return;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.