diff --git a/bin/json/game_global.json b/bin/json/game_global.json index 8a51abd74..7fe2dbe96 100644 --- a/bin/json/game_global.json +++ b/bin/json/game_global.json @@ -205,6 +205,11 @@ "guild_ImpeachmentCountDown": 48, "guild_DissolutionCountDown_cd": 24, "guild_dissolution_cd": 72, - "guild_BuildCd": 72 + "guild_BuildCd": 72, + "ArenaTicket_max": 10, + "ArenaTicket_RecoveryTime": 144, + "ArenaTicket_PurchaseRrestrictions": 10, + "arena_InitiaIntegral": 1000, + "arena_RecordMax": 10 } ] \ No newline at end of file diff --git a/comm/core.go b/comm/core.go index 924e84330..718dd4a54 100644 --- a/comm/core.go +++ b/comm/core.go @@ -7,6 +7,7 @@ import ( "go_dreamfactory/pb" "math/big" "reflect" + "strings" "go_dreamfactory/lego/core" @@ -107,3 +108,14 @@ func GetRandW(sz []int32) int32 { } return 0 } + +///通过uid获取用户所在区服 +func UidToSTag(uid string) (stag string, err error) { + s := strings.SplitN(uid, "_", 2) + if len(s) < 2 { + err = fmt.Errorf("uid 格式异常:%v", uid) + return + } + stag = s[0] + return +} diff --git a/modules/arena/api_buy.go b/modules/arena/api_buy.go new file mode 100644 index 000000000..433fd6819 --- /dev/null +++ b/modules/arena/api_buy.go @@ -0,0 +1,60 @@ +package arena + +import ( + "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" + "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + + "google.golang.org/protobuf/proto" +) + +//参数校验 +func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ArenaBuyReq) (code pb.ErrorCode) { + if req.BuyNum == 0 { + code = pb.ErrorCode_ReqParameterError + } + return +} + +///获取自己的排行榜信息 +func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (code pb.ErrorCode, data proto.Message) { + var ( + info *pb.DBArenaUser + challenge *cfg.GameArenaBuyChallengeData + need []*cfg.Gameatn + err error + ) + if code = this.BuyCheck(session, req); code != pb.ErrorCode_Success { + return + } + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { + code = pb.ErrorCode_CacheReadError + return + } + + need = make([]*cfg.Gameatn, 0) + for i := int32(0); i < req.BuyNum; i++ { + if challenge, err = this.module.configure.GetchallengeData(info.Buynum + i + 1); err != nil { + code = pb.ErrorCode_ConfigNoFound + return + } + if challenge == nil { + code = pb.ErrorCode_ConfigNoFound + return + } + need = append(need, challenge.Need...) + } + + if code = this.module.ConsumeRes(session, need, true); code != pb.ErrorCode_Success { + return + } + info.Buynum += req.BuyNum + info.Ticket += req.BuyNum + this.module.modelArena.Change(session.GetUserId(), map[string]interface{}{ + "ticket": info.Ticket, + "buynum": info.Buynum, + }) + session.SendMsg(string(this.module.GetType()), "buy", &pb.MoonfantasyBuyResp{Issucc: true, BattleNum: info.Ticket}) + return +} diff --git a/modules/arena/api_challenge.go b/modules/arena/api_challenge.go index 39b6f3e9a..4a8f5e251 100644 --- a/modules/arena/api_challenge.go +++ b/modules/arena/api_challenge.go @@ -2,7 +2,6 @@ package arena import ( "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -10,7 +9,9 @@ import ( //参数校验 func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.ArenaChallengeReq) (code pb.ErrorCode) { - + if req.Playerid == "" { + code = pb.ErrorCode_ReqParameterError + } return } @@ -19,6 +20,7 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge var ( red *pb.DBArenaUser bule *pb.DBArenaUser + heros []*pb.DBHero record *pb.DBBattleRecord cd pb.ErrorCode err error @@ -38,11 +40,25 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallenge if cd = this.ChallengeCheck(session, req); cd != pb.ErrorCode_Success { return } - if red, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { + if red, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { cd = pb.ErrorCode_DBError return } - if bule, err = this.module.modelArena.queryPlayerInfo(req.Playerid); err != nil && err != mgo.MongodbNil { + if red.Defend == nil { + if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), req.Battle.Format); err != nil { + code = pb.ErrorCode_DBError + return + } + red.Defend = &pb.DBPlayerBattleFormt{ + Leadpos: req.Battle.Leadpos, + Formt: heros, + } + if err = this.module.modelArena.updateArenaUserInfo(red); err != nil { + code = pb.ErrorCode_DBError + return + } + } + if bule, err = this.module.modelArena.queryPlayerInfo(req.Playerid); err != nil { cd = pb.ErrorCode_DBError return } diff --git a/modules/arena/api_challengereward.go b/modules/arena/api_challengereward.go index 202805f03..9a6783e9b 100644 --- a/modules/arena/api_challengereward.go +++ b/modules/arena/api_challengereward.go @@ -2,7 +2,6 @@ package arena import ( "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "time" @@ -35,11 +34,11 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha return } } - if red, err = this.module.modelArena.queryPlayerInfo(req.Report.Info.RedCompId); err != nil && err != mgo.MongodbNil { + if red, err = this.module.modelArena.queryPlayerInfo(req.Report.Info.RedCompId); err != nil { code = pb.ErrorCode_DBError return } - if bule, err = this.module.modelArena.queryPlayerInfo(req.Report.Info.BlueCompId); err != nil && err != mgo.MongodbNil { + if bule, err = this.module.modelArena.queryPlayerInfo(req.Report.Info.BlueCompId); err != nil { code = pb.ErrorCode_DBError return } diff --git a/modules/arena/api_info.go b/modules/arena/api_info.go index 00bfa400f..9b845db03 100644 --- a/modules/arena/api_info.go +++ b/modules/arena/api_info.go @@ -2,7 +2,6 @@ package arena import ( "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -23,7 +22,7 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (code if code = this.InfoCheck(session, req); code != pb.ErrorCode_Success { return } - if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { code = pb.ErrorCode_DBError return } diff --git a/modules/arena/api_matche.go b/modules/arena/api_matche.go index cb180b347..64cea09f8 100644 --- a/modules/arena/api_matche.go +++ b/modules/arena/api_matche.go @@ -4,6 +4,7 @@ import ( "go_dreamfactory/comm" "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" "google.golang.org/protobuf/proto" ) @@ -17,36 +18,35 @@ func (this *apiComp) MatcheCheck(session comm.IUserSession, req *pb.ArenaMatcheR ///匹配 func (this *apiComp) Matche(session comm.IUserSession, req *pb.ArenaMatcheReq) (code pb.ErrorCode, data proto.Message) { var ( - players []*pb.DBArenaUser - ai []*pb.DBArenaUser - mplayers []*pb.ArenaPlayer - err error + info *pb.DBArenaUser + active *cfg.GameArenaActiveRewardData + players []*pb.ArenaPlayer + ai []*pb.ArenaPlayer + err error ) if code = this.MatcheCheck(session, req); code != pb.ErrorCode_Success { return } - if players, err = this.module.modelArena.matchePlayer(req.Minintegral, req.Maxintegral); err != nil && err != mgo.MongodbNil { + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { + code = pb.ErrorCode_DBError + return + } + if active, err = this.module.configure.getActiveReward(info.Integral); err != nil { + this.module.Errorln(err) + return + } + if players, err = this.module.modelArena.matchePlayer(info.Uid, info.Dan, active.HumanNum); err != nil && err != mgo.MongodbNil { code = pb.ErrorCode_DBError return } if len(players) < 5 { num := 5 - len(players) - if ai, err = this.module.modelArena.matcheAI(req.Minintegral, int32(num)); err != nil && err != mgo.MongodbNil { + if ai, err = this.module.modelArena.matcheAI(info.Dan, int32(num)); err != nil && err != mgo.MongodbNil { code = pb.ErrorCode_DBError return } players = append(players, ai...) } - mplayers = make([]*pb.ArenaPlayer, len(players)) - for i, v := range players { - mplayers[i] = &pb.ArenaPlayer{ - Uid: v.Uid, - Name: v.Name, - Integral: v.Integral, - Defend: v.Defend, - } - } - - session.SendMsg(string(this.module.GetType()), "matche", &pb.ArenaMatcheResp{Players: mplayers}) + session.SendMsg(string(this.module.GetType()), "matche", &pb.ArenaMatcheResp{Players: players}) return } diff --git a/modules/arena/api_setdattformt.go b/modules/arena/api_setdattformt.go index c69f28e05..392edf2f2 100644 --- a/modules/arena/api_setdattformt.go +++ b/modules/arena/api_setdattformt.go @@ -2,7 +2,6 @@ package arena import ( "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -24,15 +23,10 @@ func (this *apiComp) SetAttFormt(session comm.IUserSession, req *pb.ArenaSetAttF if code = this.SetAttFormtCheck(session, req); code != pb.ErrorCode_Success { return } - if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { code = pb.ErrorCode_DBError return } - if err == mgo.MongodbNil { - info = &pb.DBArenaUser{ - Uid: session.GetUserId(), - } - } if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), req.Formt); err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/arena/api_setdefformt.go b/modules/arena/api_setdefformt.go index 5f35c27f8..3f9251ec1 100644 --- a/modules/arena/api_setdefformt.go +++ b/modules/arena/api_setdefformt.go @@ -2,7 +2,6 @@ package arena import ( "go_dreamfactory/comm" - "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -24,15 +23,11 @@ func (this *apiComp) SetDefFormt(session comm.IUserSession, req *pb.ArenaSetDefF if code = this.SetDefFormtCheck(session, req); code != pb.ErrorCode_Success { return } - if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil && err != mgo.MongodbNil { + if info, err = this.module.modelArena.queryPlayerInfo(session.GetUserId()); err != nil { code = pb.ErrorCode_DBError return } - if err == mgo.MongodbNil { - info = &pb.DBArenaUser{ - Uid: session.GetUserId(), - } - } + if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), req.Formt); err != nil { code = pb.ErrorCode_DBError return diff --git a/modules/arena/configure.go b/modules/arena/configure.go index 16fa0c255..c929bd533 100644 --- a/modules/arena/configure.go +++ b/modules/arena/configure.go @@ -1,9 +1,12 @@ package arena import ( + "fmt" "go_dreamfactory/lego/core" "go_dreamfactory/modules" + "go_dreamfactory/sys/configure" cfg "go_dreamfactory/sys/configure/structs" + "sync" ) const ( @@ -12,12 +15,17 @@ const ( game_arenaarobot = "game_arenaarobot.json" //ai配置表 game_arenarankreward = "game_arenarankreward.json" //比赛奖励配置 game_arenachallengenpc = "game_arenachallengenpc.json" //剧情表 + + game_monsterformat = "game_monsterformat.json" //整容表 + game_monster = "game_monster.json" //怪物表 ) ///竞技场配置管理组件 type configureComp struct { modules.MCompConfigure module *Arena + lock sync.RWMutex + ais map[int32][]*cfg.GameArenaRobotData } //组件初始化接口 @@ -27,7 +35,124 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp this.LoadConfigure(game_arenabuychallenge, cfg.NewGameArenaBuyChallenge) this.LoadConfigure(game_arenaactivereward, cfg.NewGameArenaActiveReward) this.LoadConfigure(game_arenaarobot, cfg.NewGameArenaRobot) + configure.RegisterConfigure(game_arenaarobot, cfg.NewGameArenaRobot, this.updateArenaRobot) this.LoadConfigure(game_arenarankreward, cfg.NewGameArenaRankReward) this.LoadConfigure(game_arenachallengenpc, cfg.NewGameArenaChallengeNpc) + + this.LoadConfigure(game_monsterformat, cfg.NewGameMonsterFormat) + this.LoadConfigure(game_monster, cfg.NewGameMonster) + return +} + +///获取月之秘境触购买表 +func (this *configureComp) GetchallengeData(buynum int32) (result *cfg.GameArenaBuyChallengeData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_arenabuychallenge); err != nil { + this.module.Errorln(err) + return + } else { + result = v.(*cfg.GameArenaBuyChallenge).GetDataMap()[buynum] + } + return +} + +//查询积分段位信息 +func (this *configureComp) getActiveReward(integral int32) (result *cfg.GameArenaActiveRewardData, err error) { + var ( + v interface{} + ) + if v, err = this.GetConfigure(game_arenaactivereward); err != nil { + this.module.Errorln(err) + } else { + for _, v := range v.(*cfg.GameArenaActiveReward).GetDataMap() { + if integral >= v.ScoreLow && integral < v.ScoreUp { + result = v + return + } + } + } + err = fmt.Errorf("未找到 匹配积分:%d段位配置", integral) + return +} + +//查询积分段位信息 +func (this *configureComp) getActiveRewardById(lv int32) (result *cfg.GameArenaActiveRewardData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_arenaactivereward); err != nil { + this.module.Errorln(err) + } else { + if result, ok = v.(*cfg.GameArenaActiveReward).GetDataMap()[lv]; !ok { + err = fmt.Errorf("未找到段位:%d配置", lv) + this.module.Errorln(err) + } + } + return +} + +//更新ai数据表 +func (this *configureComp) updateArenaRobot() { + if v, err := this.GetConfigure(game_arenaarobot); err == nil { + if configure, ok := v.(*cfg.GameArenaRobot); ok { + this.lock.Lock() + defer this.lock.Unlock() + for _, value := range configure.GetDataList() { + if _, ok = this.ais[value.LvId]; !ok { + this.ais[value.LvId] = make([]*cfg.GameArenaRobotData, 0) + } + this.ais[value.LvId] = append(this.ais[value.LvId], value) + } + return + } + } else { + this.module.Errorln(err) + } +} + +func (this *configureComp) getArenaRobot(dan int32) (result []*cfg.GameArenaRobotData, err error) { + this.lock.RLock() + defer this.lock.RUnlock() + result = this.ais[dan] + if result == nil { + err = fmt.Errorf("未找到匹配段位:%d的ai配置", dan) + } + return +} + +//查询阵容表 +func (this *configureComp) getMonsterFormat(id int32) (result *cfg.GameMonsterFormatData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_monsterformat); err != nil { + this.module.Errorln(err) + } else { + if result, ok = v.(*cfg.GameMonsterFormat).GetDataMap()[id]; !ok { + err = fmt.Errorf("on found MonsterFormat:%d", id) + this.module.Errorln(err) + } + } + return +} + +//查询怪物表 +func (this *configureComp) getMonster(id int32) (result *cfg.GameMonsterData, err error) { + var ( + v interface{} + ok bool + ) + if v, err = this.GetConfigure(game_monster); err != nil { + this.module.Errorln(err) + } else { + if result, ok = v.(*cfg.GameMonster).GetDataMap()[id]; !ok { + err = fmt.Errorf("on found GameMonster:%d", id) + this.module.Errorln(err) + } + } return } diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index 28ea14dd1..18c89b23f 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -2,14 +2,20 @@ package arena import ( "context" + "fmt" "go_dreamfactory/comm" "go_dreamfactory/lego/core" "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/modules" "go_dreamfactory/pb" + cfg "go_dreamfactory/sys/configure/structs" + "go_dreamfactory/sys/db" + "math/rand" + "time" "go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/mongo" + "go.mongodb.org/mongo-driver/mongo/options" "go.mongodb.org/mongo-driver/x/bsonx" ) @@ -38,19 +44,52 @@ func (this *modelArena) queryPlayerInfo(uId string) (result *pb.DBArenaUser, err this.module.Errorln(err) return } + if err == mgo.MongodbNil { + result = &pb.DBArenaUser{ + Uid: uId, + Integral: 0, + Ticket: 10, + Record: make([]*pb.DBArenaBattleRecord, 0), + } + if err = this.Add(uId, result); err != nil { + this.module.Errorln(err) + } + } + return } //查询用户英雄数据 func (this *modelArena) queryUserHeros(uid string, heroids []string) (results []*pb.DBHero, err error) { - + var ( + model *db.DBModel + ) + if model, err = this.module.GetDBNoduleByUid(uid, comm.TableHero, time.Hour); err != nil { + this.module.Errorln(err) + return + } + results = make([]*pb.DBHero, 0) + if err = model.GetListObjs(uid, heroids, results); err != nil { + this.module.Errorln(err) + return + } return } ///保存用户竞技场信息 func (this *modelArena) updateArenaUserInfo(info *pb.DBArenaUser) (err error) { + var ( + active *cfg.GameArenaActiveRewardData + ) + + if active, err = this.module.configure.getActiveReward(info.Integral); err != nil { + this.module.Errorln(err) + return + } + this.Change(info.Uid, map[string]interface{}{ "integral": info.Integral, + "dan": active.LvId, "attack": info.Attack, "defend": info.Defend, "streak": info.Streak, @@ -84,17 +123,80 @@ func (this *modelArena) updateArenaUserInfo(info *pb.DBArenaUser) (err error) { // } //匹配机器人 -func (this *modelArena) matcheAI(duan, num int32) (results []*pb.DBArenaUser, err error) { - +func (this *modelArena) matcheAI(dan, num int32) (results []*pb.ArenaPlayer, err error) { + var ( + active *cfg.GameArenaActiveRewardData + ais []*cfg.GameArenaRobotData + mFormat *cfg.GameMonsterFormatData + monst *cfg.GameMonsterData + rank []int32 + targets []int32 + ) + if active, err = this.module.configure.getActiveRewardById(dan); err != nil { + this.module.Errorln(err) + return + } + if ais, err = this.module.configure.getArenaRobot(dan); err != nil { + this.module.Errorln(err) + return + } + rank = make([]int32, len(ais)) + for i, v := range ais { + rank[i] = v.Weight + } + targets = make([]int32, num) + for i := 0; i < int(num); i++ { + index := comm.GetRandW(rank) + targets[i] = index + } + results = make([]*pb.ArenaPlayer, num) + for i, v := range targets { + results[i] = &pb.ArenaPlayer{ + Name: this.randUserName(), + Dan: dan, + Integral: int32(rand.Intn(int(active.ScoreUp)-int(active.ScoreLow))) + active.ScoreLow, + Isai: true, + Defend: &pb.DBPlayerBattleFormt{ + Leadpos: mFormat.CaptainId, + Formt: make([]*pb.DBHero, len(mFormat.MonsterList)), + }, + } + aiconf := ais[v] + if mFormat, err = this.module.configure.getMonsterFormat(aiconf.MonsterformatId); err != nil { + this.module.Errorln(err) + return + } + for i1, v1 := range mFormat.MonsterList { + if v1 == -1 { + results[i].Defend.Formt[i1] = nil + } else { + if monst, err = this.module.configure.getMonster(v1); err != nil { + this.module.Errorln(err) + } + hero := &pb.DBHero{} + if hero = this.module.ModuleHero.CreateMonster(monst.HeroId, monst.Star, mFormat.Lv); hero == nil { + err = fmt.Errorf("CreateMonster 失败") + return + } + hero.Property[comm.Hp] = int32(float32(hero.Property[comm.Hp]) * mFormat.Hppro) + hero.Property[comm.Atk] = int32(float32(hero.Property[comm.Atk]) * mFormat.Atkpro) + hero.Property[comm.Def] = int32(float32(hero.Property[comm.Def]) * mFormat.Defpro) + hero.SuiteId = monst.Equip4 + hero.SuiteExtId = monst.Equip2 + results[i].Defend.Formt[i1] = hero + } + } + } return } //获取目标去陪数据 -func (this *modelArena) matchePlayer(min, max int32) (results []*pb.DBArenaUser, err error) { +func (this *modelArena) matchePlayer(uid string, dan, num int32) (results []*pb.ArenaPlayer, err error) { var ( cursor *mongo.Cursor ) - if cursor, err = this.DBModel.DB.Find(comm.TableArena, bson.M{}); err != nil { + results = make([]*pb.ArenaPlayer, 0) + if cursor, err = this.DBModel.DB.Find(comm.TableArena, bson.M{"uid": bson.M{"$ne": uid}, "dan": dan}, options.Find().SetSkip(0).SetLimit(int64(num))); err != nil { this.module.Errorln(err) return } else { @@ -104,7 +206,19 @@ func (this *modelArena) matchePlayer(min, max int32) (results []*pb.DBArenaUser, this.module.Errorln(err) return } + results = append(results, &pb.ArenaPlayer{ + Uid: temp.Uid, + Name: temp.Name, + Dan: temp.Dan, + Integral: temp.Integral, + Defend: temp.Defend, + }) } } return } + +//随机用户名 +func (this *modelArena) randUserName() string { + return "" +} diff --git a/modules/arena/module.go b/modules/arena/module.go index f9700b599..d235a8cbe 100644 --- a/modules/arena/module.go +++ b/modules/arena/module.go @@ -20,6 +20,7 @@ type Arena struct { modules.ModuleBase battle comm.IBattle api *apiComp + configure *configureComp modelArena *modelArena } @@ -31,7 +32,7 @@ func (this *Arena) GetType() core.M_Modules { //模块初始化接口 注册用户创建角色事件 func (this *Arena) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { err = this.ModuleBase.Init(service, module, options) - + return } @@ -39,5 +40,6 @@ func (this *Arena) Init(service core.IService, module core.IModule, options core func (this *Arena) OnInstallComp() { this.ModuleBase.OnInstallComp() this.api = this.RegisterComp(new(apiComp)).(*apiComp) + this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.modelArena = this.RegisterComp(new(modelArena)).(*modelArena) } diff --git a/modules/modulebase.go b/modules/modulebase.go index 8810de7f5..eff808e49 100644 --- a/modules/modulebase.go +++ b/modules/modulebase.go @@ -370,6 +370,28 @@ func (this *ModuleBase) GetDBNodule(session comm.IUserSession, tableName string, return } +//跨服对象获取数据操作对象 +func (this *ModuleBase) GetDBNoduleByUid(uid, tableName string, expired time.Duration) (model *db.DBModel, err error) { + var ( + stag string + conn *db.DBConn + ) + if stag, err = comm.UidToSTag(uid); err != nil { + return + } + if stag == this.service.GetTag() { + if conn, err = db.Local(); err != nil { + return + } + } else { + if conn, err = db.ServerDBConn(stag); err != nil { + return + } + } + model = db.NewDBModel(tableName, expired, conn) + return +} + //日志接口 func (this *ModuleBase) Debug(msg string, args ...log.Field) { this.options.GetLog().Debug(msg, args...) diff --git a/pb/arena_db.pb.go b/pb/arena_db.pb.go index 3dccb1f76..b68888535 100644 --- a/pb/arena_db.pb.go +++ b/pb/arena_db.pb.go @@ -84,8 +84,10 @@ type ArenaPlayer struct { Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` - Integral int32 `protobuf:"varint,3,opt,name=Integral,proto3" json:"Integral"` - Defend *DBPlayerBattleFormt `protobuf:"bytes,4,opt,name=defend,proto3" json:"defend"` //防守 + Dan int32 `protobuf:"varint,3,opt,name=dan,proto3" json:"dan"` //段位 + Integral int32 `protobuf:"varint,4,opt,name=Integral,proto3" json:"Integral"` + Defend *DBPlayerBattleFormt `protobuf:"bytes,5,opt,name=defend,proto3" json:"defend"` //防守 + Isai bool `protobuf:"varint,6,opt,name=isai,proto3" json:"isai"` //是否是ai } func (x *ArenaPlayer) Reset() { @@ -134,6 +136,13 @@ func (x *ArenaPlayer) GetName() string { return "" } +func (x *ArenaPlayer) GetDan() int32 { + if x != nil { + return x.Dan + } + return 0 +} + func (x *ArenaPlayer) GetIntegral() int32 { if x != nil { return x.Integral @@ -148,6 +157,13 @@ func (x *ArenaPlayer) GetDefend() *DBPlayerBattleFormt { return nil } +func (x *ArenaPlayer) GetIsai() bool { + if x != nil { + return x.Isai + } + return false +} + //战斗记录 type DBArenaBattleRecord struct { state protoimpl.MessageState @@ -242,16 +258,19 @@ type DBArenaUser struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称 - Integral int32 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral"` //积分 - Attack *DBPlayerBattleFormt `protobuf:"bytes,4,opt,name=attack,proto3" json:"attack"` //进攻阵型 - Defend *DBPlayerBattleFormt `protobuf:"bytes,5,opt,name=defend,proto3" json:"defend"` //防守阵型 - Streak int32 `protobuf:"varint,6,opt,name=streak,proto3" json:"streak"` //连胜 - Attackrate int32 `protobuf:"varint,7,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率 - Defendrate int32 `protobuf:"varint,8,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率 - Rank int32 `protobuf:"varint,9,opt,name=rank,proto3" json:"rank"` //排名 - Record []*DBArenaBattleRecord `protobuf:"bytes,10,rep,name=record,proto3" json:"record"` //战斗记录 + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称 + Integral int32 `protobuf:"varint,3,opt,name=integral,proto3" json:"integral"` //积分 + Ticket int32 `protobuf:"varint,4,opt,name=ticket,proto3" json:"ticket"` //挑战券 + Dan int32 `protobuf:"varint,5,opt,name=dan,proto3" json:"dan"` //段位 + Attack *DBPlayerBattleFormt `protobuf:"bytes,6,opt,name=attack,proto3" json:"attack"` //进攻阵型 + Defend *DBPlayerBattleFormt `protobuf:"bytes,7,opt,name=defend,proto3" json:"defend"` //防守阵型 + Streak int32 `protobuf:"varint,8,opt,name=streak,proto3" json:"streak"` //连胜 + Attackrate int32 `protobuf:"varint,9,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率 + Defendrate int32 `protobuf:"varint,10,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率 + Rank int32 `protobuf:"varint,11,opt,name=rank,proto3" json:"rank"` //排名 + Buynum int32 `protobuf:"varint,12,opt,name=buynum,proto3" json:"buynum"` //购买次数 + Record []*DBArenaBattleRecord `protobuf:"bytes,13,rep,name=record,proto3" json:"record"` //战斗记录 } func (x *DBArenaUser) Reset() { @@ -307,6 +326,20 @@ func (x *DBArenaUser) GetIntegral() int32 { return 0 } +func (x *DBArenaUser) GetTicket() int32 { + if x != nil { + return x.Ticket + } + return 0 +} + +func (x *DBArenaUser) GetDan() int32 { + if x != nil { + return x.Dan + } + return 0 +} + func (x *DBArenaUser) GetAttack() *DBPlayerBattleFormt { if x != nil { return x.Attack @@ -349,6 +382,13 @@ func (x *DBArenaUser) GetRank() int32 { return 0 } +func (x *DBArenaUser) GetBuynum() int32 { + if x != nil { + return x.Buynum + } + return 0 +} + func (x *DBArenaUser) GetRecord() []*DBArenaBattleRecord { if x != nil { return x.Record @@ -366,47 +406,54 @@ var file_arena_arena_db_proto_rawDesc = []byte{ 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1d, 0x0a, 0x05, 0x66, 0x6f, 0x72, 0x6d, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, - 0x65, 0x72, 0x6f, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x6d, 0x74, 0x22, 0x7d, 0x0a, 0x0b, 0x41, 0x72, - 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1a, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x06, 0x64, - 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, - 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, - 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x44, 0x42, - 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x62, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x12, 0x1a, 0x0a, - 0x08, 0x69, 0x73, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x08, 0x69, 0x73, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x69, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x72, 0x69, 0x76, 0x61, - 0x6c, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x6e, 0x61, 0x6d, - 0x65, 0x22, 0xc5, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, - 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, - 0x72, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, - 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, - 0x6b, 0x12, 0x2c, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, - 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, - 0x6b, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x74, 0x74, - 0x61, 0x63, 0x6b, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x65, 0x6e, - 0x64, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x65, 0x66, - 0x65, 0x6e, 0x64, 0x72, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x2c, 0x0a, 0x06, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, - 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, - 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x6f, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x6d, 0x74, 0x22, 0xa3, 0x01, 0x0a, 0x0b, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x64, + 0x61, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2c, + 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x69, 0x73, 0x61, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x61, 0x69, + 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x62, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, + 0x73, 0x77, 0x69, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x73, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, + 0x12, 0x18, 0x0a, 0x07, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x69, + 0x76, 0x61, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, + 0x69, 0x76, 0x61, 0x6c, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x87, 0x03, 0x0a, 0x0b, 0x44, 0x42, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, + 0x63, 0x6b, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x61, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x64, 0x61, 0x6e, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, + 0x63, 0x6b, 0x72, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x74, + 0x74, 0x61, 0x63, 0x6b, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x65, + 0x6e, 0x64, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x65, + 0x66, 0x65, 0x6e, 0x64, 0x72, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x12, 0x16, 0x0a, 0x06, + 0x62, 0x75, 0x79, 0x6e, 0x75, 0x6d, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, + 0x79, 0x6e, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x06, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x0d, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x61, + 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x06, 0x72, 0x65, 0x63, 0x6f, + 0x72, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( diff --git a/pb/arena_msg.pb.go b/pb/arena_msg.pb.go index f5ddefdbf..67fe98b59 100644 --- a/pb/arena_msg.pb.go +++ b/pb/arena_msg.pb.go @@ -320,9 +320,6 @@ type ArenaMatcheReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Minintegral int32 `protobuf:"varint,1,opt,name=minintegral,proto3" json:"minintegral"` //匹配最小分数段 - Maxintegral int32 `protobuf:"varint,2,opt,name=maxintegral,proto3" json:"maxintegral"` //匹配最大分数段 } func (x *ArenaMatcheReq) Reset() { @@ -357,20 +354,6 @@ func (*ArenaMatcheReq) Descriptor() ([]byte, []int) { return file_arena_arena_msg_proto_rawDescGZIP(), []int{6} } -func (x *ArenaMatcheReq) GetMinintegral() int32 { - if x != nil { - return x.Minintegral - } - return 0 -} - -func (x *ArenaMatcheReq) GetMaxintegral() int32 { - if x != nil { - return x.Maxintegral - } - return 0 -} - //竞技场匹配 回应 type ArenaMatcheResp struct { state protoimpl.MessageState @@ -712,6 +695,109 @@ func (*ArenaRankResp) Descriptor() ([]byte, []int) { return file_arena_arena_msg_proto_rawDescGZIP(), []int{13} } +//购买票据 +type ArenaBuyReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BuyNum int32 `protobuf:"varint,1,opt,name=buyNum,proto3" json:"buyNum"` +} + +func (x *ArenaBuyReq) Reset() { + *x = ArenaBuyReq{} + if protoimpl.UnsafeEnabled { + mi := &file_arena_arena_msg_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArenaBuyReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArenaBuyReq) ProtoMessage() {} + +func (x *ArenaBuyReq) ProtoReflect() protoreflect.Message { + mi := &file_arena_arena_msg_proto_msgTypes[14] + 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 ArenaBuyReq.ProtoReflect.Descriptor instead. +func (*ArenaBuyReq) Descriptor() ([]byte, []int) { + return file_arena_arena_msg_proto_rawDescGZIP(), []int{14} +} + +func (x *ArenaBuyReq) GetBuyNum() int32 { + if x != nil { + return x.BuyNum + } + return 0 +} + +type ArenaBuyResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Issucc bool `protobuf:"varint,1,opt,name=issucc,proto3" json:"issucc"` //是否成功 + Ticket int32 `protobuf:"varint,2,opt,name=ticket,proto3" json:"ticket"` //当前挑战次数 +} + +func (x *ArenaBuyResp) Reset() { + *x = ArenaBuyResp{} + if protoimpl.UnsafeEnabled { + mi := &file_arena_arena_msg_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ArenaBuyResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ArenaBuyResp) ProtoMessage() {} + +func (x *ArenaBuyResp) ProtoReflect() protoreflect.Message { + mi := &file_arena_arena_msg_proto_msgTypes[15] + 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 ArenaBuyResp.ProtoReflect.Descriptor instead. +func (*ArenaBuyResp) Descriptor() ([]byte, []int) { + return file_arena_arena_msg_proto_rawDescGZIP(), []int{15} +} + +func (x *ArenaBuyResp) GetIssucc() bool { + if x != nil { + return x.Issucc + } + return false +} + +func (x *ArenaBuyResp) GetTicket() int32 { + if x != nil { + return x.Ticket + } + return 0 +} + var File_arena_arena_msg_proto protoreflect.FileDescriptor var file_arena_arena_msg_proto_rawDesc = []byte{ @@ -739,39 +825,41 @@ var file_arena_arena_msg_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x66, 0x6f, 0x72, 0x6d, 0x74, 0x22, 0x2e, 0x0a, 0x14, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x54, 0x0a, 0x0e, 0x41, 0x72, 0x65, 0x6e, - 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x69, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x0b, 0x6d, 0x69, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, - 0x6d, 0x61, 0x78, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x0b, 0x6d, 0x61, 0x78, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x22, 0x39, - 0x0a, 0x0f, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x26, 0x0a, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, - 0x52, 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x59, 0x0a, 0x11, 0x41, 0x72, 0x65, - 0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, - 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x69, 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, 0x55, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43, 0x68, 0x61, - 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x56, 0x0a, 0x17, 0x41, - 0x72, 0x65, 0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x77, - 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x12, 0x25, 0x0a, 0x06, - 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 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, 0x32, 0x0a, 0x18, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, - 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x0e, 0x0a, 0x0c, 0x41, 0x72, 0x65, 0x6e, 0x61, - 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x22, 0x0f, 0x0a, 0x0d, 0x41, 0x72, 0x65, 0x6e, 0x61, - 0x52, 0x61, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x63, 0x63, 0x22, 0x10, 0x0a, 0x0e, 0x41, 0x72, 0x65, 0x6e, + 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x22, 0x39, 0x0a, 0x0f, 0x41, 0x72, + 0x65, 0x6e, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, + 0x07, 0x70, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, + 0x2e, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x07, 0x70, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x73, 0x22, 0x59, 0x0a, 0x11, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43, 0x68, + 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, + 0x61, 0x79, 0x65, 0x72, 0x69, 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, 0x55, 0x0a, 0x12, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, + 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0a, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x22, 0x56, 0x0a, 0x17, 0x41, 0x72, 0x65, 0x6e, 0x61, + 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, + 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x05, 0x69, 0x73, 0x77, 0x69, 0x6e, 0x12, 0x25, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x02, 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, + 0x32, 0x0a, 0x18, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x43, 0x68, 0x61, 0x6c, 0x6c, 0x65, 0x6e, 0x67, + 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x63, 0x63, 0x22, 0x0e, 0x0a, 0x0c, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x52, 0x61, 0x6e, 0x6b, + 0x52, 0x65, 0x71, 0x22, 0x0f, 0x0a, 0x0d, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x52, 0x61, 0x6e, 0x6b, + 0x52, 0x65, 0x73, 0x70, 0x22, 0x25, 0x0a, 0x0b, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x42, 0x75, 0x79, + 0x52, 0x65, 0x71, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x62, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x22, 0x3e, 0x0a, 0x0c, 0x41, + 0x72, 0x65, 0x6e, 0x61, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x69, + 0x73, 0x73, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x73, + 0x75, 0x63, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -786,7 +874,7 @@ func file_arena_arena_msg_proto_rawDescGZIP() []byte { return file_arena_arena_msg_proto_rawDescData } -var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_arena_arena_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_arena_arena_msg_proto_goTypes = []interface{}{ (*ArenaInfoReq)(nil), // 0: ArenaInfoReq (*ArenaInfoResp)(nil), // 1: ArenaInfoResp @@ -802,20 +890,22 @@ var file_arena_arena_msg_proto_goTypes = []interface{}{ (*ArenaChallengeRewardResp)(nil), // 11: ArenaChallengeRewardResp (*ArenaRankReq)(nil), // 12: ArenaRankReq (*ArenaRankResp)(nil), // 13: ArenaRankResp - (*DBArenaUser)(nil), // 14: DBArenaUser - (*ArenaPlayer)(nil), // 15: ArenaPlayer - (*BattleFormation)(nil), // 16: BattleFormation - (ErrorCode)(0), // 17: ErrorCode - (*BattleInfo)(nil), // 18: BattleInfo - (*BattleReport)(nil), // 19: BattleReport + (*ArenaBuyReq)(nil), // 14: ArenaBuyReq + (*ArenaBuyResp)(nil), // 15: ArenaBuyResp + (*DBArenaUser)(nil), // 16: DBArenaUser + (*ArenaPlayer)(nil), // 17: ArenaPlayer + (*BattleFormation)(nil), // 18: BattleFormation + (ErrorCode)(0), // 19: ErrorCode + (*BattleInfo)(nil), // 20: BattleInfo + (*BattleReport)(nil), // 21: BattleReport } var file_arena_arena_msg_proto_depIdxs = []int32{ - 14, // 0: ArenaInfoResp.info:type_name -> DBArenaUser - 15, // 1: ArenaMatcheResp.players:type_name -> ArenaPlayer - 16, // 2: ArenaChallengeReq.battle:type_name -> BattleFormation - 17, // 3: ArenaChallengeResp.code:type_name -> ErrorCode - 18, // 4: ArenaChallengeResp.info:type_name -> BattleInfo - 19, // 5: ArenaChallengeRewardReq.report:type_name -> BattleReport + 16, // 0: ArenaInfoResp.info:type_name -> DBArenaUser + 17, // 1: ArenaMatcheResp.players:type_name -> ArenaPlayer + 18, // 2: ArenaChallengeReq.battle:type_name -> BattleFormation + 19, // 3: ArenaChallengeResp.code:type_name -> ErrorCode + 20, // 4: ArenaChallengeResp.info:type_name -> BattleInfo + 21, // 5: ArenaChallengeRewardReq.report:type_name -> BattleReport 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -1000,6 +1090,30 @@ func file_arena_arena_msg_proto_init() { return nil } } + file_arena_arena_msg_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArenaBuyReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_arena_arena_msg_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ArenaBuyResp); 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{ @@ -1007,7 +1121,7 @@ func file_arena_arena_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_arena_arena_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 14, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/equipment_msg.pb.go b/pb/equipment_msg.pb.go index c2b88459a..fc0310441 100644 --- a/pb/equipment_msg.pb.go +++ b/pb/equipment_msg.pb.go @@ -787,7 +787,7 @@ func (x *EquipmentWashResp) GetAdverbEntry() []*EquipmentAttributeEntry { return nil } -//谢怜确认 +//洗练确认 type EquipmentWashConfirmReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/pb/hero_db.pb.go b/pb/hero_db.pb.go index 105698f39..1ccf64cab 100644 --- a/pb/hero_db.pb.go +++ b/pb/hero_db.pb.go @@ -543,78 +543,6 @@ func (x *DBHeroRecord) GetDrawcount() int32 { return 0 } -// 英雄天赋系统 -type HeroTalent struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID 主键id - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID - HeroId string `protobuf:"bytes,3,opt,name=heroId,proto3" json:"heroId"` // 英雄ID - Talnet map[int32]int32 `protobuf:"bytes,4,rep,name=talnet,proto3" json:"talnet" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 已经学习过的天赋 -} - -func (x *HeroTalent) Reset() { - *x = HeroTalent{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_db_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroTalent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroTalent) ProtoMessage() {} - -func (x *HeroTalent) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_db_proto_msgTypes[4] - 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 HeroTalent.ProtoReflect.Descriptor instead. -func (*HeroTalent) Descriptor() ([]byte, []int) { - return file_hero_hero_db_proto_rawDescGZIP(), []int{4} -} - -func (x *HeroTalent) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *HeroTalent) GetUid() string { - if x != nil { - return x.Uid - } - return "" -} - -func (x *HeroTalent) GetHeroId() string { - if x != nil { - return x.HeroId - } - return "" -} - -func (x *HeroTalent) GetTalnet() map[int32]int32 { - if x != nil { - return x.Talnet - } - return nil -} - var File_hero_hero_db_proto protoreflect.FileDescriptor var file_hero_hero_db_proto_rawDesc = []byte{ @@ -717,23 +645,11 @@ var file_hero_hero_db_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x35, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x6d, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0xb2, 0x01, 0x0a, 0x0a, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 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, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x06, 0x74, 0x61, 0x6c, 0x6e, - 0x65, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x54, - 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x61, 0x6c, 0x6e, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x74, 0x61, 0x6c, 0x6e, 0x65, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x54, 0x61, 0x6c, - 0x6e, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0f, 0x0a, 0x0b, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, - 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, - 0x67, 0x46, 0x75, 0x10, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x64, 0x72, 0x61, 0x77, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2a, + 0x2f, 0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x48, + 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4e, 0x69, 0x6c, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, + 0x48, 0x65, 0x72, 0x6f, 0x54, 0x79, 0x70, 0x65, 0x4b, 0x6f, 0x6e, 0x67, 0x46, 0x75, 0x10, 0x01, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -749,35 +665,32 @@ func file_hero_hero_db_proto_rawDescGZIP() []byte { } var file_hero_hero_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_hero_hero_db_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_hero_hero_db_proto_goTypes = []interface{}{ (HeroType)(0), // 0: HeroType (*SkillData)(nil), // 1: SkillData (*DBHero)(nil), // 2: DBHero (*Floor)(nil), // 3: Floor (*DBHeroRecord)(nil), // 4: DBHeroRecord - (*HeroTalent)(nil), // 5: HeroTalent - nil, // 6: DBHero.PropertyEntry - nil, // 7: DBHero.AddPropertyEntry - nil, // 8: DBHero.EnergyEntry - nil, // 9: DBHero.EnergyPropertyEntry - nil, // 10: DBHero.JuexPropertyEntry - nil, // 11: HeroTalent.TalnetEntry + nil, // 5: DBHero.PropertyEntry + nil, // 6: DBHero.AddPropertyEntry + nil, // 7: DBHero.EnergyEntry + nil, // 8: DBHero.EnergyPropertyEntry + nil, // 9: DBHero.JuexPropertyEntry } var file_hero_hero_db_proto_depIdxs = []int32{ - 1, // 0: DBHero.normalSkill:type_name -> SkillData - 6, // 1: DBHero.property:type_name -> DBHero.PropertyEntry - 7, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry - 8, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry - 9, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry - 10, // 5: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry - 0, // 6: DBHero.status:type_name -> HeroType - 11, // 7: HeroTalent.talnet:type_name -> HeroTalent.TalnetEntry - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 1, // 0: DBHero.normalSkill:type_name -> SkillData + 5, // 1: DBHero.property:type_name -> DBHero.PropertyEntry + 6, // 2: DBHero.addProperty:type_name -> DBHero.AddPropertyEntry + 7, // 3: DBHero.energy:type_name -> DBHero.EnergyEntry + 8, // 4: DBHero.energyProperty:type_name -> DBHero.EnergyPropertyEntry + 9, // 5: DBHero.juexProperty:type_name -> DBHero.JuexPropertyEntry + 0, // 6: DBHero.status:type_name -> HeroType + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_hero_hero_db_proto_init() } @@ -834,18 +747,6 @@ func file_hero_hero_db_proto_init() { return nil } } - file_hero_hero_db_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroTalent); 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{ @@ -853,7 +754,7 @@ func file_hero_hero_db_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_db_proto_rawDesc, NumEnums: 1, - NumMessages: 11, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/pb/hero_msg.pb.go b/pb/hero_msg.pb.go index 10b947754..5e5020d09 100644 --- a/pb/hero_msg.pb.go +++ b/pb/hero_msg.pb.go @@ -1805,195 +1805,6 @@ func (x *HeroFusionResp) GetHeroid() string { return "" } -// 天赋学习 -type HeroTalentListReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *HeroTalentListReq) Reset() { - *x = HeroTalentListReq{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroTalentListReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroTalentListReq) ProtoMessage() {} - -func (x *HeroTalentListReq) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[34] - 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 HeroTalentListReq.ProtoReflect.Descriptor instead. -func (*HeroTalentListReq) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{34} -} - -type HeroTalentListResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Telnet []*HeroTalent `protobuf:"bytes,1,rep,name=telnet,proto3" json:"telnet"` -} - -func (x *HeroTalentListResp) Reset() { - *x = HeroTalentListResp{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroTalentListResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroTalentListResp) ProtoMessage() {} - -func (x *HeroTalentListResp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[35] - 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 HeroTalentListResp.ProtoReflect.Descriptor instead. -func (*HeroTalentListResp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{35} -} - -func (x *HeroTalentListResp) GetTelnet() []*HeroTalent { - if x != nil { - return x.Telnet - } - return nil -} - -// 天赋学习 -type HeroTalentLearnReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - TalentID int32 `protobuf:"varint,1,opt,name=talentID,proto3" json:"talentID"` // 天赋ID - Heroid string `protobuf:"bytes,2,opt,name=heroid,proto3" json:"heroid"` // 英雄id -} - -func (x *HeroTalentLearnReq) Reset() { - *x = HeroTalentLearnReq{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroTalentLearnReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroTalentLearnReq) ProtoMessage() {} - -func (x *HeroTalentLearnReq) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[36] - 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 HeroTalentLearnReq.ProtoReflect.Descriptor instead. -func (*HeroTalentLearnReq) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{36} -} - -func (x *HeroTalentLearnReq) GetTalentID() int32 { - if x != nil { - return x.TalentID - } - return 0 -} - -func (x *HeroTalentLearnReq) GetHeroid() string { - if x != nil { - return x.Heroid - } - return "" -} - -type HeroTalentLearnResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Telnet *HeroTalent `protobuf:"bytes,1,opt,name=telnet,proto3" json:"telnet"` -} - -func (x *HeroTalentLearnResp) Reset() { - *x = HeroTalentLearnResp{} - if protoimpl.UnsafeEnabled { - mi := &file_hero_hero_msg_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *HeroTalentLearnResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeroTalentLearnResp) ProtoMessage() {} - -func (x *HeroTalentLearnResp) ProtoReflect() protoreflect.Message { - mi := &file_hero_hero_msg_proto_msgTypes[37] - 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 HeroTalentLearnResp.ProtoReflect.Descriptor instead. -func (*HeroTalentLearnResp) Descriptor() ([]byte, []int) { - return file_hero_hero_msg_proto_rawDescGZIP(), []int{37} -} - -func (x *HeroTalentLearnResp) GetTelnet() *HeroTalent { - if x != nil { - return x.Telnet - } - return nil -} - var File_hero_hero_msg_proto protoreflect.FileDescriptor var file_hero_hero_msg_proto_rawDesc = []byte{ @@ -2157,21 +1968,8 @@ var file_hero_hero_msg_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x28, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x46, 0x75, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x22, 0x13, 0x0a, 0x11, 0x48, 0x65, - 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, - 0x39, 0x0a, 0x12, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, - 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x22, 0x48, 0x0a, 0x12, 0x48, 0x65, - 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x52, 0x65, 0x71, - 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x05, 0x52, 0x08, 0x74, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, - 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, - 0x72, 0x6f, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x13, 0x48, 0x65, 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, - 0x6e, 0x74, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x23, 0x0a, 0x06, 0x74, - 0x65, 0x6c, 0x6e, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x48, 0x65, - 0x72, 0x6f, 0x54, 0x61, 0x6c, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x74, 0x65, 0x6c, 0x6e, 0x65, 0x74, - 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x69, 0x64, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, + 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2186,7 +1984,7 @@ func file_hero_hero_msg_proto_rawDescGZIP() []byte { return file_hero_hero_msg_proto_rawDescData } -var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_hero_hero_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 37) var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroInfoReq)(nil), // 0: HeroInfoReq (*HeroInfoResp)(nil), // 1: HeroInfoResp @@ -2222,44 +2020,37 @@ var file_hero_hero_msg_proto_goTypes = []interface{}{ (*HeroDrawCardFloorResp)(nil), // 31: HeroDrawCardFloorResp (*HeroFusionReq)(nil), // 32: HeroFusionReq (*HeroFusionResp)(nil), // 33: HeroFusionResp - (*HeroTalentListReq)(nil), // 34: HeroTalentListReq - (*HeroTalentListResp)(nil), // 35: HeroTalentListResp - (*HeroTalentLearnReq)(nil), // 36: HeroTalentLearnReq - (*HeroTalentLearnResp)(nil), // 37: HeroTalentLearnResp - nil, // 38: HeroPropertyPush.PropertyEntry - nil, // 39: HeroPropertyPush.AddPropertyEntry - nil, // 40: HeroFusionReq.HerosEntry - (*DBHero)(nil), // 41: DBHero - (*HeroTalent)(nil), // 42: HeroTalent + nil, // 34: HeroPropertyPush.PropertyEntry + nil, // 35: HeroPropertyPush.AddPropertyEntry + nil, // 36: HeroFusionReq.HerosEntry + (*DBHero)(nil), // 37: DBHero } var file_hero_hero_msg_proto_depIdxs = []int32{ - 41, // 0: HeroInfoResp.base:type_name -> DBHero - 41, // 1: HeroListResp.list:type_name -> DBHero + 37, // 0: HeroInfoResp.base:type_name -> DBHero + 37, // 1: HeroListResp.list:type_name -> DBHero 5, // 2: HeroStrengthenUplvReq.expCards:type_name -> MapStringInt32 - 41, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero + 37, // 3: HeroStrengthenUplvResp.hero:type_name -> DBHero 8, // 4: HeroStrengthenUpStarReq.hero:type_name -> CostCardData 8, // 5: HeroStrengthenUpStarReq.heroRace:type_name -> CostCardData - 41, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero - 41, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero - 41, // 8: HeroResonanceResp.hero:type_name -> DBHero - 41, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero - 41, // 10: HeroResonanceResetResp.hero:type_name -> DBHero + 37, // 6: HeroStrengthenUpStarResp.hero:type_name -> DBHero + 37, // 7: HeroStrengthenUpSkillResp.hero:type_name -> DBHero + 37, // 8: HeroResonanceResp.hero:type_name -> DBHero + 37, // 9: HeroResonanceResp.upStarCard:type_name -> DBHero + 37, // 10: HeroResonanceResetResp.hero:type_name -> DBHero 17, // 11: HeroResonanceUseEnergyReq.energy:type_name -> EnergyData - 41, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero - 41, // 13: HeroAwakenResp.hero:type_name -> DBHero - 38, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry - 39, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry - 41, // 16: HeroLockResp.hero:type_name -> DBHero - 41, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero - 41, // 18: HeroChangePush.list:type_name -> DBHero - 40, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry - 42, // 20: HeroTalentListResp.telnet:type_name -> HeroTalent - 42, // 21: HeroTalentLearnResp.telnet:type_name -> HeroTalent - 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 - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 37, // 12: HeroResonanceUseEnergyResp.hero:type_name -> DBHero + 37, // 13: HeroAwakenResp.hero:type_name -> DBHero + 34, // 14: HeroPropertyPush.property:type_name -> HeroPropertyPush.PropertyEntry + 35, // 15: HeroPropertyPush.addProperty:type_name -> HeroPropertyPush.AddPropertyEntry + 37, // 16: HeroLockResp.hero:type_name -> DBHero + 37, // 17: HeroGetSpecifiedResp.hero:type_name -> DBHero + 37, // 18: HeroChangePush.list:type_name -> DBHero + 36, // 19: HeroFusionReq.heros:type_name -> HeroFusionReq.HerosEntry + 20, // [20:20] is the sub-list for method output_type + 20, // [20:20] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_hero_hero_msg_proto_init() } @@ -2677,54 +2468,6 @@ func file_hero_hero_msg_proto_init() { return nil } } - file_hero_hero_msg_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroTalentListReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hero_hero_msg_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroTalentListResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hero_hero_msg_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroTalentLearnReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_hero_hero_msg_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeroTalentLearnResp); 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{ @@ -2732,7 +2475,7 @@ func file_hero_hero_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_hero_hero_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 41, + NumMessages: 37, NumExtensions: 0, NumServices: 0, }, diff --git a/sys/configure/structs/game.globalData.go b/sys/configure/structs/game.globalData.go index dc5962670..14cbea4c5 100644 --- a/sys/configure/structs/game.globalData.go +++ b/sys/configure/structs/game.globalData.go @@ -104,6 +104,11 @@ type GameGlobalData struct { GuildDissolutionCountDownCd int32 GuildDissolutionCd int32 GuildBuildCd int32 + ArenaTicketMax int32 + ArenaTicketRecoveryTime int32 + ArenaTicketPurchaseRrestrictions int32 + ArenaInitiaIntegral int32 + ArenaRecordMax int32 } const TypeId_GameGlobalData = 477542761 @@ -349,6 +354,11 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_DissolutionCountDown_cd"].(float64); !_ok_ { err = errors.New("guild_DissolutionCountDown_cd error"); return }; _v.GuildDissolutionCountDownCd = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_dissolution_cd"].(float64); !_ok_ { err = errors.New("guild_dissolution_cd error"); return }; _v.GuildDissolutionCd = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["guild_BuildCd"].(float64); !_ok_ { err = errors.New("guild_BuildCd error"); return }; _v.GuildBuildCd = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_max"].(float64); !_ok_ { err = errors.New("ArenaTicket_max error"); return }; _v.ArenaTicketMax = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_RecoveryTime"].(float64); !_ok_ { err = errors.New("ArenaTicket_RecoveryTime error"); return }; _v.ArenaTicketRecoveryTime = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_PurchaseRrestrictions"].(float64); !_ok_ { err = errors.New("ArenaTicket_PurchaseRrestrictions error"); return }; _v.ArenaTicketPurchaseRrestrictions = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["arena_InitiaIntegral"].(float64); !_ok_ { err = errors.New("arena_InitiaIntegral error"); return }; _v.ArenaInitiaIntegral = int32(_tempNum_) } + { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["arena_RecordMax"].(float64); !_ok_ { err = errors.New("arena_RecordMax error"); return }; _v.ArenaRecordMax = int32(_tempNum_) } return }