From 78312758c2d3db556b6417e7f26ddba6b9a3bb33 Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 15 Sep 2021 18:00:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=EF=BC=9A=E5=85=85=E5=80=BC?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/orderService.ts | 6 ++++++ game-server/config/serverProtos.ts | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) 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,