✨ feat(gvg): 征战中原排行榜奖励
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user