镇念塔:派遣奖励不叠在一起

This commit is contained in:
luying
2021-09-27 20:47:03 +08:00
parent 56ef1cd7c5
commit 9270448d8a
+3 -2
View File
@@ -218,8 +218,9 @@ export async function addItems(roleId: string, roleName: string, sid: string, go
gold: role.gold, coin: role.coin, ap: addAp
}), uids);
if(gold.length > 0) {
let goldCount = gold.reduce((pre, cur) => { return pre + cur.count }, 0)
showItems.push(getGoldObject(goldCount));
gold.forEach(({ count }) => {
showItems.push(getGoldObject(count));
});
}
if(coin > 0) {
showItems.push(getCoinObject(coin));