From 67dafc242c43142f75e8d654ef4b659b550ce33d Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 15 Sep 2022 16:02:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=AE=E9=80=9A=E5=A1=94=E9=80=9A=E5=85=B3?= =?UTF-8?q?=20=E5=8F=91=E9=80=81=E5=B9=BF=E6=92=AD=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/mainline/api_challenge.go | 1 - modules/pagoda/api.go | 8 +++++++- modules/pagoda/api_challengeover.go | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/mainline/api_challenge.go b/modules/mainline/api_challenge.go index 57c67c93f..e9bd2d85b 100644 --- a/modules/mainline/api_challenge.go +++ b/modules/mainline/api_challenge.go @@ -50,7 +50,6 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.MainlineChalle code = pb.ErrorCode_MainlineNotFindChapter return } - code, record := this.module.battle.CreatePveBattle(session, &pb.BattlePVEReq{ Ptype: pb.PlayType_moonfantasy, Leadpos: req.Leadpos, diff --git a/modules/pagoda/api.go b/modules/pagoda/api.go index 3ff2efac1..89f2a20c7 100644 --- a/modules/pagoda/api.go +++ b/modules/pagoda/api.go @@ -1,6 +1,7 @@ package pagoda import ( + "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/modules" ) @@ -17,6 +18,7 @@ type apiComp struct { modules.MCompGate service core.IService module *Pagoda + chat comm.IChat } //组件初始化接口 @@ -30,6 +32,10 @@ func (this *apiComp) Init(service core.IService, module core.IModule, comp core. func (this *apiComp) Start() (err error) { err = this.MCompGate.Start() - + var module core.IModule + if module, err = this.service.GetModule(comm.ModuleChat); err != nil { + return + } + this.chat = module.(comm.IChat) return } diff --git a/modules/pagoda/api_challengeover.go b/modules/pagoda/api_challengeover.go index 0db96a359..04d5627a9 100644 --- a/modules/pagoda/api_challengeover.go +++ b/modules/pagoda/api_challengeover.go @@ -81,6 +81,12 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal code = this.module.ModifyPagodaData(session.GetUserId(), mapData) session.SendMsg(string(this.module.GetType()), PagodaChallengeOverResp, &pb.PagodaChallengeOverResp{Data: pagoda}) + if user := this.module.ModuleUser.GetUser(session.GetUserId()); user != nil { + this.chat.SendSysChatToWorld(comm.EquipmentUpgradeNotice, pagoda.PagodaId, user.Name) + } else { + this.module.Errorf("no found userdata uid:%s", session.GetUserId()) + } + // 普通塔通关了 Nomalcfg := this.module.configure.GetPagodaConfigData(comm.PagodaType, pagoda.PagodaId+1) if Nomalcfg == nil { // 创建赛季塔数据