Code improvements.
This commit is contained in:
@@ -114,8 +114,7 @@ public class NpcViewMod implements IBypassHandler
|
||||
{
|
||||
return false;
|
||||
}
|
||||
final int page = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0;
|
||||
sendNpcDropList(activeChar, npc, dropListScope, page);
|
||||
sendNpcDropList(activeChar, npc, dropListScope, (st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0));
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
|
@@ -87,9 +87,7 @@ public class OlympiadManagerLink implements IBypassHandler
|
||||
{
|
||||
if (command.toLowerCase().startsWith("olympiaddesc"))
|
||||
{
|
||||
final int val = Integer.parseInt(command.substring(13, 14));
|
||||
final String suffix = command.substring(14);
|
||||
((L2OlympiadManagerInstance) target).showChatWindow(activeChar, val, suffix);
|
||||
((L2OlympiadManagerInstance) target).showChatWindow(activeChar, Integer.parseInt(command.substring(13, 14)), command.substring(14));
|
||||
}
|
||||
else if (command.toLowerCase().startsWith("olympiadnoble"))
|
||||
{
|
||||
|
@@ -53,8 +53,7 @@ public class PlayerHelp implements IBypassHandler
|
||||
final NpcHtmlMessage html;
|
||||
if (cmd.length > 1)
|
||||
{
|
||||
final int itemId = Integer.parseInt(cmd[1]);
|
||||
html = new NpcHtmlMessage(0, itemId);
|
||||
html = new NpcHtmlMessage(0, Integer.parseInt(cmd[1]));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -219,19 +219,12 @@ public class QuestLink implements IBypassHandler
|
||||
return;
|
||||
}
|
||||
|
||||
if (qs == null)
|
||||
if ((qs == null) && (q.getId() >= 1) && (q.getId() < 20000) && (player.getAllActiveQuests().size() >= MAX_QUEST_COUNT))
|
||||
{
|
||||
if ((q.getId() >= 1) && (q.getId() < 20000))
|
||||
{
|
||||
// Too many ongoing quests.
|
||||
if (player.getAllActiveQuests().size() >= MAX_QUEST_COUNT)
|
||||
{
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "html/fullquest.html");
|
||||
player.sendPacket(html);
|
||||
return;
|
||||
}
|
||||
}
|
||||
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
|
||||
html.setFile(player.getHtmlPrefix(), "html/fullquest.html");
|
||||
player.sendPacket(html);
|
||||
return;
|
||||
}
|
||||
|
||||
q.notifyTalk(npc, player);
|
||||
|
@@ -72,8 +72,7 @@ public class SkillList implements IBypassHandler
|
||||
|
||||
if (!own_class)
|
||||
{
|
||||
final String charType = activeChar.getClassId().isMage() ? "fighter" : "mage";
|
||||
text += "Skills of your class are the easiest to learn.<br>Skills of another class of your race are a little harder.<br>Skills for classes of another race are extremely difficult.<br>But the hardest of all to learn are the " + charType + "skills!<br>";
|
||||
text += "Skills of your class are the easiest to learn.<br>Skills of another class of your race are a little harder.<br>Skills for classes of another race are extremely difficult.<br>But the hardest of all to learn are the " + (activeChar.getClassId().isMage() ? "fighter" : "mage") + "skills!<br>";
|
||||
}
|
||||
|
||||
// make a list of classes
|
||||
|
Reference in New Issue
Block a user