普通塔通关 发送广播消息
This commit is contained in:
parent
82a2f11b9a
commit
67dafc242c
@ -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,
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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 { // 创建赛季塔数据
|
||||
|
Loading…
Reference in New Issue
Block a user