diff --git a/bin/json/game_accumulatemoney.json b/bin/json/game_accumulatemoney.json new file mode 100644 index 000000000..d187e5fc4 --- /dev/null +++ b/bin/json/game_accumulatemoney.json @@ -0,0 +1,227 @@ +[ + { + "accumulate": 1000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ] + }, + { + "accumulate": 2000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 2000 + } + ] + }, + { + "accumulate": 3000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 3000 + } + ] + }, + { + "accumulate": 4000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 4000 + } + ] + }, + { + "accumulate": 5000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 5000 + } + ] + }, + { + "accumulate": 6000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 6000 + } + ] + }, + { + "accumulate": 7000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 7000 + } + ] + }, + { + "accumulate": 8000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 8000 + } + ] + }, + { + "accumulate": 9000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 9000 + } + ] + }, + { + "accumulate": 10000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 10000 + } + ] + }, + { + "accumulate": 11000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 11000 + } + ] + }, + { + "accumulate": 12000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 12000 + } + ] + }, + { + "accumulate": 13000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 13000 + } + ] + }, + { + "accumulate": 14000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 14000 + } + ] + }, + { + "accumulate": 15000, + "reward": [ + { + "a": "item", + "t": "10000001", + "n": 10 + }, + { + "a": "attr", + "t": "gold", + "n": 15000 + } + ] + } +] \ No newline at end of file diff --git a/bin/json/game_guildbosstask.json b/bin/json/game_guildbosstask.json new file mode 100644 index 000000000..18dd5f9eb --- /dev/null +++ b/bin/json/game_guildbosstask.json @@ -0,0 +1,152 @@ +[ + { + "id": 1, + "score": 1500000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_1", + "text": "总积分达到1500000分" + } + }, + { + "id": 2, + "score": 3000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_2", + "text": "总积分达到3000000分" + } + }, + { + "id": 3, + "score": 4500000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_3", + "text": "总积分达到4500000分" + } + }, + { + "id": 4, + "score": 6000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_4", + "text": "总积分达到6000000分" + } + }, + { + "id": 5, + "score": 9000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_5", + "text": "总积分达到9000000分" + } + }, + { + "id": 6, + "score": 12000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_6", + "text": "总积分达到12000000分" + } + }, + { + "id": 7, + "score": 15000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_7", + "text": "总积分达到15000000分" + } + }, + { + "id": 8, + "score": 18000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_8", + "text": "总积分达到18000000分" + } + }, + { + "id": 9, + "score": 21000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_9", + "text": "总积分达到21000000分" + } + }, + { + "id": 10, + "score": 24000000, + "reward": [ + { + "a": "attr", + "t": "gold", + "n": 1000 + } + ], + "task_describe": { + "key": "guildboss_task_task_describe_10", + "text": "总积分达到24000000分" + } + } +] \ No newline at end of file diff --git a/bin/json/game_show.json b/bin/json/game_show.json new file mode 100644 index 000000000..4d6fc3b0a --- /dev/null +++ b/bin/json/game_show.json @@ -0,0 +1,28 @@ +[ + { + "id": 100001, + "desc": { + "key": "show_100001", + "text": "男形象1" + }, + "access": 0, + "position": "", + "sex": 1, + "resources": "Person/10000/10000M.prefab", + "vague": "Person/10000/10000MT.prefab", + "pvpAnimator": "Person/10000/10000_MPvp.controller" + }, + { + "id": 200001, + "desc": { + "key": "show_200001", + "text": "女形象1" + }, + "access": 0, + "position": "", + "sex": 2, + "resources": "Person/10000/10000W.prefab", + "vague": "Person/10000/10000WT.prefab", + "pvpAnimator": "Person/10000/10000_WPvp.controller" + } +] \ No newline at end of file diff --git a/comm/const.go b/comm/const.go index cb9f684b4..d1906d053 100644 --- a/comm/const.go +++ b/comm/const.go @@ -174,7 +174,6 @@ const ( TablePagoda = "pagoda" ///武馆数据表 TableMartialhall = "martialhall" - ///记录用户爬塔排行数据 TablePagodaRecord = "pagodarecord" ///有序的爬塔排行 (真正的排行榜 最多只有50条) diff --git a/modules/pagoda/api_crossrank.go b/modules/pagoda/api_crossrank.go index 9fcafba4f..5859112be 100644 --- a/modules/pagoda/api_crossrank.go +++ b/modules/pagoda/api_crossrank.go @@ -1,63 +1,55 @@ package pagoda import ( - "context" - "fmt" "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/pb" - "go_dreamfactory/sys/db" - "strconv" - - "github.com/go-redis/redis/v8" ) //参数校验 func (this *apiComp) CrossRaceRankListCheck(session comm.IUserSession, req *pb.PagodaCrossRaceRankListReq) (errdata *pb.ErrorData) { - if req.Raceid == 0 { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_ReqParameterError, - Title: pb.ErrorCode_ReqParameterError.ToString(), - } - return - } + return } +// 六合塔榜 func (this *apiComp) CrossRaceRankList(session comm.IUserSession, req *pb.PagodaCrossRaceRankListReq) (errdata *pb.ErrorData) { var ( - szRank []*pb.DBRacePagodaRecord - rd *redis.StringSliceCmd - ) - var ( - pipe *pipe.RedisPipe + uids []string + err error + result []*pb.DBRacePagodaRecord + ranks []*pb.DBRaceRank ) + if errdata = this.CrossRaceRankListCheck(session, req); errdata != nil { return } - if this.module.IsCross() { - conn, _ := db.Local() - dbModel := db.NewDBModel(this.service.GetTag(), comm.TableRaceRecord, conn) - - pipe = conn.Redis.RedisPipe(context.TODO()) - tablename := fmt.Sprintf("%s-%s", this.service.GetTag(), "race"+strconv.Itoa(int(req.Raceid))) - rd = pipe.ZRevRange(tablename, 0, comm.MaxRankList) - - if _, err := pipe.Exec(); err != nil { - this.module.Errorln(err) - return + if uids, err = this.module.modelRacePagoda.queryRankUser(); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), } - _dataList := rd.Val() - for _, v := range _dataList { - result := &pb.DBRacePagodaRecord{} - if err := dbModel.Redis.HGetAll(v, result); err == nil { - szRank = append(szRank, result) - } - } - + return } - - session.SendMsg(string(this.module.GetType()), PagodaCrossRaceRankListReq, &pb.PagodaCrossRaceRankListResp{Ranks: szRank}) + if result, err = this.module.modelRacePagoda.queryPlayers(uids); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + return + } + for _, v := range result { + ranks = append(ranks, &pb.DBRaceRank{ + Uinfo: v.Uinfo, + Line: v.Data[v.Maxfloor].Line, + Floor: v.Maxfloor, + Costtime: v.Data[v.Maxfloor].Consttime, + }) + } + session.SendMsg(string(this.module.GetType()), PagodaCrossRaceRankListReq, &pb.PagodaCrossRaceRankListResp{ + Ranks: ranks, + }) return } diff --git a/modules/pagoda/api_getrace.go b/modules/pagoda/api_getrace.go index b50038754..410060cea 100644 --- a/modules/pagoda/api_getrace.go +++ b/modules/pagoda/api_getrace.go @@ -33,11 +33,9 @@ func (this *apiComp) GetRace(session comm.IUserSession, req *pb.PagodaGetRaceReq } // 初始化每天挑战塔的层数 - if !utils.IsToday(list.Rtime) { list.Rtime = configure.Now().Unix() update["rtime"] = list.Rtime - } if err = this.module.modelRacePagoda.ModifyPagodaRaceDataByObjId(session.GetUserId(), update); err != nil { diff --git a/modules/pagoda/api_racechallengeover.go b/modules/pagoda/api_racechallengeover.go index d6a4b1b34..2e08fc0ba 100644 --- a/modules/pagoda/api_racechallengeover.go +++ b/modules/pagoda/api_racechallengeover.go @@ -17,17 +17,18 @@ func (this *apiComp) ChallengeRaceOverCheck(session comm.IUserSession, req *pb.P return } -// /挑战主线关卡 +// 六合塔挑战 func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.PagodaChallengeRaceOverReq) (errdata *pb.ErrorData) { var ( mapData map[string]interface{} - race *pb.DBPagodaRace + list *pb.DBPagodaRace isWin bool err error atno []*pb.UserAtno // 通关奖励 changExp map[string]int32 costTime int32 // 耗时 star int32 // 当前星级 + new bool // 是否首次挑战 ) changExp = make(map[string]int32, 0) mapData = make(map[string]interface{}, 0) @@ -45,7 +46,7 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda return } - race, err = this.module.modelRacePagoda.getPagodaRaceList(session.GetUserId()) + list, err = this.module.modelRacePagoda.getPagodaRaceList(session.GetUserId()) if err != nil { errdata = &pb.ErrorData{ Code: pb.ErrorCode_PagodaNotFound, @@ -67,6 +68,35 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda return } costTime = req.Report.Costtime + if _, ok := list.Data[conf.Floors]; !ok { + if list.Maxfloor+1 == conf.Floors { + list.Data[conf.Floors] = &pb.RaceData{ + Consttime: costTime, + Star: star, + } + list.Maxfloor = conf.Floors + mapData["maxfloor"] = list.Maxfloor + new = true + } + } + list.Battlecount += 1 + mapData["data"] = list.Data + mapData["battlecount"] = list.Battlecount + + if new { + var score int32 + score = 10000*list.Maxfloor + (10000 - costTime) + this.module.modelRacePagoda.SetRacePagodaRankList(score, session.GetUserId()) + } + + if err = this.module.modelRacePagoda.ModifyPagodaRaceDataByObjId(session.GetUserId(), mapData); err != nil { + errdata = &pb.ErrorData{ + Code: pb.ErrorCode_DBError, + Title: pb.ErrorCode_DBError.ToString(), + Message: err.Error(), + } + } + if conf.Exp > 0 { var heroObjs []string if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 { @@ -80,33 +110,12 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda return } } - if _, ok := race.Data[conf.Floors]; !ok { - if race.Maxfloor == conf.Floors+1 { - race.Data[conf.Floors] = &pb.RaceData{ - Consttime: costTime, - Star: star, - } - race.Maxfloor = conf.Floors + 1 - mapData["maxfloor"] = race.Maxfloor - } - } - race.Battlecount += 1 - mapData["data"] = race.Data - mapData["battlecount"] = race.Battlecount - - if err = this.module.modelRacePagoda.ModifyPagodaRaceDataByObjId(session.GetUserId(), mapData); err != nil { - errdata = &pb.ErrorData{ - Code: pb.ErrorCode_DBError, - Title: pb.ErrorCode_DBError.ToString(), - Message: err.Error(), - } - } // 通关奖励 if errdata, atno = this.module.DispenseAtno(session, conf.Reward, true); errdata != nil { return } session.SendMsg(string(this.module.GetType()), PagodaChallengeRaceOverResp, &pb.PagodaChallengeRaceOverResp{ - Data: race, + Data: list, Reward: atno, Heroexp: changExp, }) diff --git a/modules/pagoda/model_race.go b/modules/pagoda/model_race.go index 641dd2233..0e4dc58c9 100644 --- a/modules/pagoda/model_race.go +++ b/modules/pagoda/model_race.go @@ -1,13 +1,18 @@ package pagoda import ( + "context" + "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/lego/sys/redis/pipe" "go_dreamfactory/modules" "go_dreamfactory/pb" "go_dreamfactory/sys/configure" + "go_dreamfactory/sys/db" + "github.com/go-redis/redis/v8" "go.mongodb.org/mongo-driver/bson/primitive" "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/x/bsonx" @@ -59,3 +64,113 @@ func (this *ModelRace) addPagodaRace(uId string, data *pb.DBPagodaRace) (err err } return nil } + +// 获取排行榜前50的用户名单 (跨服) +func (this *ModelRace) queryRankUser() (ranks []string, err error) { + var ( + result []string + model *db.DBModel + ) + if model, err = this.module.GetCrossDBModel(this.TableName); err != nil { + return + } + + tableName := fmt.Sprintf("%s-%s", db.CrossTag(), this.TableName) + if result, err = model.Redis.ZRevRange(tableName, 0, comm.MaxRankNum).Result(); err != nil { + //this.module.Errorln(err) + return + } + ranks = make([]string, 0) + for i := 0; i < len(result); i += 1 { + ranks = append(ranks, result[i]) + } + return +} + +func (this *ModelRace) queryPlayers(uIds []string) (result []*pb.DBRacePagodaRecord, err error) { + var ( + model *db.DBModel + ) + if model, err = this.module.GetCrossDBModel(this.TableName); err != nil { + return + } + result = make([]*pb.DBRacePagodaRecord, 0) + if _, err = model.GetByUids(uIds, &result); err != nil && err != mgo.MongodbNil { + //this.module.Errorln(err) + return + } + return +} + +func (this *ModelRace) getCrossPagodaRaceList(uid string) (result *pb.DBPagodaRace, err error) { + result = &pb.DBPagodaRace{ + Data: map[int32]*pb.RaceData{}, + } + if err = this.Get(uid, result); err != nil && err == mgo.MongodbNil { // 初始一条数据 + result.Id = primitive.NewObjectID().Hex() + result.Uid = uid + result.Data = make(map[int32]*pb.RaceData) + result.Rtime = configure.Now().Unix() + err = this.addPagodaRace(uid, result) + return + } + + return result, err +} + +// 六合塔记录 +func (this *ModelRace) SetRacePagodaRankList(score int32, uid string) { + + var ( + pipe *pipe.RedisPipe + menbers *redis.Z + model *db.DBModel + err error + ) + + if model, err = this.module.GetCrossDBModel(this.TableName); err != nil { + return + } + tableName := fmt.Sprintf("%s-%s", db.CrossTag(), this.TableName) + pipe = model.Redis.RedisPipe(context.TODO()) + menbers = &redis.Z{Score: float64(score), Member: uid} + + if cmd := pipe.ZAdd(tableName, menbers); cmd != nil { + + dock, err1 := cmd.Result() + if err1 != nil { + this.module.Errorln(dock, err1) + } + } + if _, err := pipe.Exec(); err != nil { + this.module.Errorln(err) + return + } +} + +func (this *ModelRace) SetNormalPagodaRankList(score int32, uid string) { + + var ( + pipe *pipe.RedisPipe + menbers *redis.Z + strTable string + model *db.DBModel + err error + ) + if model, err = this.module.GetCrossDBModel(this.TableName); err != nil { + return + } + strTable = fmt.Sprintf("%s-%s", db.CrossTag(), this.TableName) + menbers = &redis.Z{Score: float64(score), Member: uid} + pipe = model.Redis.RedisPipe(context.TODO()) + if cmd := pipe.ZAdd(strTable, menbers); cmd != nil { + dock, err1 := cmd.Result() + if err1 != nil { + this.module.Errorln(dock, err1) + } + } + if _, err := pipe.Exec(); err != nil { + this.module.Errorln(err) + return + } +} diff --git a/pb/battle_struct.pb.go b/pb/battle_struct.pb.go index fa6feb59a..ad95292e9 100644 --- a/pb/battle_struct.pb.go +++ b/pb/battle_struct.pb.go @@ -1922,6 +1922,78 @@ func (x *ComReplaceSkill) GetSkillInfo() []*ComSkillInfo { return nil } +//额外表现效果(被动,buff效果触发时候) +type ComExtraEffect struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + From int32 `protobuf:"varint,1,opt,name=from,proto3" json:"from"` //发起者 + Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id"` //buffID 或者子技能ID + AniName string `protobuf:"bytes,3,opt,name=aniName,proto3" json:"aniName"` //播放的动画名称 + Target []int32 `protobuf:"varint,4,rep,packed,name=target,proto3" json:"target"` //目标(弹道类技能会用到) +} + +func (x *ComExtraEffect) Reset() { + *x = ComExtraEffect{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_struct_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComExtraEffect) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComExtraEffect) ProtoMessage() {} + +func (x *ComExtraEffect) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_struct_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ComExtraEffect.ProtoReflect.Descriptor instead. +func (*ComExtraEffect) Descriptor() ([]byte, []int) { + return file_battle_battle_struct_proto_rawDescGZIP(), []int{27} +} + +func (x *ComExtraEffect) GetFrom() int32 { + if x != nil { + return x.From + } + return 0 +} + +func (x *ComExtraEffect) GetId() int32 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *ComExtraEffect) GetAniName() string { + if x != nil { + return x.AniName + } + return "" +} + +func (x *ComExtraEffect) GetTarget() []int32 { + if x != nil { + return x.Target + } + return nil +} + var File_battle_battle_struct_proto protoreflect.FileDescriptor var file_battle_battle_struct_proto_rawDesc = []byte{ @@ -2096,32 +2168,38 @@ var file_battle_battle_struct_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x2b, 0x0a, 0x09, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x43, 0x6f, 0x6d, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x73, 0x6b, 0x69, 0x6c, - 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x2a, 0xfb, 0x02, 0x0a, 0x0e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, - 0x54, 0x69, 0x70, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x66, 0x66, 0x5f, - 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, - 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x6d, - 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69, - 0x73, 0x74, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x5f, 0x47, 0x61, 0x69, 0x6e, - 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x5f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, 0x6f, 0x74, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x75, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x10, 0x07, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, - 0x65, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x47, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x6e, - 0x64, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x5f, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x5f, 0x4f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x6f, 0x66, - 0x66, 0x10, 0x0c, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x6e, 0x64, 0x65, 0x61, 0x64, 0x10, 0x0d, 0x12, - 0x0c, 0x0a, 0x08, 0x50, 0x6f, 0x69, 0x73, 0x6f, 0x6e, 0x65, 0x64, 0x10, 0x0e, 0x12, 0x09, 0x0a, - 0x05, 0x42, 0x6c, 0x65, 0x65, 0x64, 0x10, 0x0f, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x79, 0x10, 0x10, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x65, 0x61, 0x74, 0x42, 0x61, - 0x63, 0x6b, 0x10, 0x11, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x69, 0x73, 0x65, 0x61, 0x73, 0x65, 0x64, - 0x10, 0x12, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x73, 0x74, 0x48, 0x6f, 0x6c, 0x64, 0x10, 0x13, - 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x64, 0x65, 0x72, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x10, 0x14, - 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x69, 0x6e, 0x63, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x10, 0x15, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x74, 0x65, 0x61, 0x6c, 0x47, 0x61, 0x69, 0x6e, - 0x10, 0x16, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x68, 0x69, 0x66, 0x74, 0x44, 0x65, 0x62, 0x75, 0x66, - 0x66, 0x10, 0x17, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6c, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x66, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x45, 0x78, 0x74, 0x72, + 0x61, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x6e, 0x69, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6e, + 0x69, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2a, 0xfb, 0x02, + 0x0a, 0x0e, 0x45, 0x66, 0x66, 0x65, 0x63, 0x74, 0x54, 0x69, 0x70, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x66, 0x66, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, + 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x5f, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x10, 0x02, + 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x69, 0x73, 0x74, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, + 0x4e, 0x6f, 0x74, 0x5f, 0x47, 0x61, 0x69, 0x6e, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x6f, + 0x74, 0x5f, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x4e, + 0x6f, 0x74, 0x5f, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x50, + 0x75, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x07, 0x12, 0x0c, 0x0a, + 0x08, 0x44, 0x69, 0x73, 0x70, 0x65, 0x72, 0x73, 0x65, 0x10, 0x08, 0x12, 0x0e, 0x0a, 0x0a, 0x47, + 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x41, + 0x64, 0x64, 0x5f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0a, 0x12, 0x0f, 0x0a, 0x0b, + 0x53, 0x75, 0x62, 0x5f, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0x0b, 0x12, 0x0c, 0x0a, + 0x08, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x6f, 0x66, 0x66, 0x10, 0x0c, 0x12, 0x0a, 0x0a, 0x06, 0x55, + 0x6e, 0x64, 0x65, 0x61, 0x64, 0x10, 0x0d, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x6f, 0x69, 0x73, 0x6f, + 0x6e, 0x65, 0x64, 0x10, 0x0e, 0x12, 0x09, 0x0a, 0x05, 0x42, 0x6c, 0x65, 0x65, 0x64, 0x10, 0x0f, + 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x10, 0x10, 0x12, 0x0c, + 0x0a, 0x08, 0x42, 0x65, 0x61, 0x74, 0x42, 0x61, 0x63, 0x6b, 0x10, 0x11, 0x12, 0x0c, 0x0a, 0x08, + 0x44, 0x69, 0x73, 0x65, 0x61, 0x73, 0x65, 0x64, 0x10, 0x12, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, + 0x73, 0x74, 0x48, 0x6f, 0x6c, 0x64, 0x10, 0x13, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x6e, 0x64, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x69, + 0x6e, 0x63, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x10, 0x15, 0x12, 0x0d, 0x0a, 0x09, 0x53, + 0x74, 0x65, 0x61, 0x6c, 0x47, 0x61, 0x69, 0x6e, 0x10, 0x16, 0x12, 0x0f, 0x0a, 0x0b, 0x53, 0x68, + 0x69, 0x66, 0x74, 0x44, 0x65, 0x62, 0x75, 0x66, 0x66, 0x10, 0x17, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2137,7 +2215,7 @@ func file_battle_battle_struct_proto_rawDescGZIP() []byte { } var file_battle_battle_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_battle_battle_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_battle_battle_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_battle_battle_struct_proto_goTypes = []interface{}{ (EffectTipsType)(0), // 0: EffectTipsType (*ComModifyOperate)(nil), // 1: ComModifyOperate @@ -2167,17 +2245,18 @@ var file_battle_battle_struct_proto_goTypes = []interface{}{ (*ComBuffEffect)(nil), // 25: ComBuffEffect (*ComSwitchScene)(nil), // 26: ComSwitchScene (*ComReplaceSkill)(nil), // 27: ComReplaceSkill - (*BattleRole)(nil), // 28: BattleRole - (*BattleCmd)(nil), // 29: BattleCmd + (*ComExtraEffect)(nil), // 28: ComExtraEffect + (*BattleRole)(nil), // 29: BattleRole + (*BattleCmd)(nil), // 30: BattleCmd } var file_battle_battle_struct_proto_depIdxs = []int32{ - 28, // 0: ComInitFight.roles:type_name -> BattleRole + 29, // 0: ComInitFight.roles:type_name -> BattleRole 6, // 1: ComStartAction.skillInfo:type_name -> ComSkillInfo 6, // 2: ComSkillCDAction.skillInfo:type_name -> ComSkillInfo 12, // 3: ComSkillAtk.comList:type_name -> ComSkillAfterAtk - 29, // 4: ComSkillAfterAtk.comList:type_name -> BattleCmd + 30, // 4: ComSkillAfterAtk.comList:type_name -> BattleCmd 0, // 5: ComModifyHealth.tips:type_name -> EffectTipsType - 28, // 6: ComCreateRoles.roles:type_name -> BattleRole + 29, // 6: ComCreateRoles.roles:type_name -> BattleRole 0, // 7: ComEffectTips.type:type_name -> EffectTipsType 6, // 8: ComReplaceSkill.skillInfo:type_name -> ComSkillInfo 9, // [9:9] is the sub-list for method output_type @@ -2519,6 +2598,18 @@ func file_battle_battle_struct_proto_init() { return nil } } + file_battle_battle_struct_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ComExtraEffect); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -2526,7 +2617,7 @@ func file_battle_battle_struct_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_battle_battle_struct_proto_rawDesc, NumEnums: 1, - NumMessages: 27, + NumMessages: 28, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/pagoda_db.pb.go b/pb/pagoda_db.pb.go index 78e1e7d63..c0e64e47c 100644 --- a/pb/pagoda_db.pb.go +++ b/pb/pagoda_db.pb.go @@ -249,10 +249,11 @@ type DBRacePagodaRecord struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - Uinfo *BaseUserInfo `protobuf:"bytes,3,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 - Data map[int32]*RaceData `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key boss 类型 + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID + Uinfo *BaseUserInfo `protobuf:"bytes,3,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 + Data map[int32]*RaceData `protobuf:"bytes,4,rep,name=data,proto3" json:"data" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // key boss 类型 + Maxfloor int32 `protobuf:"varint,5,opt,name=maxfloor,proto3" json:"maxfloor"` // 最高记录 } func (x *DBRacePagodaRecord) Reset() { @@ -315,6 +316,84 @@ func (x *DBRacePagodaRecord) GetData() map[int32]*RaceData { return nil } +func (x *DBRacePagodaRecord) GetMaxfloor() int32 { + if x != nil { + return x.Maxfloor + } + return 0 +} + +type DBRaceRank struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uinfo *BaseUserInfo `protobuf:"bytes,21,opt,name=uinfo,proto3" json:"uinfo"` //用户基础 + Line *LineData `protobuf:"bytes,2,opt,name=line,proto3" json:"line"` // 阵容信息 + Floor int32 `protobuf:"varint,3,opt,name=floor,proto3" json:"floor"` // 层 + Costtime int32 `protobuf:"varint,5,opt,name=costtime,proto3" json:"costtime"` // 耗时 +} + +func (x *DBRaceRank) Reset() { + *x = DBRaceRank{} + if protoimpl.UnsafeEnabled { + mi := &file_pagoda_pagoda_db_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DBRaceRank) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DBRaceRank) ProtoMessage() {} + +func (x *DBRaceRank) ProtoReflect() protoreflect.Message { + mi := &file_pagoda_pagoda_db_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DBRaceRank.ProtoReflect.Descriptor instead. +func (*DBRaceRank) Descriptor() ([]byte, []int) { + return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{3} +} + +func (x *DBRaceRank) GetUinfo() *BaseUserInfo { + if x != nil { + return x.Uinfo + } + return nil +} + +func (x *DBRaceRank) GetLine() *LineData { + if x != nil { + return x.Line + } + return nil +} + +func (x *DBRaceRank) GetFloor() int32 { + if x != nil { + return x.Floor + } + return 0 +} + +func (x *DBRaceRank) GetCosttime() int32 { + if x != nil { + return x.Costtime + } + return 0 +} + type RaceData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -328,7 +407,7 @@ type RaceData struct { func (x *RaceData) Reset() { *x = RaceData{} if protoimpl.UnsafeEnabled { - mi := &file_pagoda_pagoda_db_proto_msgTypes[3] + mi := &file_pagoda_pagoda_db_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -341,7 +420,7 @@ func (x *RaceData) String() string { func (*RaceData) ProtoMessage() {} func (x *RaceData) ProtoReflect() protoreflect.Message { - mi := &file_pagoda_pagoda_db_proto_msgTypes[3] + mi := &file_pagoda_pagoda_db_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -354,7 +433,7 @@ func (x *RaceData) ProtoReflect() protoreflect.Message { // Deprecated: Use RaceData.ProtoReflect.Descriptor instead. func (*RaceData) Descriptor() ([]byte, []int) { - return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{3} + return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{4} } func (x *RaceData) GetConsttime() int32 { @@ -395,7 +474,7 @@ type DBPagodaRace struct { func (x *DBPagodaRace) Reset() { *x = DBPagodaRace{} if protoimpl.UnsafeEnabled { - mi := &file_pagoda_pagoda_db_proto_msgTypes[4] + mi := &file_pagoda_pagoda_db_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -408,7 +487,7 @@ func (x *DBPagodaRace) String() string { func (*DBPagodaRace) ProtoMessage() {} func (x *DBPagodaRace) ProtoReflect() protoreflect.Message { - mi := &file_pagoda_pagoda_db_proto_msgTypes[4] + mi := &file_pagoda_pagoda_db_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -421,7 +500,7 @@ func (x *DBPagodaRace) ProtoReflect() protoreflect.Message { // Deprecated: Use DBPagodaRace.ProtoReflect.Descriptor instead. func (*DBPagodaRace) Descriptor() ([]byte, []int) { - return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{4} + return file_pagoda_pagoda_db_proto_rawDescGZIP(), []int{5} } func (x *DBPagodaRace) GetId() string { @@ -509,7 +588,7 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{ 0x0b, 0x32, 0x07, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, - 0x74, 0x61, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x62, 0x22, 0xd2, + 0x74, 0x61, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x74, 0x61, 0x62, 0x22, 0xee, 0x01, 0x0a, 0x12, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, @@ -518,34 +597,44 @@ var file_pagoda_pagoda_db_proto_rawDesc = []byte{ 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x31, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, - 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x1a, - 0x42, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, - 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x22, 0x5b, 0x0a, 0x08, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, - 0x72, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, - 0x22, 0xf5, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x63, - 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x63, 0x65, - 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x42, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x1a, 0x42, 0x0a, 0x09, 0x44, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, + 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, + 0x82, 0x01, 0x0a, 0x0a, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x12, 0x23, + 0x0a, 0x05, 0x75, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x42, 0x61, 0x73, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x75, 0x69, + 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, + 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x05, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x73, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x6f, 0x73, 0x74, + 0x74, 0x69, 0x6d, 0x65, 0x22, 0x5b, 0x0a, 0x08, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, + 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, + 0x61, 0x72, 0x12, 0x1d, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x09, 0x2e, 0x4c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x6c, 0x69, 0x6e, + 0x65, 0x22, 0xf5, 0x01, 0x0a, 0x0c, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, + 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x75, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x63, + 0x65, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, + 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x66, 0x6c, 0x6f, 0x6f, 0x72, 0x12, 0x14, 0x0a, + 0x05, 0x72, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x72, 0x74, + 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x42, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x52, 0x61, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -560,36 +649,39 @@ func file_pagoda_pagoda_db_proto_rawDescGZIP() []byte { return file_pagoda_pagoda_db_proto_rawDescData } -var file_pagoda_pagoda_db_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_pagoda_pagoda_db_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_pagoda_pagoda_db_proto_goTypes = []interface{}{ (*DBPagoda)(nil), // 0: DBPagoda (*DBPagodaRecord)(nil), // 1: DBPagodaRecord (*DBRacePagodaRecord)(nil), // 2: DBRacePagodaRecord - (*RaceData)(nil), // 3: RaceData - (*DBPagodaRace)(nil), // 4: DBPagodaRace - nil, // 5: DBPagoda.RewardEntry - nil, // 6: DBPagoda.DataEntry - nil, // 7: DBRacePagodaRecord.DataEntry - nil, // 8: DBPagodaRace.DataEntry - (*LineUp)(nil), // 9: LineUp - (*BaseUserInfo)(nil), // 10: BaseUserInfo - (*LineData)(nil), // 11: LineData + (*DBRaceRank)(nil), // 3: DBRaceRank + (*RaceData)(nil), // 4: RaceData + (*DBPagodaRace)(nil), // 5: DBPagodaRace + nil, // 6: DBPagoda.RewardEntry + nil, // 7: DBPagoda.DataEntry + nil, // 8: DBRacePagodaRecord.DataEntry + nil, // 9: DBPagodaRace.DataEntry + (*LineUp)(nil), // 10: LineUp + (*BaseUserInfo)(nil), // 11: BaseUserInfo + (*LineData)(nil), // 12: LineData } var file_pagoda_pagoda_db_proto_depIdxs = []int32{ - 5, // 0: DBPagoda.reward:type_name -> DBPagoda.RewardEntry - 6, // 1: DBPagoda.data:type_name -> DBPagoda.DataEntry - 9, // 2: DBPagodaRecord.line:type_name -> LineUp - 10, // 3: DBRacePagodaRecord.uinfo:type_name -> BaseUserInfo - 7, // 4: DBRacePagodaRecord.data:type_name -> DBRacePagodaRecord.DataEntry - 11, // 5: RaceData.line:type_name -> LineData - 8, // 6: DBPagodaRace.data:type_name -> DBPagodaRace.DataEntry - 3, // 7: DBRacePagodaRecord.DataEntry.value:type_name -> RaceData - 3, // 8: DBPagodaRace.DataEntry.value:type_name -> RaceData - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 6, // 0: DBPagoda.reward:type_name -> DBPagoda.RewardEntry + 7, // 1: DBPagoda.data:type_name -> DBPagoda.DataEntry + 10, // 2: DBPagodaRecord.line:type_name -> LineUp + 11, // 3: DBRacePagodaRecord.uinfo:type_name -> BaseUserInfo + 8, // 4: DBRacePagodaRecord.data:type_name -> DBRacePagodaRecord.DataEntry + 11, // 5: DBRaceRank.uinfo:type_name -> BaseUserInfo + 12, // 6: DBRaceRank.line:type_name -> LineData + 12, // 7: RaceData.line:type_name -> LineData + 9, // 8: DBPagodaRace.data:type_name -> DBPagodaRace.DataEntry + 4, // 9: DBRacePagodaRecord.DataEntry.value:type_name -> RaceData + 4, // 10: DBPagodaRace.DataEntry.value:type_name -> RaceData + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_pagoda_pagoda_db_proto_init() } @@ -637,7 +729,7 @@ func file_pagoda_pagoda_db_proto_init() { } } file_pagoda_pagoda_db_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RaceData); i { + switch v := v.(*DBRaceRank); i { case 0: return &v.state case 1: @@ -649,6 +741,18 @@ func file_pagoda_pagoda_db_proto_init() { } } file_pagoda_pagoda_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RaceData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pagoda_pagoda_db_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DBPagodaRace); i { case 0: return &v.state @@ -667,7 +771,7 @@ func file_pagoda_pagoda_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pagoda_pagoda_db_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/pagoda_msg.pb.go b/pb/pagoda_msg.pb.go index d7b4392d7..f8400e308 100644 --- a/pb/pagoda_msg.pb.go +++ b/pb/pagoda_msg.pb.go @@ -1137,8 +1137,6 @@ type PagodaCrossRaceRankListReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Raceid int32 `protobuf:"varint,1,opt,name=raceid,proto3" json:"raceid"` // 阵容id } func (x *PagodaCrossRaceRankListReq) Reset() { @@ -1173,19 +1171,12 @@ func (*PagodaCrossRaceRankListReq) Descriptor() ([]byte, []int) { return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{22} } -func (x *PagodaCrossRaceRankListReq) GetRaceid() int32 { - if x != nil { - return x.Raceid - } - return 0 -} - type PagodaCrossRaceRankListResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Ranks []*DBRacePagodaRecord `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` + Ranks []*DBRaceRank `protobuf:"bytes,1,rep,name=ranks,proto3" json:"ranks"` } func (x *PagodaCrossRaceRankListResp) Reset() { @@ -1220,7 +1211,7 @@ func (*PagodaCrossRaceRankListResp) Descriptor() ([]byte, []int) { return file_pagoda_pagoda_msg_proto_rawDescGZIP(), []int{23} } -func (x *PagodaCrossRaceRankListResp) GetRanks() []*DBRacePagodaRecord { +func (x *PagodaCrossRaceRankListResp) GetRanks() []*DBRaceRank { if x != nil { return x.Ranks } @@ -1336,15 +1327,13 @@ var file_pagoda_pagoda_msg_proto_rawDesc = []byte{ 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x11, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x47, 0x65, 0x74, 0x52, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x50, 0x61, - 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x34, + 0x67, 0x6f, 0x64, 0x61, 0x52, 0x61, 0x63, 0x65, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x1c, 0x0a, 0x1a, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x52, 0x61, 0x63, - 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, - 0x72, 0x61, 0x63, 0x65, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x61, - 0x63, 0x65, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x1b, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x72, - 0x6f, 0x73, 0x73, 0x52, 0x61, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x29, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x44, 0x42, 0x52, 0x61, 0x63, 0x65, 0x50, 0x61, 0x67, 0x6f, 0x64, - 0x61, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, + 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x40, 0x0a, 0x1b, + 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x52, 0x61, 0x63, 0x65, 0x52, + 0x61, 0x6e, 0x6b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x21, 0x0a, 0x05, 0x72, + 0x61, 0x6e, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x44, 0x42, 0x52, + 0x61, 0x63, 0x65, 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x05, 0x72, 0x61, 0x6e, 0x6b, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -1396,7 +1385,7 @@ var file_pagoda_pagoda_msg_proto_goTypes = []interface{}{ (*DBPagodaRecord)(nil), // 31: DBPagodaRecord (*UserAssets)(nil), // 32: UserAssets (*DBPagodaRace)(nil), // 33: DBPagodaRace - (*DBRacePagodaRecord)(nil), // 34: DBRacePagodaRecord + (*DBRaceRank)(nil), // 34: DBRaceRank } var file_pagoda_pagoda_msg_proto_depIdxs = []int32{ 26, // 0: PagodaGetListResp.data:type_name -> DBPagoda @@ -1420,7 +1409,7 @@ var file_pagoda_pagoda_msg_proto_depIdxs = []int32{ 27, // 18: PagodaChallengeRaceOverResp.reward:type_name -> UserAtno 25, // 19: PagodaChallengeRaceOverResp.heroexp:type_name -> PagodaChallengeRaceOverResp.HeroexpEntry 33, // 20: PagodaGetRaceResp.data:type_name -> DBPagodaRace - 34, // 21: PagodaCrossRaceRankListResp.ranks:type_name -> DBRacePagodaRecord + 34, // 21: PagodaCrossRaceRankListResp.ranks:type_name -> DBRaceRank 22, // [22:22] is the sub-list for method output_type 22, // [22:22] is the sub-list for method input_type 22, // [22:22] is the sub-list for extension type_name diff --git a/sys/configure/structs/Game.AccumulateMoney.go b/sys/configure/structs/Game.AccumulateMoney.go new file mode 100644 index 000000000..431353bbe --- /dev/null +++ b/sys/configure/structs/Game.AccumulateMoney.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameAccumulateMoney struct { + _dataMap map[int32]*GameAccumulateMoneyData + _dataList []*GameAccumulateMoneyData +} + +func NewGameAccumulateMoney(_buf []map[string]interface{}) (*GameAccumulateMoney, error) { + _dataList := make([]*GameAccumulateMoneyData, 0, len(_buf)) + dataMap := make(map[int32]*GameAccumulateMoneyData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameAccumulateMoneyData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Accumulate] = _v + } + } + return &GameAccumulateMoney{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameAccumulateMoney) GetDataMap() map[int32]*GameAccumulateMoneyData { + return table._dataMap +} + +func (table *GameAccumulateMoney) GetDataList() []*GameAccumulateMoneyData { + return table._dataList +} + +func (table *GameAccumulateMoney) Get(key int32) *GameAccumulateMoneyData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.AccumulateMoneyData.go b/sys/configure/structs/Game.AccumulateMoneyData.go new file mode 100644 index 000000000..d65eb9fe3 --- /dev/null +++ b/sys/configure/structs/Game.AccumulateMoneyData.go @@ -0,0 +1,50 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameAccumulateMoneyData struct { + Accumulate int32 + Reward []*Gameatn +} + +const TypeId_GameAccumulateMoneyData = 1440922956 + +func (*GameAccumulateMoneyData) GetTypeId() int32 { + return 1440922956 +} + +func (_v *GameAccumulateMoneyData)Deserialize(_buf map[string]interface{}) (err error) { + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["accumulate"].(float64); !_ok_ { err = errors.New("accumulate error"); return }; _v.Accumulate = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return } + + _v.Reward = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.Reward = append(_v.Reward, _list_v_) + } + } + + return +} + +func DeserializeGameAccumulateMoneyData(_buf map[string]interface{}) (*GameAccumulateMoneyData, error) { + v := &GameAccumulateMoneyData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Game.GuildBossTask.go b/sys/configure/structs/Game.GuildBossTask.go new file mode 100644 index 000000000..d40d7ae99 --- /dev/null +++ b/sys/configure/structs/Game.GuildBossTask.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameGuildBossTask struct { + _dataMap map[int32]*GameGuildBossTaskData + _dataList []*GameGuildBossTaskData +} + +func NewGameGuildBossTask(_buf []map[string]interface{}) (*GameGuildBossTask, error) { + _dataList := make([]*GameGuildBossTaskData, 0, len(_buf)) + dataMap := make(map[int32]*GameGuildBossTaskData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameGuildBossTaskData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameGuildBossTask{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameGuildBossTask) GetDataMap() map[int32]*GameGuildBossTaskData { + return table._dataMap +} + +func (table *GameGuildBossTask) GetDataList() []*GameGuildBossTaskData { + return table._dataList +} + +func (table *GameGuildBossTask) Get(key int32) *GameGuildBossTaskData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.GuildBossTaskData.go b/sys/configure/structs/Game.GuildBossTaskData.go new file mode 100644 index 000000000..3110f6990 --- /dev/null +++ b/sys/configure/structs/Game.GuildBossTaskData.go @@ -0,0 +1,54 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameGuildBossTaskData struct { + Id int32 + Score int32 + Reward []*Gameatn + TaskDescribe string +} + +const TypeId_GameGuildBossTaskData = -1074074125 + +func (*GameGuildBossTaskData) GetTypeId() int32 { + return -1074074125 +} + +func (_v *GameGuildBossTaskData)Deserialize(_buf map[string]interface{}) (err error) { + { 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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) } + { + var _arr_ []interface{} + var _ok_ bool + if _arr_, _ok_ = _buf["reward"].([]interface{}); !_ok_ { err = errors.New("reward error"); return } + + _v.Reward = make([]*Gameatn, 0, len(_arr_)) + + for _, _e_ := range _arr_ { + var _list_v_ *Gameatn + { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = DeserializeGameatn(_x_); err != nil { return } } + _v.Reward = append(_v.Reward, _list_v_) + } + } + + {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["task_describe"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.TaskDescribe error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.TaskDescribe, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + return +} + +func DeserializeGameGuildBossTaskData(_buf map[string]interface{}) (*GameGuildBossTaskData, error) { + v := &GameGuildBossTaskData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +} diff --git a/sys/configure/structs/Game.Show.go b/sys/configure/structs/Game.Show.go new file mode 100644 index 000000000..42211015c --- /dev/null +++ b/sys/configure/structs/Game.Show.go @@ -0,0 +1,42 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +type GameShow struct { + _dataMap map[int32]*GameShowData + _dataList []*GameShowData +} + +func NewGameShow(_buf []map[string]interface{}) (*GameShow, error) { + _dataList := make([]*GameShowData, 0, len(_buf)) + dataMap := make(map[int32]*GameShowData) + for _, _ele_ := range _buf { + if _v, err2 := DeserializeGameShowData(_ele_); err2 != nil { + return nil, err2 + } else { + _dataList = append(_dataList, _v) + dataMap[_v.Id] = _v + } + } + return &GameShow{_dataList:_dataList, _dataMap:dataMap}, nil +} + +func (table *GameShow) GetDataMap() map[int32]*GameShowData { + return table._dataMap +} + +func (table *GameShow) GetDataList() []*GameShowData { + return table._dataList +} + +func (table *GameShow) Get(key int32) *GameShowData { + return table._dataMap[key] +} + + diff --git a/sys/configure/structs/Game.ShowData.go b/sys/configure/structs/Game.ShowData.go new file mode 100644 index 000000000..e6f2970b9 --- /dev/null +++ b/sys/configure/structs/Game.ShowData.go @@ -0,0 +1,49 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +package cfg + +import "errors" + +type GameShowData struct { + Id int32 + Desc string + Access int32 + Position string + Sex int32 + Resources string + Vague string + PvpAnimator string +} + +const TypeId_GameShowData = 1793917635 + +func (*GameShowData) GetTypeId() int32 { + return 1793917635 +} + +func (_v *GameShowData)Deserialize(_buf map[string]interface{}) (err error) { + { 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; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["desc"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Desc error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Desc, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["access"].(float64); !_ok_ { err = errors.New("access error"); return }; _v.Access = int32(_tempNum_) } + { var _ok_ bool; if _v.Position, _ok_ = _buf["position"].(string); !_ok_ { err = errors.New("position error"); return } } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["sex"].(float64); !_ok_ { err = errors.New("sex error"); return }; _v.Sex = int32(_tempNum_) } + { var _ok_ bool; if _v.Resources, _ok_ = _buf["resources"].(string); !_ok_ { err = errors.New("resources error"); return } } + { var _ok_ bool; if _v.Vague, _ok_ = _buf["vague"].(string); !_ok_ { err = errors.New("vague error"); return } } + { var _ok_ bool; if _v.PvpAnimator, _ok_ = _buf["pvpAnimator"].(string); !_ok_ { err = errors.New("pvpAnimator error"); return } } + return +} + +func DeserializeGameShowData(_buf map[string]interface{}) (*GameShowData, error) { + v := &GameShowData{} + if err := v.Deserialize(_buf); err == nil { + return v, nil + } else { + return nil, err + } +}