Browse Source

manager init moved to the top of method.

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

Loading…
Cancel
Save