Package net.sf.l2j.gameserver.model

Examples of net.sf.l2j.gameserver.model.L2Skill


    if (player.isDead()
      || !player.isVisible()
      || !player.isInsideRadius(this, getDistanceToWatchObject(player), false, false))
      return false;

    L2Skill skill = SkillTable.getInstance().getInfo(skillId, skillLevel);

    if (player.getFirstEffect(skill) == null)
    {
      skill.getEffects(this, player);
      broadcastPacket(new MagicSkillUser(this, player, skill.getId(), skillLevel,
                        skill.getHitTime(), 0));
      return true;
    }
    return false;
  }
View Full Code Here


            insertObjectIdAndShowChatWindow(player, content);
            return;
        }
       

        L2Skill skill = null;
        // Go through the Helper Buff list define in sql table helper_buff_list and cast skill
        for (L2HelperBuff helperBuffItem : HelperBuffTable.getInstance().getHelperBuffTable())
        {
           if( helperBuffItem.isMagicClassBuff() == player.isMageClass())
           {
              if(player_level>=helperBuffItem.getLowerLevel() && player_level<=helperBuffItem.getUpperLevel())
              {
                  skill = SkillTable.getInstance().getInfo(helperBuffItem.getSkillID(),helperBuffItem.getSkillLevel());
                  if (skill.getSkillType() == SkillType.SUMMON)
                      player.doCast(skill);
                  else
                      doCast(skill);
              }
           }
View Full Code Here

                }
                else
                {
                    if (skill.getId() == 345) // Sonic Rage
                    {
                        L2Skill dummy = SkillTable.getInstance().getInfo(8, 7); // Lv7 Sonic Focus
                        dummy.getEffects(activeChar, activeChar);
                    }
                    else if (skill.getId() == 346) // Raging Force
                    {
                        L2Skill dummy = SkillTable.getInstance().getInfo(50, 7); // Lv7 Focused Force
                        dummy.getEffects(activeChar, activeChar);
                    }
                }
            }
            //self Effect :]
            L2Effect effect = activeChar.getFirstEffect(skill.getId());
View Full Code Here

    int counts = 0;

        for (L2SkillLearn s : skills)
    {
      L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());

      if (sk == null)
        continue;

      counts++;
View Full Code Here

        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.EFFECT_S1_DISAPPEARED).addSkillName(7029));
        }
        else if ((val >= 1) && (val <= 4))
        {
          L2Skill gmSpeedSkill = SkillTable.getInstance().getInfo(7029, val);
          activeChar.doCast(gmSpeedSkill);
        }
      }
      catch (Exception e)
      {
View Full Code Here

        if (_target == null || !_target.isDead()) {
          _activeChar.sendPacket(new ActionFailed());
          return;
        }

        L2Skill skill = SkillTable.getInstance().getInfo(2098, 1); //harvesting skill
      _activeChar.useMagic(skill,false,false);
    }
View Full Code Here

        if (player.getClassId().getId() < 88) // requires to have 3rd class quest completed
        return;

        if (player.getLevel() < 76) return;

        L2Skill skill = SkillTable.getInstance().getInfo(_skillId, _skillLvl);

        int counts = 0;
        int _requiredSp = 10000000;
        int _requiredExp = 100000;
        byte _rate = 0;
        int _baseLvl = 1;

        L2EnchantSkillLearn[] skills = SkillTreeTable.getInstance().getAvailableEnchantSkills(player);

        for (L2EnchantSkillLearn s : skills)
        {
          L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
          if (sk == null || sk != skill || !sk.getCanLearn(player.getClassId())
              || !sk.canTeachBy(npcid)) continue;
          counts++;
          _requiredSp = s.getSpCost();
          _requiredExp = s.getExp();
          _rate = s.getRate(player);
          _baseLvl = s.getBaseLevel();
View Full Code Here

            playable.destroyItem("Consume", item.getObjectId(), 1, null, false);
        }
    }
    public void useFw(L2PcInstance activeChar, int magicId,int level)
    {
        L2Skill skill = SkillTable.getInstance().getInfo(magicId,level);
        if (skill != null) {
            activeChar.useMagic(skill, false, false);
        }
    }
View Full Code Here

    AquireSkillList asl = new AquireSkillList(AquireSkillList.skillType.Usual);
    int counts = 0;

    for (L2SkillLearn s: skills)
    {
      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++;
View Full Code Here

        ExEnchantSkillList esl = new ExEnchantSkillList();
        int counts = 0;

        for (L2EnchantSkillLearn s: skills)
        {
            L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
            if (sk == null) continue;
            counts++;
            esl.addSkill(s.getId(), s.getLevel(), s.getSpCost(), s.getExp());
        }
        if (counts == 0)
View Full Code Here

TOP

Related Classes of net.sf.l2j.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.