chat commands: fix !lvl cox cm

The command could not work before because the capitalize in
longBossName would produce a capital Of causing the hiscore
skill name to not match.

This normalizes from the hiscore name by removing : to compare
it to our internal boss names.
This commit is contained in:
Adam
2022-06-02 12:41:33 -04:00
parent 4b8dc6fbea
commit 1c3ccdf3a9
2 changed files with 7 additions and 4 deletions

View File

@@ -2044,6 +2044,7 @@ public class ChatCommandsPlugin extends Plugin
return "Chambers of Xeric 24+ players";
// Chambers of Xeric Challenge Mode
case "chambers of xeric: challenge mode":
case "cox cm":
case "xeric cm":
case "chambers cm":
@@ -2433,7 +2434,9 @@ public class ChatCommandsPlugin extends Plugin
}
for (HiscoreSkill skill : HiscoreSkill.values())
{
if (skill.getName().equals(s))
// longBossName the skill name to normalize from hiscore name
// to our internal name (removing the colon)
if (longBossName(skill.getName()).equals(s))
{
return skill;
}