[tutorial] fix checks

This commit is contained in:
RedSparr0w 2019-09-24 20:24:18 +12:00
parent 464954c43f
commit 3336f3422e
2 changed files with 3 additions and 3 deletions

View file

@ -304,7 +304,7 @@ public final class DialogueInterpreter {
player.getPacketDispatch().sendString(messages[i], 372, i + 1);
}
player.getInterfaceManager().openChatbox(372);
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE) {
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
}
return player.getInterfaceManager().getChatbox();
}
@ -497,7 +497,7 @@ public final class DialogueInterpreter {
player.getPacketDispatch().sendString(messages[i].toString().replace("@name", player.getUsername()), interfaceId, (i + 4));
}
player.getInterfaceManager().openChatbox(interfaceId);
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE) {
if (player.getAttributes().containsKey("tut-island") || TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE) {
}
player.getPacketDispatch().sendInterfaceConfig(player.getInterfaceManager().getChatbox().getId(), 3, false);
return player.getInterfaceManager().getChatbox();

View file

@ -62,7 +62,7 @@ public class SmithingPulse extends SkillPulse<Item> {
player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with.");
return false;
}
if (TutorialSession.getExtension(player).getStage() <= TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) {
if (TutorialSession.getExtension(player).getStage() < TutorialSession.MAX_STAGE && node.getId() != Bars.BRONZE_DAGGER.getProduct()) {
return false;
}
return true;