From 4f18818c37b68b158037abedea50526668830c68 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Wed, 9 Aug 2023 18:25:46 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/activity/module.go | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/activity/module.go b/modules/activity/module.go index 39fe901ee..a19b5a77f 100644 --- a/modules/activity/module.go +++ b/modules/activity/module.go @@ -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 } } } From b6120c49f585e7e60ef3ec7ef5fb000df92d56e8 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Wed, 9 Aug 2023 18:38:13 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E5=BC=80=E5=90=AF=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sys/model_sys.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/sys/model_sys.go b/modules/sys/model_sys.go index aa41e0792..5e1ee6670 100644 --- a/modules/sys/model_sys.go +++ b/modules/sys/model_sys.go @@ -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 { From 503d47db873bf129f995763729bdc43a5797dbc7 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Wed, 9 Aug 2023 19:04:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/storyline/api_complete.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/storyline/api_complete.go b/modules/storyline/api_complete.go index 0bebf65b7..2c9d85c32 100644 --- a/modules/storyline/api_complete.go +++ b/modules/storyline/api_complete.go @@ -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 }