From 4870ad0bbf42dcf8f685a5b4eea62a4f6775c03c Mon Sep 17 00:00:00 2001 From: wh_zcy Date: Fri, 26 May 2023 15:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E7=B1=BB=E5=9E=8B=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/const.go | 38 +++++++++++++++++------------------ modules/rtask/module.go | 14 +++++++++++-- modules/rtask/verifyHandle.go | 19 ++++++++++++++++-- 3 files changed, 48 insertions(+), 23 deletions(-) diff --git a/comm/const.go b/comm/const.go index 4b7fa375e..61b8bb9ee 100644 --- a/comm/const.go +++ b/comm/const.go @@ -558,25 +558,25 @@ const ( Rtype72 TaskType = 72 //完成一次捏人 Rtype73 TaskType = 73 //通关难度A维京远征指定BOSSN次(从接到任务开始,只有通关A难度进度才+1) //Rtype74 TaskType = 74 //通关难度A维京远征指定BOSS(检查最高难度记录是否超过了此难度,超过则完成) - Rtype75 TaskType = 75 //自动战斗通关难度A的维京远征指定BOSS(从接到任务开始,若全程无手动操作(不包含变速)且挑战难度大于等于A则判断任务完成) - Rtype76 TaskType = 76 //通关维京远征指定BOSSN次(从创号开始记录,通关任意难度进度都+1) - Rtype77 TaskType = 77 //通关难度A及以上维京远征指定BOSSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) - Rtype78 TaskType = 78 //通关难度A维京远征指定BOSS时间达到XX秒以内(检查最高记录是否超过了此难度,超过则完成) - Rtype79 TaskType = 79 //使用好友助战英雄通关A难度的指定维京远征BOSS(从接到任务开始,通关阵营中包含好友助战英雄,难度大于等于A的指定维京远征BOSS时任务完成。) - Rtype80 TaskType = 80 //通关难度A指定狩猎BOOS难度N次(从接到任务开始,只有通关A难度进度才+1) - Rtype81 TaskType = 81 //通关A难度狩猎BOOS(检查最高难度记录是否达到了此难度,达到则完成) - Rtype82 TaskType = 82 //通关狩猎指定BOOSN次(历史)(从创号开始记录登陆天数,通关任意难度进度都+1) - Rtype83 TaskType = 83 //通关难度A及以上指定狩猎BOOSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) - Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) - Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) - Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成) - Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1) - Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1(耗尽BOSS挑战次数)) - Rtype89 TaskType = 89 //任意招募N次(从接到任务开始,普通招募和阵营招募都算,单抽1次,10连抽算10次) - Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) - Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) - Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1) - // Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。) + Rtype75 TaskType = 75 //自动战斗通关难度A的维京远征指定BOSS(从接到任务开始,若全程无手动操作(不包含变速)且挑战难度大于等于A则判断任务完成) + Rtype76 TaskType = 76 //通关维京远征指定BOSSN次(从创号开始记录,通关任意难度进度都+1) + Rtype77 TaskType = 77 //通关难度A及以上维京远征指定BOSSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) + Rtype78 TaskType = 78 //通关难度A维京远征指定BOSS时间达到XX秒以内(检查最高记录是否超过了此难度,超过则完成) + Rtype79 TaskType = 79 //使用好友助战英雄通关A难度的指定维京远征BOSS(从接到任务开始,通关阵营中包含好友助战英雄,难度大于等于A的指定维京远征BOSS时任务完成。) + Rtype80 TaskType = 80 //通关难度A指定狩猎BOOS难度N次(从接到任务开始,只有通关A难度进度才+1) + Rtype81 TaskType = 81 //通关A难度狩猎BOOS(检查最高难度记录是否达到了此难度,达到则完成) + Rtype82 TaskType = 82 //通关狩猎指定BOOSN次(历史)(从创号开始记录登陆天数,通关任意难度进度都+1) + Rtype83 TaskType = 83 //通关难度A及以上指定狩猎BOOSN次(从接到任务开始,若通关难度大于等于设定难度,则进度+1) + Rtype84 TaskType = 84 //普通塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) + Rtype85 TaskType = 85 //赛季塔达到XX层(检查最高难度记录是否达到了此难度,达到则完成) + Rtype86 TaskType = 86 //本赛季的赛季塔达到XX层(检查本赛季最高难度记录是否达到了此难度,达到则完成) + Rtype87 TaskType = 87 //发现月之秘境N次(从接到任务开始,发现一次则进度+1) + Rtype88 TaskType = 88 //完成月之秘境N次(从接到任务开始,打完一个月之秘境则进度+1(耗尽BOSS挑战次数)) + Rtype89 TaskType = 89 //任意招募N次(从接到任务开始,普通招募和阵营招募都算,单抽1次,10连抽算10次) + Rtype90 TaskType = 90 //进行N次普通招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) + Rtype91 TaskType = 91 //进行N次阵营招募10连抽(从接到任务开始,单抽点10次不算,10连抽才进度+1) + Rtype92 TaskType = 92 //强化装备N次(从接到任务开始,强化任意装备,失败和成功进度都+1) + Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。) Rtype94 TaskType = 94 //装备附魔N次(历史)(从创号开始记录,附魔成功进度+1) Rtype95 TaskType = 95 //装备洗练N次(历史)(从创号开始记录,洗练成功进度+1) Rtype96 TaskType = 96 //强化失败N次(从接到任务开始,强化失败进度+1) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 5f3aa1b89..f8901773a 100644 --- a/modules/rtask/module.go +++ b/modules/rtask/module.go @@ -80,7 +80,7 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle for _, v := range this.configure.getRtaskCondis(int32(tt)) { switch tt { // 两个参数 大于1个参数且第一个参数累计,第二个参数等于 - case comm.Rtype1, comm.Rtype16, comm.Rtype17, comm.Rtype50, comm.Rtype51, + case comm.Rtype1, comm.Rtype16, comm.Rtype17, comm.Rtype51, comm.Rtype125, comm.Rtype126, comm.Rtype127, comm.Rtype187: handle := &rtaskCondHandle{ condId: v.Id, @@ -99,6 +99,15 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle } handles = append(handles, handle) this.registerVerifyHandle(v.Id, handle) + // 两个参数 第一个参数累计 第二个参数大于等于 + case comm.Rtype50: + handle := &rtaskCondHandle{ + condId: v.Id, + verify: this.modelRtaskRecord.veriftyGreatEqualParam, + update: this.modelRtaskRecord.addUpdate, + } + handles = append(handles, handle) + this.registerVerifyHandle(v.Id, handle) // 两个参数 第一个大于等于 第二个等于 case comm.Rtype61, comm.Rtype159, comm.Rtype160, comm.Rtype75: handle := &rtaskCondHandle{ @@ -188,7 +197,8 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle } handles = append(handles, handle) this.registerVerifyHandle(v.Id, handle) - case comm.Rtype73, comm.Rtype77, comm.Rtype80, comm.Rtype83: + // 三个参数 第二个等于 第三个大于等于 + case comm.Rtype73, comm.Rtype77, comm.Rtype80, comm.Rtype83, comm.Rtype93: handle := &rtaskCondHandle{ condId: v.Id, verify: this.modelRtaskRecord.verifyThirdGreatEqualParam, diff --git a/modules/rtask/verifyHandle.go b/modules/rtask/verifyHandle.go index a9ce9f144..4800e0469 100644 --- a/modules/rtask/verifyHandle.go +++ b/modules/rtask/verifyHandle.go @@ -98,7 +98,7 @@ func (this *ModelRtaskRecord) verifyFirstGreatEqualParam(uid string, cfg *cfg.Ga // three params (first-greatEqual second-equal third-lessEqual) func (this *ModelRtaskRecord) verifyThirdLessEqualParam(uid string, cfg *cfg.GameRdtaskCondiData, params ...int32) (ok bool, count int32, err error) { - if len(params) == 0 { + if len(params) != 3 { err = errors.New("玩家参数数据缺失") return } @@ -127,7 +127,7 @@ func (this *ModelRtaskRecord) verifyThirdLessEqualParam(uid string, cfg *cfg.Gam // three params (first-greatEqual second-equal third-greatEqual) func (this *ModelRtaskRecord) verifyThirdGreatEqualParam(uid string, cfg *cfg.GameRdtaskCondiData, params ...int32) (ok bool, count int32, err error) { - if len(params) == 0 { + if len(params) != 3 { err = errors.New("玩家参数数据缺失") return } @@ -179,6 +179,21 @@ func (this *ModelRtaskRecord) veriftyEqualParam(uid string, cfg *cfg.GameRdtaskC return } +// two params (first-Equal second-GreatEqual) +func (this *ModelRtaskRecord) veriftyGreatEqualParam(uid string, cfg *cfg.GameRdtaskCondiData, params ...int32) (ok bool, count int32, err error) { + if len(params) != 2 { + err = errors.New("玩家参数数据缺失") + return + } + // var paramLen int + if _, err = lenParam(cfg, params...); err == nil { + if ok, err = soGreatEqual(params[1], cfg.Data2); !ok { + return + } + } + return +} + // 英雄指定 func (this *ModelRtask) verfiyRtype1(uid string, cfg *cfg.GameRdtaskCondiData, params ...int32) (ok bool, err error) { heroModule, err := this.service.GetModule(comm.ModuleHero)