战斗:星级

This commit is contained in:
luying
2021-11-11 18:05:52 +08:00
parent 95c05168da
commit 2b809c8016

View File

@@ -122,7 +122,8 @@ export function calculateWarStar(warStar: WarStar[] = [], battleId: number, star
let hasFound = false;
for(let curWarStar of warStar) {
if(curWarStar.id == battleId) {
newStars = uniq([...stars, ...curWarStar.stars]);
let oldStars = curWarStar.stars||[];
newStars = uniq([...stars, ...oldStars]);
newStar = newStars.filter(cur => cur > 0).length;
newWarStars.push({...curWarStar, star: newStar, stars: newStars});
hasFound = true;