pvp:修改等级和军功对应关系
This commit is contained in:
@@ -461,6 +461,13 @@ export function getPLvByScore(score: number) {
|
||||
return lv;
|
||||
}
|
||||
|
||||
export function getPlvAndScore(scores: number[] = []) {
|
||||
if(scores.length <= 0) scores = [0];
|
||||
let maxScore = Math.max(...scores); // 等级:军功最高者的军功*6
|
||||
let score = scores.reduce((pre, cur) => pre + cur, 0);
|
||||
return { score, pLv: getPLvByScore(maxScore)};
|
||||
}
|
||||
|
||||
export function getPvpHeroRewardsByScore(score: number) {
|
||||
for (let item of gameData.pvpHeroRewards) {
|
||||
if ((item.max >= score || item.max == -1) && score >= item.min) {
|
||||
|
||||
Reference in New Issue
Block a user