Package l2p.gameserver.model

Examples of l2p.gameserver.model.L2SkillLearn


    if(!(skill.isCommon() || isTransferSkill || SkillTreeTable.getInstance().isSkillPossible(activeChar, _id, _level)))
    {
      Util.handleIllegalPlayerAction(activeChar, "RequestAquireSkill[64]", "tried to learn skill " + _id + " while on class " + activeChar.getActiveClass(), 1);
      return;
    }
    L2SkillLearn SkillLearn = SkillTreeTable.getSkillLearn(_id, _level, activeChar.getClassId(), _skillType == AcquireSkillList.CLAN ? activeChar.getClan() : null, isTransferSkill);
    int itemCount = SkillLearn.getItemCount();
    if(itemCount == -1)
    {
      activeChar.sendActionFailed();
      return;
    }
View Full Code Here


    if(!player.isClanLeader())
    {
      player.sendPacket(Msg.ONLY_THE_CLAN_LEADER_IS_ENABLED);
      return;
    }
    L2SkillLearn SkillLearn = SkillTreeTable.getSkillLearn(_id, _level, null, clan, false);
    int requiredRep = SkillTreeTable.getInstance().getSkillRepCost(clan, skill);
    int itemId = SkillLearn.getItemId();
    if(skill.getMinPledgeClass() <= clan.getLevel() && clan.getReputationScore() >= requiredRep)
    {
      if(mOption.price(player, SkillLearn.getItemId(), SkillLearn.getItemCount()))
      {
        clan.incReputation(-requiredRep, false, "AquireSkill: " + _id + ", lvl " + _level);
        clan.addNewSkill(skill, true);
        player.sendPacket(new SystemMessage(SystemMessage.YOU_HAVE_EARNED_S1).addSkillName(_id, _level));
View Full Code Here

      {
        itemId = itemIdCount.getShort("item_id");
        itemCount = itemIdCount.getInt("item_count");
      }
      statement2.close();
      L2SkillLearn skl = new L2SkillLearn(id, lvl, minLvl, name, cost, itemId, itemCount, skilltree.getInt("class_id") == -1, skilltree.getInt("class_id") == -2, skilltree.getInt("class_id") == -4);
      dest.add(skl);
    }
  }
View Full Code Here

    FastMap<Integer, L2SkillLearn> skillmap = skt.get(skill.getId());
    if(skillmap == null)
    {
      return Integer.MAX_VALUE;
    }
    L2SkillLearn skl = skillmap.get(1 + Math.max(player.getSkillLevel(skill.getId()), 0));
    if(skl == null)
    {
      return Integer.MAX_VALUE;
    }
    return skl.getSpCost();
  }
View Full Code Here

    fillRequirements();
  }

  private void fillRequirements()
  {
    L2SkillLearn SkillLearn = SkillTreeTable.getSkillLearn(_id, _level, _classId, _clan, _mode == AcquireSkillList.TRANSFER);
    if(SkillLearn == null)
    {
      return;
    }
    _spCost = _clan != null ? SkillLearn.getRepCost() : SkillLearn.getSpCost();
    Integer spb_id = SkillSpellbookTable._skillSpellbooks.get(SkillSpellbookTable.hashCode(new int[] {_id, _level}));
    if(spb_id != null)
    {
      _reqs.add(new Req(SkillLearn.common ? 4 : _clan != null ? 2 : 99, spb_id.intValue(), SkillLearn.getItemCount(), SkillLearn.common || _clan != null ? 2 : 50));
    }
    if(_mode == AcquireSkillList.TRANSFER)
    {
      int id = 0;
      switch(_classId)
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.L2SkillLearn

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.