}
if (Config.DEBUG)
_log.fine("ClassMaster activated");
ClassId classId = player.getClassId();
int jobLevel = 0;
int level = player.getLevel();
ClassLevel lvl = PlayerClass.values()[classId.getId()].getLevel();
switch (lvl)
{
case First:
jobLevel = 1;
break;
case Second:
jobLevel = 2;
break;
default:
jobLevel = 3;
}
if (!Config.ALLOW_CLASS_MASTERS)
jobLevel = 3;
if(player.isGM())
{
showChatWindowChooseClass(player);
}
else if (((level >= 20 && jobLevel == 1 ) ||
(level >= 40 && jobLevel == 2 )) && Config.ALLOW_CLASS_MASTERS)
{
showChatWindow(player, classId.getId());
}
else if (level >= 76 && Config.ALLOW_CLASS_MASTERS && classId.getId() < 88)
{
for (int i = 0; i < SECONDN_CLASS_IDS.length; i++)
{
if (classId.getId() == SECONDN_CLASS_IDS[i])
{
NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
TextBuilder sb = new TextBuilder();
sb.append("<html><body<table width=200>");
sb.append("<tr><td><center>"+CharTemplateTable.getClassNameById(player.getClassId().getId())+" Class Master:</center></td></tr>");