Fixed some other bugs

This commit is contained in:
Ceikry 2021-03-11 13:58:26 -06:00
parent 86c512b4fe
commit 1007c3d53f
2 changed files with 7 additions and 8 deletions

View file

@ -4,6 +4,8 @@ import core.game.node.entity.npc.NPC;
import core.plugin.Initializable; import core.plugin.Initializable;
import core.game.node.entity.player.Player; import core.game.node.entity.player.Player;
import static core.tools.DialogueConstKt.END_DIALOGUE;
/** /**
* Handles the SigmundDialogue dialogue. * Handles the SigmundDialogue dialogue.
* @author 'Vexia * @author 'Vexia
@ -101,16 +103,13 @@ public class SigmundDialogue extends DialoguePlugin {
break; break;
case 31: case 31:
npc("You should ask other people around the town if they","saw anything."); npc("You should ask other people around the town if they","saw anything.");
stage++; stage = END_DIALOGUE;
player.getQuestRepository().getQuest("Lost Tribe").start(player); player.getQuestRepository().getQuest("Lost Tribe").start(player);
player.setAttribute("/save:tlt-witness", TLTNPCS[0]); player.setAttribute("/save:tlt-witness", TLTNPCS[0]);
break; break;
case 32:
end();
break;
case 34: case 34:
player("No..."); player("No...");
stage = 32; stage = END_DIALOGUE;
break; break;
} }
return true; return true;

View file

@ -38,14 +38,14 @@ class KingRoaldArravDialogue() : DialogueFile() {
2 -> npc("My goodness! This claim is for the reward offered by", "my father many years ago!").also { stage++ } 2 -> npc("My goodness! This claim is for the reward offered by", "my father many years ago!").also { stage++ }
3 -> npc("I never thought I would live to see the day when", "someone came forward to claim this reward!").also { stage++ } 3 -> npc("I never thought I would live to see the day when", "someone came forward to claim this reward!").also { stage++ }
4 -> npc("I heard that you found half the shield, so I will give", "you half of the bounty. That comes to exactly 600 gp!").also { stage++ } 4 -> npc("I heard that you found half the shield, so I will give", "you half of the bounty. That comes to exactly 600 gp!").also { stage++ }
5 -> interpreter!!.sendItemMessage(CERTIFICATE.id, "You hand over a certificate. The king gives you 600 gp.").also { stage = END_DIALOGUE } 5 -> {
END_DIALOGUE -> { interpreter!!.sendItemMessage(CERTIFICATE.id, "You hand over a certificate. The king gives you 600 gp.")
if (player!!.inventory.remove(CERTIFICATE)) { if (player!!.inventory.remove(CERTIFICATE)) {
if (!player!!.inventory.add(Item(995, 600))) { if (!player!!.inventory.add(Item(995, 600))) {
GroundItemManager.create(Item(995, 600), player) GroundItemManager.create(Item(995, 600), player)
} }
player!!.questRepository.getQuest("Shield of Arrav").finish(player) player!!.questRepository.getQuest("Shield of Arrav").finish(player)
end() stage = END_DIALOGUE
} }
} }
} }