diff --git a/game-server/app/services/orderService.ts b/game-server/app/services/orderService.ts index d3d2fcaa3..f7ab0e5c3 100644 --- a/game-server/app/services/orderService.ts +++ b/game-server/app/services/orderService.ts @@ -17,6 +17,8 @@ import { makeSelfServerShop } from './activity/selfServiceShopActivityService'; import { makeRefreshShopReward } from './activity/refreshShopService'; import { ActivityMonopolyModel, ActivityMonopolyModelType } from '../db/ActivityMonopoly'; import { ActivityMonopolyLandModel, ActivityMonopolyLandModelType } from '../db/ActivityMonopolyLand'; +import { pinus } from 'pinus'; +import { resResult } from '../pubUtils/util'; @@ -137,5 +139,9 @@ export async function makeOrder(localOrderID: string, sid: string, orderInfo: Us rewardResult = STATUS.ERROR_TYPE; break; } + pinus.app.get('channelService').pushMessageByUids('onPlayerDataChange', resResult(STATUS.SUCCESS, { + totalPay: roleInfo.totalPay + }), [{ uid: roleId, sid }]); + return rewardResult } \ No newline at end of file diff --git a/game-server/config/serverProtos.ts b/game-server/config/serverProtos.ts index 916f25303..b51fbceb1 100644 --- a/game-server/config/serverProtos.ts +++ b/game-server/config/serverProtos.ts @@ -36,7 +36,8 @@ module.exports = { 'optional uInt32 coin': 1, 'optional uInt32 giftGold': 2, 'optional uInt32 gold': 3, - 'optional uInt32 ap': 4 + 'optional uInt32 ap': 4, + 'optional uInt32 totalPay': 5 }, 'required string msg': 1, 'required uInt32 code': 2,