Merge pull request #6 from truongdatnhan/eclipse
Moving checking null for storage to when loading character
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user