diff --git a/bin/json/game_worldtask.json b/bin/json/game_worldtask.json index d97da5211..e89b16042 100644 --- a/bin/json/game_worldtask.json +++ b/bin/json/game_worldtask.json @@ -4507,12 +4507,12 @@ "des": 3, "icon": "", "task_Tname": { - "key": "连续战斗10次", - "text": "连续战斗10次" + "key": "连续战斗3次", + "text": "连续战斗3次" }, "task_name": { - "key": "连续战斗10次", - "text": "连续战斗10次" + "key": "连续战斗3次", + "text": "连续战斗3次" }, "npctxt": { "key": "连续战斗10次", @@ -4765,7 +4765,7 @@ "key": 30260, "lock": 1, "lockend": 0, - "ontxe": 20070, + "ontxe": 20020, "id_after": 30270, "group": 440, "des": 3, @@ -4897,7 +4897,7 @@ "key": 30290, "lock": 1, "lockend": 0, - "ontxe": 20080, + "ontxe": 20030, "id_after": 0, "group": 450, "des": 3, @@ -4941,7 +4941,7 @@ "key": 30300, "lock": 1, "lockend": 0, - "ontxe": 20090, + "ontxe": 20030, "id_after": 0, "group": 460, "des": 3, diff --git a/comm/const.go b/comm/const.go index 4b7fa375e..cc1540846 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) @@ -664,12 +664,12 @@ const ( //Rtype178 TaskType = 178 Rtype179 TaskType = 179 //解锁X阶段装备新图纸X个 Rtype180 TaskType = 180 //在X副本内使用好友助战X次 - Rtype181 TaskType = 181 + Rtype181 TaskType = 181 //X维京副本X难度自动战斗X次(接取任务后开始记录,在对应副本的指定难度内,使用自动战斗每有1次,进度便加一) Rtype182 TaskType = 182 //打赢武馆内踢馆X次(接取任务后开始记录,每赢得一次踢馆战斗的胜利,进度便加一) Rtype183 TaskType = 183 //去好友武馆踢馆X次(接取任务后开始记录,每次在好友武馆开启一场踢馆,便进度加一) Rtype184 TaskType = 184 //使用好友武馆木桩X次(接取任务后,每次使用好友的木桩训练英雄一次,进度便加一) Rtype185 TaskType = 185 //完成X次每日1健(接取任务后,每完成1次每日1健,便进度加一) - Rtype186 TaskType = 186 + Rtype186 TaskType = 186 //武馆的派遣悬赏X次(接取任务后开始计算,当玩家的派遣完成1次,进度便加一,不领奖也算一次,只要倒计时结束即可) Rtype187 TaskType = 187 Rtype188 TaskType = 188 //玩家创建1个工会 ) diff --git a/modules/equipment/api_equip.go b/modules/equipment/api_equip.go index cde2244fb..9edb0c8dd 100644 --- a/modules/equipment/api_equip.go +++ b/modules/equipment/api_equip.go @@ -148,6 +148,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) hero.SuiteId = confs[0].Suittype hero.Suite1Star = suite1Str hero.Suite1Lv = suite1Lv + tasks = append(tasks, comm.GettaskParam(comm.Rtype93, 1, hero.SuiteId, suite1Lv)) } } else { hero.SuiteId = 0 @@ -159,6 +160,7 @@ func (this *apiComp) Equip(session comm.IUserSession, req *pb.EquipmentEquipReq) hero.SuiteExtId = confs[4].Suittype hero.Suite2Star = suite2Str hero.Suite2Lv = suite2Lv + tasks = append(tasks, comm.GettaskParam(comm.Rtype93, 1, hero.SuiteExtId, suite2Lv)) } } else { hero.SuiteExtId = 0 diff --git a/modules/hero/api_buy.go b/modules/hero/api_buy.go index 68793866b..322db29bc 100644 --- a/modules/hero/api_buy.go +++ b/modules/hero/api_buy.go @@ -118,7 +118,57 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.HeroBuyReq) (code pb for _, v := range need { if v.A == comm.AttrType && (v.T == comm.ResGold || v.T == comm.ResDiamond) { // this.module.ModuleRtask.SendToRtask(session, comm.Rtype67, v.N, utils.ToInt32(v.T)) - tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, utils.ToInt32(v.T))) + switch v.T { + case comm.ResGold: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 1)) + break + case comm.ResExp: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 3)) + break + case comm.ResDiamond: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.VipExp: + // tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.ResTaskActive: + // tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.ResFriend: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 4)) + break + case comm.StarCoin: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 9)) + break + case comm.SociatyCoin: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 8)) + break + case comm.ArenaCoin: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 11)) + break + case comm.ResPs: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 12)) + break + case comm.Moongold: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 14)) + break + case comm.Talent1: + // tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.Talent2: + // tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.Talent3: + // tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.Talent4: + // tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 2)) + break + case comm.Merchantmoney: + tasks = append(tasks, comm.GettaskParam(comm.Rtype67, v.N, 15)) + break + } + } } go this.module.ModuleRtask.TriggerTask(session.GetUserId(), tasks...) diff --git a/modules/hero/api_talentlearn.go b/modules/hero/api_talentlearn.go index f17c4e486..6c10262c4 100644 --- a/modules/hero/api_talentlearn.go +++ b/modules/hero/api_talentlearn.go @@ -138,7 +138,7 @@ func (this *apiComp) TalentLearn(session comm.IUserSession, req *pb.HeroTalentLe var szTask []*comm.TaskParam // 查询英雄相关信息 if heroObj := this.module.QueryHeroByConfId(session.GetUserId(), talent.HeroId); heroObj != nil { - szTask = append(szTask, comm.GettaskParam(comm.Rtype123, 1, heroObj.Lv, heroObj.Star)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype123, 1, int32(len(talent.Talent)), heroObj.Star)) szTask = append(szTask, comm.GettaskParam(comm.Rtype124, 1)) szTask = append(szTask, comm.GettaskParam(comm.Rtype125, 1, utils.ToInt32(heroObj.HeroID))) cfg := this.module.configure.GetHeroConfig(heroObj.HeroID) diff --git a/modules/rtask/module.go b/modules/rtask/module.go index 5f3aa1b89..004219f4c 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, @@ -220,6 +230,14 @@ func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle } handles = append(handles, handle) this.registerVerifyHandle(v.Id, handle) + case comm.Rtype111: + handle := &rtaskCondHandle{ + condId: v.Id, + verify: this.modelRtask.verifyRtype111, + update: this.modelRtaskRecord.addUpdate, + } + handles = append(handles, handle) + this.registerVerifyHandle(v.Id, handle) default: log.Warnf("rtaskType[%v] handle not register", tt) } diff --git a/modules/rtask/verifyHandle.go b/modules/rtask/verifyHandle.go index a9ce9f144..6f8fada39 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) @@ -450,3 +465,21 @@ func (this *ModelRtask) verifyRtype43(uid string, cfg *cfg.GameRdtaskCondiData, ok = true return } + +func (this *ModelRtask) verifyRtype111(uid string, cfg *cfg.GameRdtaskCondiData, params ...int32) (ok bool, count int32, err error) { + m, err := this.service.GetModule(comm.ModuleHero) + if err != nil { + return + } + + if ml, y := m.(comm.IHero); y { + for _, hero := range ml.GetHeroList(uid) { + if ok, err = soGreatEqual(hero.Lv, cfg.Data2); ok { + count++ + return + } + } + } + ok = true + return +} diff --git a/modules/smithy/api_forgeequip.go b/modules/smithy/api_forgeequip.go index 501f0f664..739f2b933 100644 --- a/modules/smithy/api_forgeequip.go +++ b/modules/smithy/api_forgeequip.go @@ -250,7 +250,7 @@ func (this *apiComp) ForgeEquip(session comm.IUserSession, req *pb.SmithyForgeEq } // 解锁了新的图纸 this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype177, 1)) - this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype179, nextProficiency.Value1, 1)) + this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype179, 1, nextProficiency.Value1)) } // 是否解锁新套装 if nextProficiency.Type == comm.SmithyReelType4 { diff --git a/modules/viking/api_challengeover.go b/modules/viking/api_challengeover.go index 06c335d97..a576e8e24 100644 --- a/modules/viking/api_challengeover.go +++ b/modules/viking/api_challengeover.go @@ -187,7 +187,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal if req.Auto { szTask = append(szTask, comm.GettaskParam(comm.Rtype75, req.BossId, req.Difficulty)) szTask = append(szTask, comm.GettaskParam(comm.Rtype172, 1)) - szTask = append(szTask, comm.GettaskParam(comm.Rtype181, req.BossId, req.Difficulty, 1)) + szTask = append(szTask, comm.GettaskParam(comm.Rtype181, 1, req.BossId, req.Difficulty)) } szTask = append(szTask, comm.GettaskParam(comm.Rtype76, 1, req.BossId)) if bHelp {