forked from MagicBane/Server
Cleanup of inventoryManager usage.
This commit is contained in:
@@ -231,8 +231,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
this.skills = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
this.skills = new ConcurrentHashMap<>(MBServerStatics.CHM_INIT_CAP, MBServerStatics.CHM_LOAD, MBServerStatics.CHM_THREAD_LOW);
|
||||||
this.initializeCharacter();
|
this.initializeCharacter();
|
||||||
|
|
||||||
// Dangerous to use THIS in a constructor!!!
|
|
||||||
this.charItemManager = new CharacterItemManager(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -275,8 +273,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
this.powers = new ConcurrentHashMap<>();
|
this.powers = new ConcurrentHashMap<>();
|
||||||
this.initializeCharacter();
|
this.initializeCharacter();
|
||||||
|
|
||||||
// Dangerous to use THIS in a constructor!!!
|
|
||||||
this.charItemManager = new CharacterItemManager(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -357,9 +353,6 @@ public abstract class AbstractCharacter extends AbstractWorldObject {
|
|||||||
this.powers = new ConcurrentHashMap<>();
|
this.powers = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
this.initializeCharacter();
|
this.initializeCharacter();
|
||||||
|
|
||||||
// Dangerous to use THIS in a constructor!!!
|
|
||||||
this.charItemManager = new CharacterItemManager(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getBankCapacity() {
|
public static int getBankCapacity() {
|
||||||
|
|||||||
@@ -1827,8 +1827,6 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
this.defenseRating = (short) this.mobBase.getDefenseRating();
|
this.defenseRating = (short) this.mobBase.getDefenseRating();
|
||||||
this.isActive = true;
|
this.isActive = true;
|
||||||
|
|
||||||
this.charItemManager.load();
|
|
||||||
|
|
||||||
// Load AI for wall archers
|
// Load AI for wall archers
|
||||||
|
|
||||||
if (this.contract != null && NPC.ISWallArcher(this.contract)) {
|
if (this.contract != null && NPC.ISWallArcher(this.contract)) {
|
||||||
@@ -1869,6 +1867,7 @@ public class Mob extends AbstractIntelligenceAgent {
|
|||||||
// Initialize inventory
|
// Initialize inventory
|
||||||
|
|
||||||
this.charItemManager = new CharacterItemManager(this);
|
this.charItemManager = new CharacterItemManager(this);
|
||||||
|
this.charItemManager.load();
|
||||||
this.loadInventory();
|
this.loadInventory();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user