From 8f87bc5ca05f9c700e5ee64f5a99d1706f5adf65 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Tue, 4 Apr 2023 18:06:32 -0400 Subject: [PATCH] Bugfix in info dealing with mob flags on npcs. --- src/engine/devcmd/cmds/InfoCmd.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/engine/devcmd/cmds/InfoCmd.java b/src/engine/devcmd/cmds/InfoCmd.java index 32909724..d201e866 100644 --- a/src/engine/devcmd/cmds/InfoCmd.java +++ b/src/engine/devcmd/cmds/InfoCmd.java @@ -348,16 +348,18 @@ public class InfoCmd extends AbstractDevCmd { output += "Name: " + targetNPC.getName(); output += newline; output += StringUtils.addWS("Level: " + targetNPC.getLevel(), 20); - MobBase mobBase = targetNPC.getMobBase(); + + MobBase mobBase; + + if (targetNPC.getContract() == null) + mobBase = targetNPC.getMobBase(); + else + mobBase = MobBase.getMobBase(targetNPC.getContract().getMobbaseID()); if (mobBase != null) { output += "Mobbbase: " + mobBase.getObjectUUID(); output += newline; output += "Flags: " + targetNPC.getMobBase().getFlags().toString(); - } else { - output += "RaceID (no mobbase): " + targetNPC.getLoadID(); - output += "Flags: " + MobBase.getMobBase(targetNPC.getLoadID()).getFlags().toString(); - } output += newline;