This commit is contained in:
meixiongfeng 2022-12-19 21:28:40 +08:00
commit 8de4cc38c7
10 changed files with 154 additions and 131 deletions

View File

@ -40,7 +40,7 @@ var (
subType: task.TaskSubTypeReceive,
req: &pb.TaskReceiveReq{
TaskTag: int32(comm.TASK_ACHIEVE),
Id: "62e778167cc92ac48c4b249b",
Id: 1,
},
rsp: &pb.TaskReceiveResp{},
enabled: true,
@ -71,20 +71,11 @@ var (
mainType: string(comm.ModuleTask),
subType: task.TaskSubTypeActiveReceive,
req: &pb.TaskActiveReceiveReq{
Id: "62d90fcd974bb2fd638a3dc5",
Id: 1,
TaskTag: int32(comm.TASK_DAILY),
},
rsp: &pb.TaskActiveReceiveResp{},
// enabled: true,
}, {
desc: "卡牌攻略",
mainType: string(comm.ModuleTask),
subType: task.TaskSubTypeStrategy,
req: &pb.TaskDoStrategyReq{
HeroCfgId: 13001,
},
rsp: &pb.TaskDoStrategyResp{},
// enabled: true,
},
}
)

View File

@ -45,7 +45,7 @@ func (this *configureComp) getHoroscope(id int32) (result *cfg.GameHoroscopeData
}
//查询星座信息
func (this *configureComp) getHoroscopebylv(grow, lv int32) (result *cfg.GameHoroscopeData, err error) {
func (this *configureComp) getHoroscopebylv(nodeid, lv int32) (result *cfg.GameHoroscopeData, err error) {
var (
v interface{}
)
@ -53,13 +53,13 @@ func (this *configureComp) getHoroscopebylv(grow, lv int32) (result *cfg.GameHor
this.module.Errorln(err)
} else {
for _, v := range v.(*cfg.GameHoroscope).GetDataMap() {
if v.GrowType == grow && v.Lv == lv {
if v.NodeId == nodeid && v.Lv == lv {
result = v
return
}
}
}
err = fmt.Errorf("No found Horoscope grow:%d lv:%d", grow, lv)
err = fmt.Errorf("No found Horoscope nodeid:%d lv:%d", nodeid, lv)
return
}

View File

@ -63,13 +63,8 @@ func (this *ModelRtaskRecord) overrideUpdate(uid string, cfg *cfg.GameRdtaskCond
return
}
}
log.Debug("覆盖数值更新",
log.Field{Key: "uid", Value: uid},
log.Field{Key: "condiId", Value: cfg.Id},
log.Field{Key: "params", Value: vals},
log.Field{Key: "updated", Value: record.Vals[cfg.Id]},
)
this.listenTask(uid, cfg.Id)
// log.Debug("覆盖数值更新", log.Fields{"uid": uid, "condiId": cfg.Id, "params": vals, "updated": record.Vals[cfg.Id]})
// this.listenTask(uid, cfg.Id)
return
}
@ -122,7 +117,7 @@ func (this *ModelRtaskRecord) addUpdate(uid string, cfg *cfg.GameRdtaskCondiData
log.Field{Key: "updated", Value: record.Vals[cfg.Id]},
)
this.listenTask(uid, cfg.Id)
// this.listenTask(uid, cfg.Id)
return
}

View File

