fix bug 连胜次数错误

This commit is contained in:
luying
2021-01-09 14:57:31 +08:00
parent 6b64e0cb07
commit 6fae9646c9
2 changed files with 8 additions and 3 deletions

View File

@@ -169,7 +169,14 @@ export class PvpHandler {
if(!curOpp) return resResult(STATUS.PVP_ROLE_NOT_FOUND);
const role = await RoleModel.findByRoleId(roleId);
const myRecInfo = await generMyRecInfo(heroScores, winStreakNum, role, isSuccess, pos, myHeroes);
if(isSuccess) {
winStreakNum ++;
} else {
winStreakNum = 0;
}
let { attackInfo, showHeroScores, addSumScore } = myRecInfo
score += addSumScore;