From 3e005c3a5158829b4f9c9e3e4771ed6581690c72 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 22 Apr 2023 23:20:24 -0500 Subject: [PATCH] NPC have names and contract names --- src/engine/net/client/msg/ManageCityAssetsMsg.java | 6 +----- src/engine/objects/NPC.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/engine/net/client/msg/ManageCityAssetsMsg.java b/src/engine/net/client/msg/ManageCityAssetsMsg.java index 78f8204e..44112d42 100644 --- a/src/engine/net/client/msg/ManageCityAssetsMsg.java +++ b/src/engine/net/client/msg/ManageCityAssetsMsg.java @@ -695,11 +695,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg { writer.putInt(npcHire.getObjectUUID()); if (npcHire.getObjectType() == GameObjectType.NPC) { writer.putString(((NPC) npcHire).getContract().getName()); - if (((NPC) npcHire).getNameOverride().length() > 0) { - writer.putString(((Mob) npcHire).getNameOverride()); - } else { - writer.putString(npcHire.getName()); - } + writer.putString(npcHire.getName()); } else if (npcHire.getObjectType() == GameObjectType.Mob) { writer.putString(((Mob) npcHire).getContract().getName()); diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 18d6f503..c30eb0e5 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -280,7 +280,7 @@ public class NPC extends AbstractCharacter { - this.nameOverride = rs.getString("npc_name"); + this.nameOverride = rs.getString("npc_name") + " the " + this.getContract().getName(); }catch(Exception e){ Logger.error(e);