int jobLevel = 0;
int newJobLevel = 0;
player.setTarget(player);
ClassLevel lvlnow = PlayerClass.values()[classId.getId()].getLevel();
if(player.isGM())
{
changeClass(player, val);
player.rewardSkills();
if(val >= 88)
{
player.sendPacket(new SystemMessage(SystemMessageId.THIRD_CLASS_TRANSFER)); // system sound 3rd occupation
}
else
{
player.sendPacket(new SystemMessage(SystemMessageId.CLASS_TRANSFER)); // system sound for 1st and 2nd occupation
}
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
TextBuilder sb = new TextBuilder();
sb.append("<html><title>Class Manager</title><body><center><img src=preciousTex.logo2 width=252 height=128><br><br><br><img src=L2UI_CH3.herotower_deco width=256 height=32></center><br><br>");
sb.append("<center>You have now become a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getClassId().getId()) + "</font>.</center>");
sb.append("<br><center><img src=L2UI_CH3.herotower_deco width=256 height=32></center></body></html>");
html.setHtml(sb.toString());
player.sendPacket(html);
html = null;
sb = null;
return;
}
switch(lvlnow)
{
case First:
jobLevel = 1;
break;
case Second:
jobLevel = 2;
break;
case Third:
jobLevel = 3;
break;
default:
jobLevel = 4;
}
if(jobLevel == 4)
return; // no more job changes
ClassLevel lvlnext = PlayerClass.values()[val].getLevel();
switch(lvlnext)
{
case First:
newJobLevel = 1;
break;