This commit is contained in:
meixiongfeng 2023-08-09 19:25:59 +08:00
commit 193deb145d
3 changed files with 20 additions and 10 deletions

View File

@ -23,10 +23,11 @@ type Activity struct {
modelhdData *modelhdData
mail comm.Imail
warorder comm.IWarorder // 战令
pay comm.IPay // 支付
shopcenter comm.IShopcenter // 活动中心
addrecharge comm.IAddrecharge // 活动中心
warorder comm.IWarorder // 战令
pay comm.IPay // 支付
shopcenter comm.IShopcenter // 活动中心
addrecharge comm.IAddrecharge // 活动中心
kftask comm.IActivityNotice // 开服任务
}
func NewModule() core.IModule {
@ -77,6 +78,10 @@ func (this *Activity) Start() (err error) {
return
}
this.addrecharge = module.(comm.IAddrecharge)
if module, err = this.service.GetModule(comm.ModuleKFTask); err != nil {
return
}
this.kftask = module.(comm.IActivityNotice)
event.RegisterGO(comm.EventUserLogin, this.EventUserLogin)
if !db.IsCross() {
this.modelhdList.LoadActivityData()
@ -94,6 +99,9 @@ func (this *Activity) Start() (err error) {
case pb.HdType_AddUpRecharge:
this.addrecharge.ActivityOpenNotice(v)
break
case pb.HdType_KFSevenTask:
this.kftask.ActivityOpenNotice(v)
break
}
}
}

View File

@ -116,6 +116,6 @@ func (this *apiComp) Complete(session comm.IUserSession, req *pb.StorylineComple
this.module.modeltask.Change(session.GetUserId(), map[string]interface{}{
"item": info.Item,
})
session.SendMsg(string(this.module.GetType()), "complete", &pb.StorylineCompleteResp{Level: req.Level, Award: award})
session.SendMsg(string(this.module.GetType()), "complete", &pb.StorylineCompleteResp{Level: req.Level, Story: req.Story, Award: award})
return
}

View File

@ -42,20 +42,22 @@ func (this *ModelSys) validCond(uid string, condData *cfg.GameOpencondData) stri
case 2: //关卡ID
// 查询主线进度
if levels := this.moduleSys.mainline.InquireMainLinePassLevel(uid); len(levels) > 0 {
if _, ok := levels[conf.Param]; ok {
return condData.Id
} else {
if _, ok := levels[conf.Param]; !ok {
return ""
}
}
case 3: //世界任务ID
d := this.moduleSys.wtask.InquireCompletes(uid)
ok := false
for _, taskId := range d {
if taskId == conf.Param {
return condData.Id
ok = true
}
}
return ""
if !ok {
return ""
}
case 4:
module, err := this.service.GetModule(comm.ModuleFriend)
if err != nil {