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 { // 创建赛季塔数据