Browse Source

Only one item manager

combat-2
MagicBot 8 months ago
parent
commit
c8d355636b
  1. 2
      src/engine/objects/AbstractCharacter.java
  2. 2
      src/engine/objects/Mob.java
  3. 2
      src/engine/objects/NPC.java
  4. 2
      src/engine/objects/PlayerCharacter.java

2
src/engine/objects/AbstractCharacter.java

@ -49,7 +49,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
public abstract class AbstractCharacter extends AbstractWorldObject { public abstract class AbstractCharacter extends AbstractWorldObject {
public CharacterItemManager charItemManager; public CharacterItemManager charItemManager = new CharacterItemManager(this);
private final ReentrantReadWriteLock healthLock = new ReentrantReadWriteLock(); private final ReentrantReadWriteLock healthLock = new ReentrantReadWriteLock();
public short level; public short level;
public AbstractWorldObject combatTarget; public AbstractWorldObject combatTarget;

2
src/engine/objects/Mob.java

@ -1542,8 +1542,6 @@ public class Mob extends AbstractIntelligenceAgent implements Delayed {
if (ConfigManager.serverType.equals(ServerType.LOGINSERVER)) if (ConfigManager.serverType.equals(ServerType.LOGINSERVER))
return; return;
this.charItemManager = new CharacterItemManager(this);
this.mobBase = MobBase.getMobBase(loadID); this.mobBase = MobBase.getMobBase(loadID);
this.building = BuildingManager.getBuilding(this.buildingUUID); this.building = BuildingManager.getBuilding(this.buildingUUID);

2
src/engine/objects/NPC.java

@ -814,8 +814,6 @@ public class NPC extends AbstractCharacter {
@Override @Override
public void runAfterLoad() { public void runAfterLoad() {
this.charItemManager = new CharacterItemManager(this);
if (ConfigManager.serverType.equals(ServerType.LOGINSERVER)) if (ConfigManager.serverType.equals(ServerType.LOGINSERVER))
return; return;

2
src/engine/objects/PlayerCharacter.java

@ -211,8 +211,6 @@ public class PlayerCharacter extends AbstractCharacter {
super(rs, true); super(rs, true);
this.charItemManager = new CharacterItemManager(this);
this.runes = DbManager.CharacterRuneQueries.GET_RUNES_FOR_CHARACTER(this.getObjectUUID()); this.runes = DbManager.CharacterRuneQueries.GET_RUNES_FOR_CHARACTER(this.getObjectUUID());
int accountID = rs.getInt("parent"); int accountID = rs.getInt("parent");
this.account = DbManager.AccountQueries.GET_ACCOUNT(accountID); this.account = DbManager.AccountQueries.GET_ACCOUNT(accountID);

Loading…
Cancel
Save