🐞 fix(gvg): 修复消耗道具的推送

This commit is contained in:
luying
2023-02-08 20:18:24 +08:00
parent a19e2f64bd
commit 35778e97ce
2 changed files with 12 additions and 5 deletions

View File

@@ -71,7 +71,9 @@ export async function handleGVGCost(roleId: string, leagueCode: string, sid: str
if(!itemResult) return false;
const decreaseResult = await GVGUserItemModel.decreaseItem(configId, leagueCode, roleId, leagueItems);
return decreaseResult;
const pushGoods = decreaseResult.map(item => ({ id: item.id, count: item.count, expireTime: item.expireTime }));
if(pushGoods.length > 0) await sendMessageToUserWithSuc(roleId, PUSH_ROUTE.LEAGUE_ITEM_UPDATE, { items: pushGoods }, sid);
return true;
}
export function getProduceCoinCnt(items: RewardInter[]) {