Package com.l2jfrozen.gameserver.skills.holders

Examples of com.l2jfrozen.gameserver.skills.holders.PlayerSkillHolder


   */
  public Collection<L2Skill> getAllAvailableSkills(L2PcInstance player, ClassId classId)
  {
    // Get available skills
    int unLearnable = 0;
    PlayerSkillHolder holder = new PlayerSkillHolder(player.getSkills());
    List<L2SkillLearn> learnable = getAvailableSkills(player, classId, holder);
    while (learnable.size() > unLearnable)
    {
      for (L2SkillLearn s : learnable)
      {
        L2Skill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());
        if ((sk == null) || ((sk.getId() == L2Skill.SKILL_DIVINE_INSPIRATION) && !Config.AUTO_LEARN_DIVINE_INSPIRATION && !player.isGM()))
        {
          unLearnable++;
          continue;
        }
       
        holder.addSkill(sk);
      }
     
      // Get new available skills, some skills depend of previous skills to be available.
      learnable = getAvailableSkills(player, classId, holder);
    }
    return holder.getSkills().values();
  }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.skills.holders.PlayerSkillHolder

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.