计算ap的时候, 判断player是否为空
This commit is contained in:
parent
9f9971bff3
commit
7ba01534ad
@ -248,6 +248,9 @@ let gameUtil = {
|
||||
*/
|
||||
calcTotalAp(player: Player) {
|
||||
let result = 0;
|
||||
if (!player) {
|
||||
return result;
|
||||
}
|
||||
for (let [pid, pet] of player.pets) {
|
||||
result += pet.ap;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user