From 727ccf3b1224544d56c7a5b042fba8f51befbdca Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 17 Jul 2023 04:22:56 -0400 Subject: [PATCH] ZoneSet DevCmd created. --- src/engine/devcmd/cmds/ZoneSetCmd.java | 36 ++++++++++++-------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/src/engine/devcmd/cmds/ZoneSetCmd.java b/src/engine/devcmd/cmds/ZoneSetCmd.java index 679a4c5f..2d6b3a56 100644 --- a/src/engine/devcmd/cmds/ZoneSetCmd.java +++ b/src/engine/devcmd/cmds/ZoneSetCmd.java @@ -40,36 +40,32 @@ public class ZoneSetCmd extends AbstractDevCmd { zone = ZoneManager.findSmallestZone(playerCharacter.getLoc()); - if (zone == null) { - throwbackError(playerCharacter, "Error: can't find the zone you are in."); - return; - } - - //get all mobs for the zone - throwbackInfo(playerCharacter, zone.getName() + " (" + zone.getLoadNum() + ") " + zone.getObjectUUID()); - if (words[0].equalsIgnoreCase("mob")) { - - for (Mob mob : zone.zoneMobSet) { - - String out = mob.getName() + '(' + mob.getDBID() + "): "; + // NPC - if (mob.isAlive()) - out += mob.getLoc().x + "x" + mob.getLoc().z + "; isAlive: " + mob.isAlive(); - else - out += " isAlive: " + mob.isAlive(); + if (words[0].equalsIgnoreCase("mob")) { + for (NPC npc : zone.zoneNPCSet) { + String out = npc.getName() + '(' + npc.getDBID() + "): "; throwbackInfo(playerCharacter, out); - return; } + return; } - // NPC + // Mob + + for (Mob mob : zone.zoneMobSet) { + + String out = mob.getName() + '(' + mob.getDBID() + "): "; + + if (mob.isAlive()) + out += mob.getLoc().x + "x" + mob.getLoc().z + "; isAlive: " + mob.isAlive(); + else + out += " isAlive: " + mob.isAlive(); - for (NPC npc : zone.zoneNPCSet) { - String out = npc.getName() + '(' + npc.getDBID() + "): "; throwbackInfo(playerCharacter, out); + return; } }