manager init moved to the top of method.

This commit is contained in:
2023-08-25 12:57:21 -04:00
parent ac3588c76a
commit 70278374e7
+3 -4
View File
@@ -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 {
@Override
public void runAfterLoad() {
// Init inventory
this.charItemManager = new CharacterItemManager(this);
Bounds playerBounds = Bounds.borrow();
playerBounds.setBounds(this.getLoc());
this.setBounds(playerBounds);