Browse Source

manager init moved to the top of method.

combat-2
MagicBot 1 year ago
parent
commit
70278374e7
  1. 7
      src/engine/objects/PlayerCharacter.java

7
src/engine/objects/PlayerCharacter.java

@ -211,8 +211,11 @@ public class PlayerCharacter extends AbstractCharacter {
* ResultSet Constructor * ResultSet Constructor
*/ */
public PlayerCharacter(ResultSet rs) throws SQLException { public PlayerCharacter(ResultSet rs) throws SQLException {
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);
@ -4560,10 +4563,6 @@ public class PlayerCharacter extends AbstractCharacter {
@Override @Override
public void runAfterLoad() { public void runAfterLoad() {
// Init inventory
this.charItemManager = new CharacterItemManager(this);
Bounds playerBounds = Bounds.borrow(); Bounds playerBounds = Bounds.borrow();
playerBounds.setBounds(this.getLoc()); playerBounds.setBounds(this.getLoc());
this.setBounds(playerBounds); this.setBounds(playerBounds);

Loading…
Cancel
Save