pvp:头像框解锁

This commit is contained in:
luying
2021-11-02 19:36:03 +08:00
parent 4fde6af1c4
commit cb3583276c
6 changed files with 21 additions and 9 deletions
+5 -2
View File
@@ -399,13 +399,16 @@ export function getPlayerMainAttribute(heroAttrs: CeAttrData[], roleAttrs: CeAtt
// 获取我方战报记录
export async function generMyRecInfo(pvpDefense: PvpDefenseType, role: RoleType, isSuccess: boolean, pos: number, myHeroes: pvpEndParamInter[]) {
let { attack, defense, heroScores, winStreakNum, score, hisScore } = pvpDefense;
let { attack, defense, heroScores, winStreakNum, hisWinStreakNum = 0, score, hisScore } = pvpDefense;
let { roleId } = role;
if (isSuccess) {
winStreakNum ++;
} else {
winStreakNum = 0;
}
if(winStreakNum > hisWinStreakNum) {
hisWinStreakNum = winStreakNum;
}
const dicOpp = gameData.pvpOpponent.get(pos);
const plusScore = getPlusScore(winStreakNum);
@@ -450,7 +453,7 @@ export async function generMyRecInfo(pvpDefense: PvpDefenseType, role: RoleType,
let newDefense = <Defense>calLineupScore(defense, heroScores);
let updateParam = {
winStreakNum, attack: newAttack, defense: newDefense, heroScores, score: score + addSumScore, hisScore: hisScore > score + addSumScore? hisScore: score + addSumScore
winStreakNum, hisWinStreakNum, attack: newAttack, defense: newDefense, heroScores, score: score + addSumScore, hisScore: hisScore > score + addSumScore? hisScore: score + addSumScore
}
return { attackInfo, showHeroScores, updateParam }
+1 -1
View File
@@ -426,7 +426,7 @@ export async function checkHeroes(roleId: string, hids: number[]) {
return true
}
export async function unlockFigure(sid: string, roleId: string, conditions: { type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number }[], role?: RoleType) {
export async function unlockFigure(sid: string, roleId: string, conditions: { type: number, paramHid?: number, paramFavourLv?: number, paramSkinId?: number, paramWinStreakNum?: number }[], role?: RoleType) {
let figureInfo = await pubUnlockFigure(roleId, conditions, role);
await pushFigureUpdate(roleId, sid, figureInfo);
}