From 876ccc7cbf23fe834679bff3c20f52c03deabdec Mon Sep 17 00:00:00 2001 From: MagicBot Date: Mon, 21 Aug 2023 16:12:06 -0400 Subject: [PATCH] New constructor created. --- src/engine/objects/AbstractIntelligenceAgent.java | 4 ++++ src/engine/objects/Mob.java | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/AbstractIntelligenceAgent.java b/src/engine/objects/AbstractIntelligenceAgent.java index 580a3094..b99e06cb 100644 --- a/src/engine/objects/AbstractIntelligenceAgent.java +++ b/src/engine/objects/AbstractIntelligenceAgent.java @@ -33,6 +33,10 @@ public abstract class AbstractIntelligenceAgent extends AbstractCharacter { public Enum.AIAgentType agentType = Enum.AIAgentType.MOBILE; + public AbstractIntelligenceAgent() { + super(); + } + public AbstractIntelligenceAgent(ResultSet rs) throws SQLException { super(rs); } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 1c559543..b8c44f05 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -99,6 +99,12 @@ public class Mob extends AbstractIntelligenceAgent { private DateTime upgradeDateTime = null; private boolean lootSync = false; + // New Mobile constructor. Fill in the blanks and then call + // PERSIST. + public Mob() { + this.dbID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET; + this.currentID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET; + } /** * No Id Constructor @@ -109,7 +115,7 @@ public class Mob extends AbstractIntelligenceAgent { this.dbID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET; this.loadID = npcType; this.mobBase = MobBase.getMobBase(loadID); - this.currentID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET; + this.dbID = MBServerStatics.NO_DB_ROW_ASSIGNED_YET; this.parentZone = parent; this.parentZoneID = (parent != null) ? parent.getObjectUUID() : 0; this.building = building;