Browse Source

manager init moved to the top of method.

combat-2
MagicBot 1 year ago
parent
commit
ac3588c76a
  1. 3
      src/engine/objects/Mob.java
  2. 6
      src/engine/objects/NPC.java

3
src/engine/objects/Mob.java

@ -1751,6 +1751,8 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1751,6 +1751,8 @@ public class Mob extends AbstractIntelligenceAgent {
@Override
public void runAfterLoad() {
this.charItemManager = new CharacterItemManager(this);
if (ConfigManager.serverType.equals(ServerType.LOGINSERVER))
return;
@ -1866,7 +1868,6 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1866,7 +1868,6 @@ public class Mob extends AbstractIntelligenceAgent {
// Initialize inventory
this.charItemManager = new CharacterItemManager(this);
this.charItemManager.load();
this.loadInventory();

6
src/engine/objects/NPC.java

@ -806,6 +806,8 @@ public class NPC extends AbstractCharacter { @@ -806,6 +806,8 @@ public class NPC extends AbstractCharacter {
@Override
public void runAfterLoad() {
this.charItemManager = new CharacterItemManager(this);
if (ConfigManager.serverType.equals(ServerType.LOGINSERVER))
return;
@ -847,10 +849,6 @@ public class NPC extends AbstractCharacter { @@ -847,10 +849,6 @@ 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

Loading…
Cancel
Save