Moving items out of constructor.

This commit is contained in:
2023-08-20 16:38:10 -04:00
parent 2c9fc405e9
commit b21e9dc59e
5 changed files with 23 additions and 11 deletions
+5 -1
View File
@@ -88,7 +88,7 @@ public class NPC extends AbstractCharacter {
Vector3fImmutable currentLoc, Vector3fImmutable faceDir, short healthCurrent, short manaCurrent, short stamCurrent, Guild guild,
byte runningTrains, int npcType, boolean isMob, Building building, int contractID, Zone parent) {
super(name, "", statStrCurrent, statDexCurrent, statConCurrent, statIntCurrent, statSpiCurrent, level, exp,
bindLoc, currentLoc, faceDir, guild, runningTrains);
bindLoc, faceDir, guild, runningTrains);
this.loadID = npcType;
this.contract = DbManager.ContractQueries.GET_CONTRACT(contractID);
@@ -1049,6 +1049,10 @@ public class NPC extends AbstractCharacter {
if (wordCount(this.name) < 2 && this.contract != null)
this.name += " the " + this.contract.getName();
// Initialize inventory
this.charItemManager = new CharacterItemManager(this);
// Configure parent zone adding this NPC to the
// zone collection