int lvl = getLevel();
// Remove beginner Lucky skill
if(lvl == 10)
{
L2Skill skill = SkillTable.getInstance().getInfo(194, 1);
skill = removeSkill(skill);
if(Config.DEBUG && skill != null)
{
_log.fine("removed skill 'Lucky' from " + getName());
}
skill = null;
}
// Calculate the current higher Expertise of the L2PcInstance
for(int i = 0; i < EXPERTISE_LEVELS.length; i++)
{
if(lvl >= EXPERTISE_LEVELS[i])
{
setExpertiseIndex(i);
}
}
// Add the Expertise skill corresponding to its Expertise level
if(getExpertiseIndex() > 0)
{
L2Skill skill = SkillTable.getInstance().getInfo(239, getExpertiseIndex());
addSkill(skill, true);
if(Config.DEBUG)
{
_log.fine("awarded " + getName() + " with new expertise.");
}
skill = null;
}
else
{
if(Config.DEBUG)
{
_log.fine("No skills awarded at lvl: " + lvl);
}
}
//Active skill dwarven craft
if(getSkillLevel(1321) < 1 && getRace() == Race.dwarf)
{
L2Skill skill = SkillTable.getInstance().getInfo(1321, 1);
addSkill(skill, true);
skill = null;
}
//Active skill common craft
if(getSkillLevel(1322) < 1)
{
L2Skill skill = SkillTable.getInstance().getInfo(1322, 1);
addSkill(skill, true);
skill = null;
}
for(int i = 0; i < COMMON_CRAFT_LEVELS.length; i++)
{
if(lvl >= COMMON_CRAFT_LEVELS[i] && getSkillLevel(1320) < i + 1)
{
L2Skill skill = SkillTable.getInstance().getInfo(1320, (i + 1));
addSkill(skill, true);
skill = null;
}
}