✨ feat(gvg): 征战中原排行榜奖励

This commit is contained in:
luying
2023-02-17 10:58:46 +08:00
parent fc2a86ad81
commit eb772484c2
21 changed files with 678 additions and 100 deletions
@@ -82,4 +82,15 @@ export function getProduceCoinCnt(items: RewardInter[]) {
}
}
return produceCoinCnt;
}
export function combinePushItem(targetItems: RewardInter[], dicItems: RewardInter[]) {
for(let { id, count } of dicItems) {
let obj = targetItems.find(obj => obj.id == id);
if(!obj) {
targetItems.push({ id, count });
} else {
obj.count += count;
}
}
}