Merge pull request #6 from truongdatnhan/eclipse

Moving checking null for storage to when loading character
This commit is contained in:
truongdatnhan
2022-08-11 01:35:38 +07:00
committed by GitHub
23 changed files with 620 additions and 591 deletions

View File

@@ -7402,10 +7402,19 @@ public class Character extends AbstractCharacterObject {
}
}
}
ret.buddylist.loadFromDb(charid);
ret.storage = wserv.getAccountStorage(ret.accountid);
/*
* Bugs when player first time into server
* The storage won't exist so nothing to load
* and must wait until next login
*/
if(ret.storage == null) {
wserv.loadAccountStorage(ret.accountid);
ret.storage = wserv.getAccountStorage(ret.accountid);
}
int startHp = ret.hp, startMp = ret.mp;
ret.reapplyLocalStats();
ret.changeHpMp(startHp, startMp, true);