fix 计算队伍等级
This commit is contained in:
@@ -250,7 +250,6 @@ export class PvpHandler {
|
|||||||
let { attackInfo, showHeroScores, addSumScore } = myRecInfo
|
let { attackInfo, showHeroScores, addSumScore } = myRecInfo
|
||||||
|
|
||||||
score += addSumScore;
|
score += addSumScore;
|
||||||
if(score > hisScore) hisScore = score;
|
|
||||||
let pLv = getLvByScore(heroScores);
|
let pLv = getLvByScore(heroScores);
|
||||||
|
|
||||||
const defenseInfo = await generPVPOppRecInfo(isSuccess, curOpp, oppHeroes, role.lv);
|
const defenseInfo = await generPVPOppRecInfo(isSuccess, curOpp, oppHeroes, role.lv);
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export function getFuncsSwitch(id:number) {
|
|||||||
export function getPLvByScore(score: number) {
|
export function getPLvByScore(score: number) {
|
||||||
let lv = 0;
|
let lv = 0;
|
||||||
for(let {teamLv, topFiveMin, topFiveMax} of gameData.pvpTeamLevel) {
|
for(let {teamLv, topFiveMin, topFiveMax} of gameData.pvpTeamLevel) {
|
||||||
if(score > topFiveMin) lv = teamLv;
|
if(score >= topFiveMin) lv = teamLv;
|
||||||
if(score < topFiveMax) break;
|
if(score < topFiveMax) break;
|
||||||
}
|
}
|
||||||
return lv;
|
return lv;
|
||||||
|
|||||||
Reference in New Issue
Block a user