ClassId classId = player.getClassId();
int level = player.getLevel();
int jobLevel = 0;
int newJobLevel = 0;
ClassLevel lvlnow = PlayerClass.values()[classId.getId()].getLevel();
if(player.isGM())
{
changeClass(player, val);
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><body>");
sb.append("You have now become a <font color=\"LEVEL\">" + CharTemplateTable.getClassNameById(player.getClassId().getId()) + "</font>.");
sb.append("</body></html>");
html.setHtml(sb.toString());
player.sendPacket(html);
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;