*/
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();
}