pvp:头像框解锁
This commit is contained in:
@@ -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 }
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user