fix 修复刷新任务数量错误

This commit is contained in:
luying
2020-11-10 19:46:52 +08:00
parent 76e8157ad3
commit 5a700b87c7
5 changed files with 21 additions and 17 deletions

View File

@@ -31,7 +31,7 @@ export async function roleLevelup(roleId: string, kingExp: number) {
export async function checkBattleHeroes(roleId: string, heroes: Array<number>) {
let flag = true;
for(let seqId of heroes) {
let hero = await HeroModel.findBySeqIdAndRole(seqId, roleId);
let hero = await HeroModel.findBySeqIdAndRole(seqId||0, roleId);
if(!hero) flag = false;
}
return flag;