From da399799ff31b344496102a95c960e5c3e7c2982 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 5 Jan 2023 17:56:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=9F=8B=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 9 ++++++++- modules/gourmet/api_createorder.go | 6 ++++++ modules/smithy/api_createorder.go | 5 +++++ modules/troll/api_buyorsell.go | 2 ++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/comm/const.go b/comm/const.go index 93cbf486c..e52b1f4b1 100644 --- a/comm/const.go +++ b/comm/const.go @@ -260,7 +260,7 @@ const ( //Rpc Rpc_ModuleSociatyUpdate core.Rpc_Key = "Rpc_ModuleSociatyUpdate" //公会任务列表 - Rpc_ModuleSociatyTask core.Rpc_Key = "Rpc_ModuleSociatyTask" + Rpc_ModuleSociatyTask core.Rpc_Key = "Rpc_ModuleSociatyTask" Rpc_ModuleSociatyGetTask core.Rpc_Key = "Rpc_ModuleSociatyGetTask" // RPC 通知来了邮件 @@ -545,6 +545,13 @@ const ( Rtype144 TaskType = 144 //日常任务阵营接取抽卡 Rtype145 TaskType = 145 //周长任务接取抽卡 Rtype146 TaskType = 146 //周长任务阵营接取抽卡 + Rtype147 TaskType = 147 // + Rtype148 TaskType = 148 // + Rtype149 TaskType = 149 // + Rtype150 TaskType = 150 // + Rtype151 TaskType = 151 // + Rtype152 TaskType = 152 // + Rtype153 TaskType = 153 // ) const ( diff --git a/modules/gourmet/api_createorder.go b/modules/gourmet/api_createorder.go index 97f126785..cce211b07 100644 --- a/modules/gourmet/api_createorder.go +++ b/modules/gourmet/api_createorder.go @@ -142,5 +142,11 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreat code = this.module.ModifyGourmetData(session.GetUserId(), mapData) session.SendMsg(string(this.module.GetType()), GourmetCreateOrderResp, &pb.GourmetCreateOrderResp{Data: _gourmet}) + + iTotal := 0 + for _, v := range req.Order { + iTotal += int(v.FoodCount) + } + this.module.ModuleRtask.SendToRtask(session, comm.Rtype150, int32(iTotal)) return } diff --git a/modules/smithy/api_createorder.go b/modules/smithy/api_createorder.go index eff21251b..c042a9b9c 100644 --- a/modules/smithy/api_createorder.go +++ b/modules/smithy/api_createorder.go @@ -107,6 +107,11 @@ func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.SmithyCreate mapData["clang"] = _smithy.Clang // 正在做的 mapData["ctime"] = _smithy.Ctime code = this.module.ModifySmithyData(session.GetUserId(), mapData) + iTotal := 0 + for _, v := range req.Order { + iTotal += int(v.Count) + } + this.module.ModuleRtask.SendToRtask(session, comm.Rtype148, int32(iTotal)) session.SendMsg(string(this.module.GetType()), SmithyCreateOrderResp, &pb.SmithyCreateOrderResp{Data: _smithy}) return diff --git a/modules/troll/api_buyorsell.go b/modules/troll/api_buyorsell.go index 108fcdc39..0ecdd06b2 100644 --- a/modules/troll/api_buyorsell.go +++ b/modules/troll/api_buyorsell.go @@ -169,5 +169,7 @@ func (this *apiComp) BuyOrSell(session comm.IUserSession, req *pb.TrollBuyOrSell if gold != 0 { this.module.record.AddTrollRecord(session.GetUserId(), gold, trolltrain.TarinPos) } + + this.module.ModuleRtask.SendToRtask(session, comm.Rtype151, 1) return }