任务类型注册修改
This commit is contained in:
parent
0c3b382923
commit
4870ad0bbf
@ -576,7 +576,7 @@ const (
|
||||
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套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。)
|
||||
Rtype93 TaskType = 93 //拥有一套强化到N级的A套装(记录A套装中每个部位的最高强化等级,并将这些强化等级中最低的数值计入进度,如果达到了任务所需的强化等级则完成任务。)
|
||||
Rtype94 TaskType = 94 //装备附魔N次(历史)(从创号开始记录,附魔成功进度+1)
|
||||
Rtype95 TaskType = 95 //装备洗练N次(历史)(从创号开始记录,洗练成功进度+1)
|
||||
Rtype96 TaskType = 96 //强化失败N次(从接到任务开始,强化失败进度+1)
|
||||
|
@ -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,
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user