Browse Source

Logging of invalid contracts

master
MagicBot 1 year ago
parent
commit
bea82d80f2
  1. 5
      src/engine/objects/NPC.java

5
src/engine/objects/NPC.java

@ -187,7 +187,12 @@ public class NPC extends AbstractCharacter {
// Default to contract load ID // Default to contract load ID
if (loadID == 0) if (loadID == 0)
if (this.contract != null)
loadID = this.contract.getMobbaseID(); loadID = this.contract.getMobbaseID();
else {
Logger.error("Invalid contract for NPC: " + this.getObjectUUID());
loadID = 2100; // Default human male
}
this.mobBase = MobBase.getMobBase(this.loadID); this.mobBase = MobBase.getMobBase(this.loadID);
this.level = rs.getByte("npc_level"); this.level = rs.getByte("npc_level");

Loading…
Cancel
Save