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

2
src/engine/objects/Mob.java

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

2
src/engine/objects/NPC.java

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

2
src/engine/objects/PlayerCharacter.java

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

Loading…
Cancel
Save