From 1c5eaa47590afa6949d9b267ca034f0583b160f7 Mon Sep 17 00:00:00 2001 From: Jamix77 Date: Fri, 3 Jan 2020 17:27:30 +0000 Subject: [PATCH] Fixes (#49) Fixed #11 and implemented a beta command for testing (stops the need to go into database and manually change when debugging, very slow, now one command in game, very fast) --- Server/src/org/crandor/game/node/entity/npc/NPC.java | 4 ++++ Server/src/plugin/command/BetaCommandPlugin.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Server/src/org/crandor/game/node/entity/npc/NPC.java b/Server/src/org/crandor/game/node/entity/npc/NPC.java index 362e6664a..f2cd84f52 100644 --- a/Server/src/org/crandor/game/node/entity/npc/NPC.java +++ b/Server/src/org/crandor/game/node/entity/npc/NPC.java @@ -319,6 +319,10 @@ public class NPC extends Entity { } } shop.open(player); + + //Fix for issue #11 for shops keeping dialogue open. + player.getDialogueInterpreter().getDialogue().end(); + return true; } diff --git a/Server/src/plugin/command/BetaCommandPlugin.java b/Server/src/plugin/command/BetaCommandPlugin.java index 541be63de..370dfd202 100644 --- a/Server/src/plugin/command/BetaCommandPlugin.java +++ b/Server/src/plugin/command/BetaCommandPlugin.java @@ -46,6 +46,10 @@ public final class BetaCommandPlugin extends CommandPlugin { int id, amount; Player p; switch (name) { + case "rights": + player.getDetails().setRights(Rights.forId(Integer.parseInt(args[1]))); + player.sendMessage("Set rights to " + Rights.forId(Integer.parseInt(args[1])).name()); + break; case "lo": int index = 0; for (int i = 8349; i < 8367; i++) {