@ -36,49 +36,48 @@ func (this *apiComp) ActiveReceive(session comm.IUserSession, req *pb.TaskActive
return
}
var rewards []*cfg.Gameatn
var flag bool
update := map[string]interface{}{}
// 玩家的
activeList := this.moduleTask.modelTaskActive.getActiveListByTag(uid, comm.TaskTag(req.TaskTag))
var activityData *pb.ActivityData
activeList := this.moduleTask.modelTaskActive.getActiveList(uid)
// var activityData *pb.ActivityData
for _, v := range activeList {
if v.TaskId == req.Id {
activityData = v
if v.Received != 1 {
conf := this.moduleTask.configure.getTaskActiveById(v.TaskId)
if conf == nil {
code = pb.ErrorCode_ConfigNoFound
return
}
if req.TaskTag == int32(comm.TASK_DAILY) {
if ue.Activeday < conf.Active {
code = pb.ErrorCode_TaskActiveNoenough
return
}
} else if req.TaskTag == int32(comm.TASK_WEEKLY) {
if ue.Activeweek < conf.Active {
code = pb.ErrorCode_TaskActiveNoenough
return
}
}
v.Received = 1
flag = true
rewards = append(rewards, conf.Reword...)
}
break
}
}
if activityData == nil {
code = pb.ErrorCode_TaskNotFound
return
}
if flag {
update["activityList"] = activeList
if activityData.Received != 1 { //未领取
conf := this.moduleTask.configure.getTaskActiveById(activityData.TaskId)
if conf == nil {
code = pb.ErrorCode_ConfigNoFound
if err := this.moduleTask.modelTaskActive.Change(session.GetUserId(), update); err != nil {
this.moduleTask.Errorf("updateReceive err %v", err)
code = pb.ErrorCode_DBError
return
}
update := make(map[string]interface{})
if req.TaskTag == int32(comm.TASK_DAILY) {
if ue.Activeday < conf.Active {
code = pb.ErrorCode_TaskActiveNoenough
return
}
} else if req.TaskTag == int32(comm.TASK_WEEKLY) {
if ue.Activeweek < conf.Active {
code = pb.ErrorCode_TaskActiveNoenough
return
}
}
update["received"] = 1
if len(update) > 0 {
if err := this.moduleTask.modelTaskActive.updateReceive(session.GetUserId(), update); err != nil {
this.moduleTask.Errorf("updateReceive err %v", err)
code = pb.ErrorCode_DBError
return
}
}
rewards = append(rewards, conf.Reword...)
}
if len(rewards) > 0 {

View File

@ -108,10 +108,23 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.TaskReceiveReq)
}
//更新用户领取状态
update := map[string]interface{}{
"received": 1,
for _, v := range taskDataList {
if v.TaskId == req.Id {
v.Received = 1
break
}
}
if err := this.moduleTask.modelTask.modifyUserTask(session.GetUserId(), taskData.TaskId, update); err != nil {
update := map[string]interface{}{}
switch req.TaskTag {
case int32(comm.TASK_DAILY):
update["dayList"] = taskDataList
case int32(comm.TASK_WEEKLY):
update["weekList"] = taskDataList
case int32(comm.TASK_ACHIEVE):
update["achieveList"] = taskDataList
}
if err := this.moduleTask.modelTask.Change(session.GetUserId(), update); err != nil {
code = pb.ErrorCode_DBError
return
}

View File

@ -62,6 +62,16 @@ func (this *ModelTaskActive) initActiveReward(uid string, taskTag comm.TaskTag)
}
}
func (this *ModelTaskActive) getActiveList(uid string) (list []*pb.ActivityData) {
task := &pb.DBActivity{}
if err := this.Get(uid, task); err != nil {
this.moduleTask.Errorf("getTaskList err %v", err)
return
}
return task.ActivityList
}
//获取玩家活跃度列表
func (this *ModelTaskActive) getActiveListByTag(uid string, taskTag comm.TaskTag) (list []*pb.ActivityData) {
task := &pb.DBActivity{}

View File

@ -82,6 +82,7 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
return nil
}
update := map[string]interface{}{}
var dataList []*pb.TaskData
if taskTag == comm.TASK_DAILY {
dataList = task.DayList
@ -90,7 +91,6 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
}
// 筛选出指定tag的任务
update := map[string]interface{}{}
var flag bool
for _, v := range dataList {
oldVal := v.Progress
@ -112,9 +112,14 @@ func (this *ModelTask) getTaskListByTag(uid string, taskTag comm.TaskTag) *pb.DB
}
}
if flag {
update["dayList"] = task.DayList
if err := this.moduleTask.modelTask.Change("uid", update); err != nil {
log.Error("更新每日任务", log.Field{Key: "uid", Value: uid})
if taskTag == comm.TASK_DAILY {
update["dayList"] = dataList
} else if taskTag == comm.TASK_WEEKLY {
update["weekList"] = dataList
}
if err := this.moduleTask.modelTask.Change(uid, update); err != nil {
}
}
@ -325,6 +330,7 @@ func (this *ModelTask) checkTask(uid string, taskId int32) (*pb.TaskData, bool)
}
//更改用户任务
// Deprecated
func (this *ModelTask) modifyUserTask(uid string, taskId int32, data map[string]interface{}) error {
var task *pb.DBTask
if err := this.GetList(uid, &task); err != nil {

View File

@ -36,7 +36,7 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
code = pb.ErrorCode_UserSessionNobeing
return
}
rsp.Olv = user.Lv
// 当前任务配置
curTaskConf, err := this.module.configure.getWorldtaskById(req.TaskId)
if err != nil || curTaskConf == nil {
@ -73,7 +73,12 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
return
}
}
var (
hero []string
newhero []string
)
hero = make([]string, 0)
newhero = make([]string, 0)
var nextTaskId int32
nextTaskId = curTaskConf.IdAfter
finishRsp := func() {
@ -114,6 +119,21 @@ func (this *apiComp) Finish(session comm.IUserSession, req *pb.WorldtaskFinishRe
)
return
}
for _, v := range curTaskConf.Reword {
if v.A == comm.HeroType {
hero = append(hero, v.T)
}
}
if len(hero) > 0 {
ishave := this.module.ModuleUser.CheckTujianHero(session, hero)
for i, v := range ishave {
if v {
newhero = append(newhero, hero[i])
}
}
}
rsp.Newheros = newhero
// 发奖
if code = this.module.DispenseRes(session, curTaskConf.Reword, true); code != pb.ErrorCode_Success {
this.module.Error("资源发放",

View File

@ -167,8 +167,10 @@ type WorldtaskFinishResp struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"`
TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"`
GroupId int32 `protobuf:"varint,1,opt,name=groupId,proto3" json:"groupId"`
TaskId int32 `protobuf:"varint,2,opt,name=taskId,proto3" json:"taskId"`
Newheros []string `protobuf:"bytes,3,rep,name=newheros,proto3" json:"newheros"` //获得的新英雄
Olv int32 `protobuf:"varint,4,opt,name=olv,proto3" json:"olv"` //以前的等级
}
func (x *WorldtaskFinishResp) Reset() {
@ -217,6 +219,20 @@ func (x *WorldtaskFinishResp) GetTaskId() int32 {
return 0
}
func (x *WorldtaskFinishResp) GetNewheros() []string {
if x != nil {
return x.Newheros
}
return nil
}
func (x *WorldtaskFinishResp) GetOlv() int32 {
if x != nil {
return x.Olv
}
return 0
}
//任务完成条件达成的推送
type WorldtaskNexttaskPush struct {
state protoimpl.MessageState
@ -560,45 +576,48 @@ var file_worldtask_worldtask_msg_proto_rawDesc = []byte{
0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49,
0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x57, 0x6f, 0x72,
0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x75, 0x0a, 0x13, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70,
0x12, 0x18, 0x0a, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x05, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61,
0x73, 0x6b, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73, 0x6b,
0x49, 0x64, 0x22, 0x37, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e,
0x65, 0x78, 0x74, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x6e,
0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x0a, 0x6e, 0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x17, 0x57,
0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74,
0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73,
0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70,
0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b,
0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66,
0x6f, 0x22, 0x7d, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61,
0x74, 0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a,
0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43,
0x6f, 0x6e, 0x66, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70,
0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74,
0x22, 0x61, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74,
0x74, 0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a,
0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f,
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f,
0x73, 0x12, 0x10, 0x0a, 0x03, 0x6f, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03,
0x6f, 0x6c, 0x76, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b,
0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a,
0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x0a, 0x2e, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73,
0x6b, 0x4c, 0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18, 0x03,
0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x12, 0x10,
0x0a, 0x03, 0x6f, 0x6c, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x6c, 0x76,
0x22, 0x37, 0x0a, 0x15, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x4e, 0x65, 0x78,
0x74, 0x74, 0x61, 0x73, 0x6b, 0x50, 0x75, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0a, 0x6e, 0x65, 0x78,
0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6e,
0x65, 0x78, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x22, 0x67, 0x0a, 0x17, 0x57, 0x6f, 0x72,
0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72,
0x74, 0x52, 0x65, 0x71, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x28, 0x0a, 0x06, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x62, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x22, 0x3b, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f,
0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22,
0x7d, 0x0a, 0x18, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74,
0x6c, 0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x43, 0x6f, 0x6e,
0x66, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x43, 0x6f, 0x6e, 0x66, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65,
0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x06, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0x61,
0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x42, 0x61, 0x74, 0x74, 0x6c,
0x65, 0x46, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x74,
0x61, 0x73, 0x6b, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x73,
0x6b, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x65, 0x77, 0x68, 0x65, 0x72, 0x6f, 0x73, 0x12,
0x10, 0x0a, 0x03, 0x6f, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6f, 0x6c,
0x76, 0x22, 0x40, 0x0a, 0x16, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x46, 0x69,
0x6e, 0x69, 0x73, 0x68, 0x49, 0x64, 0x73, 0x50, 0x75, 0x73, 0x68, 0x12, 0x26, 0x0a, 0x08, 0x74,
0x61, 0x73, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e,
0x57, 0x6f, 0x72, 0x6c, 0x64, 0x74, 0x61, 0x73, 0x6b, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x4c,
0x69, 0x73, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (

View File

@ -14,8 +14,6 @@ type GameCombatLevelData struct {
Id int32
Scene string
Levelname string
FormatList []int32
Droplist []int32
PassformatList []int32
Passdroplist []int32
Award []*Gameatn
@ -33,34 +31,6 @@ func (_v *GameCombatLevelData)Deserialize(_buf map[string]interface{}) (err erro
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.Scene, _ok_ = _buf["scene"].(string); !_ok_ { err = errors.New("scene error"); return } }
{ var _ok_ bool; if _v.Levelname, _ok_ = _buf["levelname"].(string); !_ok_ { err = errors.New("levelname error"); return } }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["formatList"].([]interface{}); !_ok_ { err = errors.New("formatList error"); return }
_v.FormatList = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.FormatList = append(_v.FormatList, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["droplist"].([]interface{}); !_ok_ { err = errors.New("droplist error"); return }
_v.Droplist = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Droplist = append(_v.Droplist, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool