pvp:修复存储roleId字段
This commit is contained in:
@@ -559,13 +559,13 @@ export async function sendPVPRewardToUser(pvpDefense: PvpDefenseType, seasonNum:
|
||||
|
||||
async function resetPvpScores(pvpDefense: PvpDefenseType, seasonNum: number, pvpSeasonResult: PvpSeasonResultType) {
|
||||
let { roleId, attack, defense } = pvpDefense;
|
||||
let { heroScores, score } = pvpSeasonResult;
|
||||
let { newHeroScores, newScore } = pvpSeasonResult;
|
||||
|
||||
let newAttack = <Attack>calLineupScore(attack, heroScores);
|
||||
let newDefense = <Defense>calLineupScore(defense, heroScores);
|
||||
let newAttack = <Attack>calLineupScore(attack, newHeroScores);
|
||||
let newDefense = <Defense>calLineupScore(defense, newHeroScores);
|
||||
|
||||
pvpDefense = await PvpDefenseModel.updateInfoAndInclude(roleId, {
|
||||
heroScores, score, attack: newAttack, defense: newDefense,
|
||||
heroScores: newHeroScores, score: newScore, attack: newAttack, defense: newDefense,
|
||||
seasonNum, challengeCnt: PVP.PVP_CHALLENGE_COUNTS, challengeRefTime: 0, winStreakNum: 0
|
||||
});
|
||||
return pvpDefense;
|
||||
@@ -599,8 +599,11 @@ export async function savePvpSeasonResult(pvpDefense: PvpDefenseType, seasonNum:
|
||||
hid: heroScore.hid, id, count
|
||||
});
|
||||
}
|
||||
newScore += pvpHeroReward.heroscore;
|
||||
} else {
|
||||
newHeroScores.push(heroScore);
|
||||
newScore += heroScore.score;
|
||||
}
|
||||
newScore += heroScore.score;
|
||||
}
|
||||
|
||||
//pvp锁定的信息存入赛季结算表中
|
||||
|
||||
Reference in New Issue
Block a user