Browse Source

NPC have names and contract names

master
FatBoy-DOTC 2 years ago
parent
commit
3e005c3a51
  1. 6
      src/engine/net/client/msg/ManageCityAssetsMsg.java
  2. 2
      src/engine/objects/NPC.java

6
src/engine/net/client/msg/ManageCityAssetsMsg.java

@ -695,11 +695,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
writer.putInt(npcHire.getObjectUUID()); writer.putInt(npcHire.getObjectUUID());
if (npcHire.getObjectType() == GameObjectType.NPC) { if (npcHire.getObjectType() == GameObjectType.NPC) {
writer.putString(((NPC) npcHire).getContract().getName()); writer.putString(((NPC) npcHire).getContract().getName());
if (((NPC) npcHire).getNameOverride().length() > 0) { writer.putString(npcHire.getName());
writer.putString(((Mob) npcHire).getNameOverride());
} else {
writer.putString(npcHire.getName());
}
} }
else if (npcHire.getObjectType() == GameObjectType.Mob) { else if (npcHire.getObjectType() == GameObjectType.Mob) {
writer.putString(((Mob) npcHire).getContract().getName()); writer.putString(((Mob) npcHire).getContract().getName());

2
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){ }catch(Exception e){
Logger.error(e); Logger.error(e);

Loading…
Cancel
Save