Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2Skill


    {
      return;
    }
    L2Player player = _inv.getOwner().getPlayer();
    L2Skill[] itemSkills;
    L2Skill enchant4Skill;
    L2Item it = item.getItem();
    itemSkills = it.getAttachedSkills();
    enchant4Skill = it.getEnchant4Skill();
    if(itemSkills != null)
    {
View Full Code Here


    {
      return;
    }
    L2Player player = _inv.getOwner().getPlayer();
    L2Skill[] itemSkills;
    L2Skill enchant4Skill = null;
    L2Item it = item.getItem();
    itemSkills = it.getAttachedSkills();
    if(item.getEnchantLevel() >= 4)
    {
      enchant4Skill = it.getEnchant4Skill();
View Full Code Here

        GArray<L2SkillLearn> skills = SkillTreeTable.getInstance().getAvailableSkills(player, classId);
        for (L2SkillLearn s : skills) {
            if (s.getItemCount() == -1) {
                continue;
            }
            L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
            if (sk == null || !sk.getCanLearn(player.getClassId()) || !sk.canTeachBy(npcId)) {
                continue;
            }
            int cost = SkillTreeTable.getInstance().getSkillCost(player, sk);
            counts++;
            asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), cost, 0);
View Full Code Here

    L2Playable actor = getActor();
    if(nextAction == null || actor == null)
    {
      return false;
    }
    L2Skill skill;
    L2Character target;
    L2Object object;
    switch(nextAction)
    {
      case ATTACK:
        if(nextAction_arg0 == null)
        {
          return false;
        }
        target = (L2Character) 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 = (L2Skill) nextAction_arg0;
        target = (L2Character) 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(l2p.gameserver.ai.L2PlayableAI.nextAction.ATTACK, target, null, _forceUse, false);
            return setNextIntention();
          }
          return false;
View Full Code Here

      {
        case AI_INTENTION_ATTACK:
          setAttackTarget(target);
          break;
        case AI_INTENTION_CAST:
          L2Skill skill = actor.getCastingSkill();
          if(skill == null)
          {
            skill = _skill;
          }
          if(skill != null && !skill.isUsingWhileCasting())
          {
            switch(skill.getTargetType())
            {
              case TARGET_ONE:
              case TARGET_AREA:
              case TARGET_MULTIFACE:
              case TARGET_TUNNEL:
View Full Code Here

        AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.TRANSFER);
        for (L2SkillLearn s : skills) {
            if (s.getItemCount() == -1) {
                continue;
            }
            L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
            if (sk != null) {
                asl.addSkill(s.getId(), s.getLevel(), s.getLevel(), 0, 0);
            }
        }
        player.sendPacket(asl);
View Full Code Here

        }
        AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.FISHING);
        int counts = 0;
        L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableFishingSkills(player);
        for (L2SkillLearn s : skills) {
            L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
            if (sk == null) {
                continue;
            }
            int cost = SkillTreeTable.getInstance().getSkillCost(player, sk);
            counts++;
View Full Code Here

        }
        AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.TRANSFORMATION);
        int counts = 0;
        L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableTransformationSkills(player);
        for (L2SkillLearn s : skills) {
            L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
            if (sk == null) {
                continue;
            }
            int cost = SkillTreeTable.getInstance().getSkillCost(player, sk);
            counts++;
View Full Code Here

        }
        AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.CLAN);
        int counts = 0;
        L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableClanSkills(player.getClan());
        for (L2SkillLearn s : skills) {
            L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
            if (sk == null) {
                continue;
            }
            int cost = s.getRepCost();
            counts++;
View Full Code Here

    //TODO сделать более разумный выбор баффа, сначала выбирать подходящие а потом уже рандомно 1 из них
    if(_buff.length > 0)
    {
      if(Rnd.chance(rateSelf))
      {
        L2Skill r_skill = _buff[Rnd.get(_buff.length)];
        if(actor.getEffectList().getEffectsBySkill(r_skill) == null)
        {
          addTaskBuff(actor, r_skill);
          return true;
        }
      }
      if(Rnd.chance(rateFriends))
      {
        L2Skill r_skill = _buff[Rnd.get(_buff.length)];
        double bestDistance = 1000000;
        L2NpcInstance target = null;
        for(L2NpcInstance npc : actor.ActiveFriendTargets(true, true))
        {
          if(npc != null && npc.getEffectList().getEffectsBySkill(r_skill) == null)
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.L2Skill

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.