Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
458c2347a6
File diff suppressed because it is too large
Load Diff
@ -118,7 +118,7 @@ func (this *RtaskTestView) CreateView(t *model.TestCase) fyne.CanvasObject {
|
|||||||
logrus.Error(err)
|
logrus.Error(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logrus.Debugf("执行任务 id:%v rtype:%v params:%v", condId, rtype, p)
|
// logrus.Debugf("执行任务 id:%v rtype:%v params:%v", condId, rtype, p)
|
||||||
msgs = append(msgs, fmt.Sprintf("condId:%v rtype:%v params:%v", condId, rtype, p))
|
msgs = append(msgs, fmt.Sprintf("condId:%v rtype:%v params:%v", condId, rtype, p))
|
||||||
}(v.Id, v.Type, p)
|
}(v.Id, v.Type, p)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
@ -202,9 +202,9 @@ func (this *RtaskTestView) rtestListener() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if !rsp.Flag {
|
// if !rsp.Flag {
|
||||||
logrus.Debug(fmt.Sprintf("%v", rsp.Flag))
|
logrus.Debug(fmt.Sprintf("%v - %v", rsp.RtaskType, rsp.Flag))
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -655,6 +655,7 @@ const (
|
|||||||
Rtype184 TaskType = 184 //使用好友武馆木桩X次(接取任务后,每次使用好友的木桩训练英雄一次,进度便加一)
|
Rtype184 TaskType = 184 //使用好友武馆木桩X次(接取任务后,每次使用好友的木桩训练英雄一次,进度便加一)
|
||||||
Rtype185 TaskType = 185 //完成X次每日1健(接取任务后,每完成1次每日1健,便进度加一)
|
Rtype185 TaskType = 185 //完成X次每日1健(接取任务后,每完成1次每日1健,便进度加一)
|
||||||
Rtype186 TaskType = 186
|
Rtype186 TaskType = 186
|
||||||
|
Rtype187 TaskType = 187
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -221,6 +221,8 @@ type (
|
|||||||
IRtask interface {
|
IRtask interface {
|
||||||
// 条件校验
|
// 条件校验
|
||||||
CheckCondi(uid string, condiId int32) (code pb.ErrorCode)
|
CheckCondi(uid string, condiId int32) (code pb.ErrorCode)
|
||||||
|
// 多条件校验
|
||||||
|
CheckCondis(uid string, condiIds ...int32) (condIds []int32)
|
||||||
// 远程任务条件校验
|
// 远程任务条件校验
|
||||||
RemoteCheckCondi(uid string, condiId int32, rsp *pb.DBRtaskRecord) error
|
RemoteCheckCondi(uid string, condiId int32, rsp *pb.DBRtaskRecord) error
|
||||||
// 删除任务条件数据
|
// 删除任务条件数据
|
||||||
|
@ -16,6 +16,7 @@ func (this *apiComp) Getall(session comm.IUserSession, req *pb.OldtimesGetallReq
|
|||||||
rsp := &pb.OldtimesGetallResp{}
|
rsp := &pb.OldtimesGetallResp{}
|
||||||
d := this.module.modelOldtimes.getDBOldtimes(uid)
|
d := this.module.modelOldtimes.getDBOldtimes(uid)
|
||||||
|
|
||||||
|
// 解锁的关卡
|
||||||
var unlockLevelIds []int32
|
var unlockLevelIds []int32
|
||||||
// 更新关卡状态
|
// 更新关卡状态
|
||||||
if imodule, err := this.service.GetModule(comm.ModuleCombat); err == nil {
|
if imodule, err := this.service.GetModule(comm.ModuleCombat); err == nil {
|
||||||
@ -36,6 +37,7 @@ func (this *apiComp) Getall(session comm.IUserSession, req *pb.OldtimesGetallReq
|
|||||||
if err := this.module.modelOldtimes.updateOldtimes(uid, d); err != nil {
|
if err := this.module.modelOldtimes.updateOldtimes(uid, d); err != nil {
|
||||||
this.module.Error("oldtime更新失败",
|
this.module.Error("oldtime更新失败",
|
||||||
log.Field{Key: "uid", Value: uid})
|
log.Field{Key: "uid", Value: uid})
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
unlockLevelIds = append(unlockLevelIds, level.Lid)
|
unlockLevelIds = append(unlockLevelIds, level.Lid)
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,9 @@ package rtask
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"go_dreamfactory/comm"
|
"go_dreamfactory/comm"
|
||||||
"go_dreamfactory/lego/sys/log"
|
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,9 +15,9 @@ func (this *apiComp) RtestCheck(session comm.IUserSession, req *pb.RtaskTestReq)
|
|||||||
func (this *apiComp) Rtest(session comm.IUserSession, req *pb.RtaskTestReq) (code pb.ErrorCode, data *pb.ErrorData) {
|
func (this *apiComp) Rtest(session comm.IUserSession, req *pb.RtaskTestReq) (code pb.ErrorCode, data *pb.ErrorData) {
|
||||||
rsp := &pb.RtaskTestResp{Flag: true}
|
rsp := &pb.RtaskTestResp{Flag: true}
|
||||||
if req.CondiId != 0 {
|
if req.CondiId != 0 {
|
||||||
if err, ok := this.moduleRtask.modelRtask.checkCondi(session.GetUserId(), req.CondiId); !ok {
|
if code = this.moduleRtask.CheckCondi(session.GetUserId(), req.CondiId); code != pb.ErrorCode_Success {
|
||||||
rsp.Flag = false
|
rsp.Flag = false
|
||||||
log.Errorf("%v", errors.WithMessage(err, session.GetUserId()))
|
return
|
||||||
}
|
}
|
||||||
} else if req.GroupId != 0 {
|
} else if req.GroupId != 0 {
|
||||||
// 获取当前玩家
|
// 获取当前玩家
|
||||||
@ -53,6 +51,7 @@ func (this *apiComp) Rtest(session comm.IUserSession, req *pb.RtaskTestReq) (cod
|
|||||||
TT: comm.TaskType(req.RtaskType),
|
TT: comm.TaskType(req.RtaskType),
|
||||||
Params: req.Params,
|
Params: req.Params,
|
||||||
})
|
})
|
||||||
|
|
||||||
rsp.Flag = true
|
rsp.Flag = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,286 +0,0 @@
|
|||||||
package rtask
|
|
||||||
|
|
||||||
import (
|
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (this *ModelRtaskRecord) equalFirstParam(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
|
|
||||||
//只查询参数于配置相等的情况下设置condiId,否则返回0
|
|
||||||
if ok, err1 := soEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
condiId = cfg.Id
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ModelRtaskRecord) greatEqualFirstParam(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
|
|
||||||
if ok, err1 := soGreatEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
condiId = cfg.Id
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 传递参数小于等于配置参数
|
|
||||||
// 适合只比较首个参数(一个参数)
|
|
||||||
func (this *ModelRtaskRecord) lessEqualFirstParam(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
|
|
||||||
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
condiId = cfg.Id
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 与每个参数比较
|
|
||||||
func (this *ModelRtaskRecord) equalParams(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
|
|
||||||
var (
|
|
||||||
paramLen int
|
|
||||||
)
|
|
||||||
if paramLen, err = lenParam(cfg, vals...); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
switch paramLen {
|
|
||||||
case 1:
|
|
||||||
if ok, err1 := soEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
if ok, err1 := soEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
if ok, err1 := soEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
if ok, err1 := soEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[3], cfg.Data4); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 5:
|
|
||||||
if ok, err1 := soEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[3], cfg.Data4); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soEqual(vals[4], cfg.Data5); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
condiId = cfg.Id
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *ModelRtaskRecord) greatThanParams(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
|
|
||||||
var (
|
|
||||||
paramLen int
|
|
||||||
)
|
|
||||||
if paramLen, err = lenParam(cfg, vals...); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
switch paramLen {
|
|
||||||
case 1:
|
|
||||||
if ok, err1 := soGreatEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
if ok, err1 := soGreatEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
if ok, err1 := soGreatEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
if ok, err1 := soGreatEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[3], cfg.Data4); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 5:
|
|
||||||
if ok, err1 := soGreatEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[3], cfg.Data4); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[4], cfg.Data5); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
condiId = cfg.Id
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 需要累加更新的查询
|
|
||||||
func (this *ModelRtaskRecord) lessThanParams(cfg *cfg.GameRdtaskCondiData, vals ...int32) (condiId int32, err error) {
|
|
||||||
var (
|
|
||||||
paramLen int
|
|
||||||
)
|
|
||||||
if paramLen, err = lenParam(cfg, vals...); err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
switch paramLen {
|
|
||||||
case 1:
|
|
||||||
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[3], cfg.Data4); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
case 5:
|
|
||||||
if ok, err1 := soLessEqual(vals[0], cfg.Data1); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[1], cfg.Data2); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[2], cfg.Data3); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[3], cfg.Data4); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if ok, err1 := soGreatEqual(vals[4], cfg.Data5); !ok {
|
|
||||||
err = errors.WithMessagef(err1, "id: %v type:%v vals:%v", cfg.Id, cfg.Type, vals)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
condiId = cfg.Id
|
|
||||||
return
|
|
||||||
}
|
|
@ -34,6 +34,7 @@ func (this *ModelRtaskRecord) Init(service core.IService, module core.IModule, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取玩家待校验数据
|
// 获取玩家待校验数据
|
||||||
|
// Deprecated
|
||||||
func (this *ModelRtaskRecord) GetVerifyData(uid string, condiId int32) (*pb.RtaskData, error) {
|
func (this *ModelRtaskRecord) GetVerifyData(uid string, condiId int32) (*pb.RtaskData, error) {
|
||||||
record := &pb.DBRtaskRecord{}
|
record := &pb.DBRtaskRecord{}
|
||||||
err := this.Get(uid, record)
|
err := this.Get(uid, record)
|
||||||
|
@ -72,7 +72,7 @@ func (this *ModelRtask) GetRtask(uid string) *pb.DBRtask {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// 确定选项前的校验
|
// 确定选项前的校验
|
||||||
func (this *ModelRtask) checkCondi(uid string, condiId int32) (err error, ok bool) {
|
func (this *ModelRtask) checkCondi(uid string, condiId int32, record *pb.DBRtaskRecord) (err error, ok bool) {
|
||||||
if condiId <= 0 {
|
if condiId <= 0 {
|
||||||
return nil, true
|
return nil, true
|
||||||
}
|
}
|
||||||
@ -110,7 +110,7 @@ func (this *ModelRtask) checkCondi(uid string, condiId int32) (err error, ok boo
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if ok, err = condi.verify(uid, conf); !ok {
|
if ok, err = condi.verify(uid, record, conf); !ok {
|
||||||
err = errors.WithMessagef(err, "uid: %v do rtask [condiId:%v] condition not reach", uid, condiId)
|
err = errors.WithMessagef(err, "uid: %v do rtask [condiId:%v] condition not reach", uid, condiId)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -24,14 +24,14 @@ var _ comm.IRtask = (*ModuleRtask)(nil)
|
|||||||
|
|
||||||
// 限定条件
|
// 限定条件
|
||||||
type rtaskCondHandle struct {
|
type rtaskCondHandle struct {
|
||||||
condId int32 //任务条件配置ID
|
condId int32 //任务条件配置ID
|
||||||
verify verifyHandle //校验任务条件
|
verify verifyHandle //校验任务条件
|
||||||
find condiFindHandle //检索任务条件
|
|
||||||
update updateDataHandle //更新任务数据
|
update updateDataHandle //更新任务数据
|
||||||
}
|
}
|
||||||
|
|
||||||
type verifyHandle func(uid string, cfg *cfg.GameRdtaskCondiData) (bool, error)
|
// 任务参数校验
|
||||||
type condiFindHandle func(cfg *cfg.GameRdtaskCondiData, vals ...int32) (int32, error)
|
type verifyHandle func(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (bool, error)
|
||||||
|
// 任务数据更新
|
||||||
type updateDataHandle func(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData, vals ...int32) error
|
type updateDataHandle func(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData, vals ...int32) error
|
||||||
|
|
||||||
type ModuleRtask struct {
|
type ModuleRtask struct {
|
||||||
@ -75,193 +75,117 @@ func (this *ModuleRtask) registerVerifyHandle(condiId int32, condi *rtaskCondHan
|
|||||||
this.handleMap.Store(condiId, condi)
|
this.handleMap.Store(condiId, condi)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModuleRtask) getHandle(tt comm.TaskType) (condis []*rtaskCondHandle) {
|
func (this *ModuleRtask) getHandle(tt comm.TaskType) (handles []*rtaskCondHandle) {
|
||||||
for _, v := range this.configure.getRtaskCondis(int32(tt)) {
|
for _, v := range this.configure.getRtaskCondis(int32(tt)) {
|
||||||
switch tt {
|
switch tt {
|
||||||
case comm.Rtype1:
|
case comm.Rtype1:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
verify: this.modelRtaskRecord.verifyGreatEqual,
|
||||||
verify: this.modelRtask.verfiyRtype1,
|
|
||||||
update: this.modelRtaskRecord.addUpdate,
|
update: this.modelRtaskRecord.addUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype2:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verifyRtype2,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
|
||||||
}
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype3:
|
case comm.Rtype3:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verifyRtype3,
|
verify: this.modelRtask.verifyRtype3,
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype4:
|
case comm.Rtype4, comm.Rtype5, comm.Rtype6, comm.Rtype8, comm.Rtype10:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
verify: this.modelRtaskRecord.verifyGreatEqual,
|
||||||
verify: this.modelRtask.verifyRtype4,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype5:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verifyRtype5,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
|
||||||
}
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype6:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verifyRtype6,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
|
||||||
}
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype8:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verfiyRtype8,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
|
||||||
}
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype9:
|
case comm.Rtype9:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verfiyRtype9,
|
verify: this.modelRtask.verfiyRtype9,
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype10:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verfiyRtype10,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
|
||||||
}
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype11, comm.Rtype84, comm.Rtype85:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.lessEqualFirstParam,
|
|
||||||
verify: this.modelRtaskRecord.verifyFirstGreatEqualParam,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
|
||||||
}
|
|
||||||
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype18:
|
case comm.Rtype18:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.greatEqualFirstParam,
|
|
||||||
verify: this.modelRtaskRecord.verifyFirstGreatEqualParam,
|
verify: this.modelRtaskRecord.verifyFirstGreatEqualParam,
|
||||||
update: this.modelRtaskRecord.addUpdate,
|
update: this.modelRtaskRecord.addUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype7, comm.Rtype12, comm.Rtype13, comm.Rtype14, comm.Rtype15,
|
case comm.Rtype7, comm.Rtype12, comm.Rtype13, comm.Rtype14, comm.Rtype15,
|
||||||
comm.Rtype19, comm.Rtype21, comm.Rtype24,
|
comm.Rtype19, comm.Rtype21, comm.Rtype24,
|
||||||
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
|
comm.Rtype26, comm.Rtype27, comm.Rtype28, comm.Rtype38,
|
||||||
comm.Rtype39, comm.Rtype51, comm.Rtype53,
|
comm.Rtype39, comm.Rtype51, comm.Rtype53,
|
||||||
comm.Rtype54, comm.Rtype57, comm.Rtype58, comm.Rtype60,
|
comm.Rtype54, comm.Rtype57, comm.Rtype60,
|
||||||
comm.Rtype62, comm.Rtype64, comm.Rtype69, comm.Rtype72, comm.Rtype88, comm.Rtype104,
|
comm.Rtype62, comm.Rtype64, comm.Rtype88, comm.Rtype104,
|
||||||
comm.Rtype96, comm.Rtype105, comm.Rtype128, comm.Rtype130, comm.Rtype131,
|
comm.Rtype96, comm.Rtype105, comm.Rtype128, comm.Rtype130, comm.Rtype131,
|
||||||
comm.Rtype141, comm.Rtype142, comm.Rtype143, comm.Rtype144, comm.Rtype145, comm.Rtype146,
|
comm.Rtype141, comm.Rtype142, comm.Rtype143, comm.Rtype144, comm.Rtype145, comm.Rtype146,
|
||||||
comm.Rtype147, comm.Rtype149, comm.Rtype153, comm.Rtype154, comm.Rtype155, comm.Rtype156,
|
comm.Rtype147, comm.Rtype149, comm.Rtype153, comm.Rtype154, comm.Rtype155, comm.Rtype156,
|
||||||
comm.Rtype171, comm.Rtype186:
|
comm.Rtype171, comm.Rtype186, comm.Rtype187:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.lessEqualFirstParam,
|
|
||||||
verify: this.modelRtaskRecord.verifyFirstGreatEqualParam,
|
verify: this.modelRtaskRecord.verifyFirstGreatEqualParam,
|
||||||
update: this.modelRtaskRecord.addUpdate,
|
update: this.modelRtaskRecord.addUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype50, comm.Rtype73:
|
case comm.Rtype50, comm.Rtype73:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.lessEqualFirstParam,
|
verify: this.modelRtaskRecord.verifyGreatEqual,
|
||||||
verify: this.modelRtaskRecord.verifyFromDb,
|
|
||||||
update: this.modelRtaskRecord.addUpdate,
|
update: this.modelRtaskRecord.addUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype20:
|
case comm.Rtype20:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verifyRtype20,
|
verify: this.modelRtask.verifyRtype20,
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
}
|
}
|
||||||
|
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype22, comm.Rtype109:
|
case comm.Rtype109:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtaskRecord.verifyFirstEqualParam,
|
verify: this.modelRtaskRecord.verifyFirstEqualParam,
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
}
|
}
|
||||||
|
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype63:
|
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
|
||||||
find: this.modelRtaskRecord.equalFirstParam,
|
|
||||||
verify: this.modelRtask.verifyRtype63,
|
|
||||||
update: this.modelRtaskRecord.addUpdate,
|
|
||||||
}
|
|
||||||
condis = append(condis, condi)
|
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
|
||||||
case comm.Rtype16, comm.Rtype17,
|
case comm.Rtype16, comm.Rtype17,
|
||||||
comm.Rtype35, comm.Rtype44,
|
comm.Rtype35, comm.Rtype61:
|
||||||
comm.Rtype59, comm.Rtype61:
|
handle := &rtaskCondHandle{
|
||||||
condi := &rtaskCondHandle{
|
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.equalParams,
|
verify: this.modelRtaskRecord.verifyGreatEqual,
|
||||||
verify: this.modelRtaskRecord.verifyFromDb,
|
|
||||||
update: this.modelRtaskRecord.overrideUpdate,
|
update: this.modelRtaskRecord.overrideUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
case comm.Rtype23, comm.Rtype25, comm.Rtype29, comm.Rtype30, comm.Rtype31,
|
case comm.Rtype23, comm.Rtype25, comm.Rtype30,
|
||||||
comm.Rtype32, comm.Rtype33, comm.Rtype34, comm.Rtype36,
|
comm.Rtype32, comm.Rtype33, comm.Rtype34, comm.Rtype36,
|
||||||
comm.Rtype37, comm.Rtype40, comm.Rtype41,
|
comm.Rtype37, comm.Rtype40, comm.Rtype41,
|
||||||
comm.Rtype42, comm.Rtype43, comm.Rtype45,
|
comm.Rtype42, comm.Rtype43,
|
||||||
comm.Rtype46, comm.Rtype47, comm.Rtype48, comm.Rtype49,
|
comm.Rtype46, comm.Rtype47,
|
||||||
comm.Rtype52, comm.Rtype55, comm.Rtype56,
|
comm.Rtype52, comm.Rtype55, comm.Rtype56,
|
||||||
comm.Rtype65, comm.Rtype66, comm.Rtype67, comm.Rtype68, comm.Rtype70, comm.Rtype140:
|
comm.Rtype65, comm.Rtype66, comm.Rtype67, comm.Rtype68, comm.Rtype70, comm.Rtype140:
|
||||||
condi := &rtaskCondHandle{
|
handle := &rtaskCondHandle{
|
||||||
condId: v.Id,
|
condId: v.Id,
|
||||||
find: this.modelRtaskRecord.lessThanParams,
|
verify: this.modelRtaskRecord.verifyGreatEqual,
|
||||||
verify: this.modelRtaskRecord.verifyFromDb,
|
|
||||||
update: this.modelRtaskRecord.addUpdate,
|
update: this.modelRtaskRecord.addUpdate,
|
||||||
}
|
}
|
||||||
condis = append(condis, condi)
|
handles = append(handles, handle)
|
||||||
this.registerVerifyHandle(v.Id, condi)
|
this.registerVerifyHandle(v.Id, handle)
|
||||||
default:
|
default:
|
||||||
log.Warnf("rtaskType[%v] not register", tt)
|
log.Warnf("rtaskType[%v] handle not register", tt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
@ -410,10 +334,30 @@ func (this *ModuleRtask) TriggerTask(uid string, taskParams ...*comm.TaskParam)
|
|||||||
|
|
||||||
// 任务条件校验
|
// 任务条件校验
|
||||||
func (this *ModuleRtask) CheckCondi(uid string, condiId int32) (code pb.ErrorCode) {
|
func (this *ModuleRtask) CheckCondi(uid string, condiId int32) (code pb.ErrorCode) {
|
||||||
// this.Debug("检查任务条件", log.Field{Key: "uid", Value: uid}, log.Field{Key: "condiId", Value: condiId})
|
record := this.modelRtaskRecord.getRecord(uid)
|
||||||
if _, ok := this.modelRtask.checkCondi(uid, condiId); !ok {
|
if record == nil {
|
||||||
code = pb.ErrorCode_RtaskCondiNoReach
|
code = pb.ErrorCode_DataNotFound
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
if _, ok := this.modelRtask.checkCondi(uid, condiId, record); !ok {
|
||||||
|
code = pb.ErrorCode_RtaskCondiNoReach
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *ModuleRtask) CheckCondis(uid string, condiIds ...int32) (condIds []int32) {
|
||||||
|
record := this.modelRtaskRecord.getRecord(uid)
|
||||||
|
if record == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, condId := range condIds {
|
||||||
|
if _, ok := this.modelRtask.checkCondi(uid, condId, record); ok {
|
||||||
|
condIds = append(condIds, condId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,99 +11,103 @@ import (
|
|||||||
"github.com/spf13/cast"
|
"github.com/spf13/cast"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (this *ModelRtaskRecord) verifyFromDb(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
// GreatEqual
|
||||||
var rd *pb.RtaskData
|
func (this *ModelRtaskRecord) verifyGreatEqual(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
if rd, err = this.GetVerifyData(uid, cfg.Id); rd != nil {
|
if record == nil {
|
||||||
if len(rd.Data) == 0 {
|
err = errors.WithMessagef(err, "玩家数据DBRtaskRecord空")
|
||||||
err = errors.WithMessagef(err, "玩家参数数据缺失 %v", rd.Data)
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if v, f := record.Vals[cfg.Id]; f {
|
||||||
|
if len(v.Data) == 0 {
|
||||||
|
err = errors.WithMessagef(err, "玩家参数数据缺失 %v", v.Data)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var paramLen int
|
var paramLen int
|
||||||
if paramLen, err = lenParam(cfg, toArr(rd.Data)...); err == nil {
|
if paramLen, err = lenParam(cfg, toArr(v.Data)...); err == nil {
|
||||||
//参数比较,默认第一个参数soGreateEqual,其它soEqual
|
//参数比较,默认第一个参数soGreateEqual,其它soEqual
|
||||||
switch paramLen {
|
switch paramLen {
|
||||||
case 1:
|
case 1:
|
||||||
return soGreatEqual(rd.Data[0], cfg.Data1)
|
return soGreatEqual(v.Data[0], cfg.Data1)
|
||||||
case 2:
|
case 2:
|
||||||
if ok, err = soGreatEqual(rd.Data[0], cfg.Data1); !ok {
|
if ok, err = soGreatEqual(v.Data[0], cfg.Data1); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[1], cfg.Data2); !ok {
|
if ok, err = soEqual(v.Data[1], cfg.Data2); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if ok, err = soGreatEqual(rd.Data[0], cfg.Data1); !ok {
|
if ok, err = soGreatEqual(v.Data[0], cfg.Data1); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[1], cfg.Data2); !ok {
|
if ok, err = soEqual(v.Data[1], cfg.Data2); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[2], cfg.Data3); !ok {
|
if ok, err = soEqual(v.Data[2], cfg.Data3); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
if ok, err = soGreatEqual(rd.Data[0], cfg.Data1); !ok {
|
if ok, err = soGreatEqual(v.Data[0], cfg.Data1); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[1], cfg.Data2); !ok {
|
if ok, err = soEqual(v.Data[1], cfg.Data2); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[2], cfg.Data3); !ok {
|
if ok, err = soEqual(v.Data[2], cfg.Data3); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[3], cfg.Data4); !ok {
|
if ok, err = soEqual(v.Data[3], cfg.Data4); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
if ok, err = soGreatEqual(rd.Data[0], cfg.Data1); !ok {
|
if ok, err = soGreatEqual(v.Data[0], cfg.Data1); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[1], cfg.Data2); !ok {
|
if ok, err = soEqual(v.Data[1], cfg.Data2); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[2], cfg.Data3); !ok {
|
if ok, err = soEqual(v.Data[2], cfg.Data3); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[3], cfg.Data4); !ok {
|
if ok, err = soEqual(v.Data[3], cfg.Data4); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if ok, err = soEqual(rd.Data[4], cfg.Data5); !ok {
|
if ok, err = soEqual(v.Data[4], cfg.Data5); !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModelRtaskRecord) verifyFirstEqualParam(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtaskRecord) verifyFirstEqualParam(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
var rd *pb.RtaskData
|
if v, f := record.Vals[cfg.Id]; f {
|
||||||
if rd, err = this.GetVerifyData(uid, cfg.Id); rd != nil {
|
if len(v.Data) == 0 {
|
||||||
if len(rd.Data) == 0 {
|
err = errors.WithMessagef(err, "玩家参数数据缺失 %v", v.Data)
|
||||||
err = errors.WithMessagef(err, "玩家参数数据缺失 %v", rd.Data)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
return soEqual(v.Data[0], cfg.Data1)
|
||||||
return soEqual(rd.Data[0], cfg.Data1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *ModelRtaskRecord) verifyFirstGreatEqualParam(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtaskRecord) verifyFirstGreatEqualParam(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
var rd *pb.RtaskData
|
if v, f := record.Vals[cfg.Id]; f {
|
||||||
if rd, err = this.GetVerifyData(uid, cfg.Id); rd != nil {
|
if len(v.Data) == 0 {
|
||||||
if len(rd.Data) == 0 {
|
err = errors.WithMessagef(err, "玩家参数数据缺失 %v", v.Data)
|
||||||
err = errors.WithMessagef(err, "玩家参数数据缺失 %v", rd.Data)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
return soGreatEqual(v.Data[0], cfg.Data1)
|
||||||
return soGreatEqual(rd.Data[0], cfg.Data1)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 英雄指定
|
// 英雄指定
|
||||||
func (this *ModelRtask) verfiyRtype1(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verfiyRtype1(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
heroModule, err := this.service.GetModule(comm.ModuleHero)
|
heroModule, err := this.service.GetModule(comm.ModuleHero)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
@ -121,7 +125,8 @@ func (this *ModelRtask) verfiyRtype1(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 剧情
|
// 剧情
|
||||||
func (this *ModelRtask) verifyRtype2(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
// Deprecated
|
||||||
|
func (this *ModelRtask) verifyRtype2(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
m, err := this.service.GetModule(comm.ModuleMline)
|
m, err := this.service.GetModule(comm.ModuleMline)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -135,7 +140,7 @@ func (this *ModelRtask) verifyRtype2(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 每日任务
|
// 每日任务
|
||||||
func (this *ModelRtask) verifyRtype3(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verifyRtype3(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
m, err := this.service.GetModule(comm.ModuleTask)
|
m, err := this.service.GetModule(comm.ModuleTask)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -153,7 +158,7 @@ func (this *ModelRtask) verifyRtype3(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 指定英雄等级
|
// 指定英雄等级
|
||||||
func (this *ModelRtask) verifyRtype4(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verifyRtype4(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
m, err := this.service.GetModule(comm.ModuleHero)
|
m, err := this.service.GetModule(comm.ModuleHero)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -180,7 +185,7 @@ func (this *ModelRtask) verifyRtype4(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 指定英雄的指定装备数量
|
// 指定英雄的指定装备数量
|
||||||
func (this *ModelRtask) verifyRtype5(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verifyRtype5(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
m, err := this.service.GetModule(comm.ModuleHero)
|
m, err := this.service.GetModule(comm.ModuleHero)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -217,7 +222,7 @@ func (this *ModelRtask) verifyRtype5(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 指定英雄星级
|
// 指定英雄星级
|
||||||
func (this *ModelRtask) verifyRtype6(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verifyRtype6(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
m, err := this.service.GetModule(comm.ModuleHero)
|
m, err := this.service.GetModule(comm.ModuleHero)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -243,7 +248,7 @@ func (this *ModelRtask) verifyRtype6(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 日常登录一次
|
// 日常登录一次
|
||||||
func (this *ModelRtask) verfiyRtype7(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verfiyRtype7(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
userModule, err := this.service.GetModule(comm.ModuleUser)
|
userModule, err := this.service.GetModule(comm.ModuleUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -258,7 +263,7 @@ func (this *ModelRtask) verfiyRtype7(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 累计登陆xx天
|
// 累计登陆xx天
|
||||||
func (this *ModelRtask) verfiyRtype8(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verfiyRtype8(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
userModule, err := this.service.GetModule(comm.ModuleUser)
|
userModule, err := this.service.GetModule(comm.ModuleUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -274,8 +279,8 @@ func (this *ModelRtask) verfiyRtype8(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// 连续登陆xx天
|
// 连续登陆xx天 未埋点的处理方法
|
||||||
func (this *ModelRtask) verfiyRtype9(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verfiyRtype9(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
userModule, err := this.service.GetModule(comm.ModuleUser)
|
userModule, err := this.service.GetModule(comm.ModuleUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -292,7 +297,7 @@ func (this *ModelRtask) verfiyRtype9(uid string, cfg *cfg.GameRdtaskCondiData) (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 拥有xx个好友
|
// 拥有xx个好友
|
||||||
func (this *ModelRtask) verfiyRtype10(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verfiyRtype10(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
m, err := this.service.GetModule(comm.ModuleFriend)
|
m, err := this.service.GetModule(comm.ModuleFriend)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -306,7 +311,7 @@ func (this *ModelRtask) verfiyRtype10(uid string, cfg *cfg.GameRdtaskCondiData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 用户等级达到xx级
|
// 用户等级达到xx级
|
||||||
func (this *ModelRtask) verifyRtype20(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verifyRtype20(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
userModule, err := this.service.GetModule(comm.ModuleUser)
|
userModule, err := this.service.GetModule(comm.ModuleUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -321,7 +326,7 @@ func (this *ModelRtask) verifyRtype20(uid string, cfg *cfg.GameRdtaskCondiData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 日常任务活跃度达到xx
|
// 日常任务活跃度达到xx
|
||||||
func (this *ModelRtask) verifyRtype63(uid string, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
func (this *ModelRtask) verifyRtype63(uid string, record *pb.DBRtaskRecord, cfg *cfg.GameRdtaskCondiData) (ok bool, err error) {
|
||||||
userModule, err := this.service.GetModule(comm.ModuleUser)
|
userModule, err := this.service.GetModule(comm.ModuleUser)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
package rtask
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"go_dreamfactory/pb"
|
|
||||||
cfg "go_dreamfactory/sys/configure/structs"
|
|
||||||
"reflect"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/agiledragon/gomonkey/v2"
|
|
||||||
. "github.com/smartystreets/goconvey/convey"
|
|
||||||
)
|
|
||||||
|
|
||||||
var vals []int32 //通过接口传入的参数组
|
|
||||||
var conf *cfg.GameRdtaskCondiData
|
|
||||||
|
|
||||||
func TestVerify(t *testing.T) {
|
|
||||||
Convey("校验处理器测试", t, func() {
|
|
||||||
|
|
||||||
Convey("校验接口参数组", func() {
|
|
||||||
patches := gomonkey.ApplyGlobalVar(&conf, &cfg.GameRdtaskCondiData{
|
|
||||||
Id: 101,
|
|
||||||
Type: 1,
|
|
||||||
Data1: 25001,
|
|
||||||
})
|
|
||||||
defer patches.Reset()
|
|
||||||
|
|
||||||
patches2 := gomonkey.ApplyGlobalVar(&vals, []int32{25002})
|
|
||||||
defer patches2.Reset()
|
|
||||||
|
|
||||||
n, err := lenParam(conf, vals...)
|
|
||||||
fmt.Println(n, err)
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestVerify2(t *testing.T) {
|
|
||||||
Convey("校验处理测试", t, func() {
|
|
||||||
Convey("rtype1", func() {
|
|
||||||
var r *ModelRtask
|
|
||||||
// 修改
|
|
||||||
patches := gomonkey.ApplyMethod(reflect.TypeOf(r), "GetVerifyData", func(_ *ModelRtask, uid string, condiId int32) (*pb.RtaskData, error) {
|
|
||||||
return &pb.RtaskData{
|
|
||||||
Data: map[int32]int32{0: 25001},
|
|
||||||
}, nil
|
|
||||||
})
|
|
||||||
defer patches.Reset()
|
|
||||||
|
|
||||||
//
|
|
||||||
rtask := &ModelRtaskRecord{}
|
|
||||||
conf := &cfg.GameRdtaskCondiData{
|
|
||||||
Id: 101,
|
|
||||||
Type: 1,
|
|
||||||
Data1: 25001,
|
|
||||||
}
|
|
||||||
err, ok := rtask.verifyFromDb("11", conf)
|
|
||||||
So(err, ShouldEqual, nil)
|
|
||||||
So(ok, ShouldEqual, true)
|
|
||||||
|
|
||||||
//模拟接口参数传入
|
|
||||||
patches3 := gomonkey.ApplyGlobalVar(&vals, []int32{25001})
|
|
||||||
defer patches3.Reset()
|
|
||||||
|
|
||||||
condiId, _ := rtask.equalParams(conf, vals...)
|
|
||||||
So(condiId, ShouldEqual, 101)
|
|
||||||
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
@ -141,7 +141,6 @@ func (this *apiComp) Login(session comm.IUserSession, req *pb.UserLoginReq) (cod
|
|||||||
|
|
||||||
this.module.RecoverUserPsStart(user.Uid)
|
this.module.RecoverUserPsStart(user.Uid)
|
||||||
// 日常登录任务
|
// 日常登录任务
|
||||||
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype8, 1)
|
|
||||||
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype8, 1))
|
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype8, 1))
|
||||||
this.module.ModulePrivilege.CheckDailyPrivilegeMail(session)
|
this.module.ModulePrivilege.CheckDailyPrivilegeMail(session)
|
||||||
|
|
||||||
|
@ -951,7 +951,7 @@ func (this *User) BingoSetUserVipLv(session comm.IUserSession, lv int32) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//添加用户皮肤数据
|
// 添加用户皮肤数据
|
||||||
func (this *User) AddPer(session comm.IUserSession, pers map[string]int32, bPush bool) (code pb.ErrorCode) {
|
func (this *User) AddPer(session comm.IUserSession, pers map[string]int32, bPush bool) (code pb.ErrorCode) {
|
||||||
var (
|
var (
|
||||||
err error
|
err error
|
||||||
|
@ -105,8 +105,9 @@ type RtaskTestResp struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag"`
|
Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag"`
|
||||||
RtaskIds []int32 `protobuf:"varint,2,rep,packed,name=rtaskIds,proto3" json:"rtaskIds"`
|
RtaskIds []int32 `protobuf:"varint,2,rep,packed,name=rtaskIds,proto3" json:"rtaskIds"`
|
||||||
|
RtaskType int32 `protobuf:"varint,3,opt,name=rtaskType,proto3" json:"rtaskType"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RtaskTestResp) Reset() {
|
func (x *RtaskTestResp) Reset() {
|
||||||
@ -155,6 +156,13 @@ func (x *RtaskTestResp) GetRtaskIds() []int32 {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *RtaskTestResp) GetRtaskType() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.RtaskType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_rtask_rtask_msg_proto protoreflect.FileDescriptor
|
var File_rtask_rtask_msg_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_rtask_rtask_msg_proto_rawDesc = []byte{
|
var file_rtask_rtask_msg_proto_rawDesc = []byte{
|
||||||
@ -168,12 +176,14 @@ var file_rtask_rtask_msg_proto_rawDesc = []byte{
|
|||||||
0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75,
|
0x07, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75,
|
||||||
0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
|
0x70, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
|
||||||
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x05,
|
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18, 0x05,
|
||||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x3f,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x22, 0x5d,
|
||||||
0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
0x0a, 0x0d, 0x52, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12,
|
||||||
0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66,
|
0x12, 0x0a, 0x04, 0x66, 0x6c, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x66,
|
||||||
0x6c, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18,
|
0x6c, 0x61, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x18,
|
||||||
0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x42,
|
0x02, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x73, 0x12,
|
||||||
0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x1c, 0x0a, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01,
|
||||||
|
0x28, 0x05, 0x52, 0x09, 0x72, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x5a,
|
||||||
|
0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
Loading…
Reference in New Issue
Block a user