From 2027cc318419b1631717fea3c3a938dbac9012cc Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Mon, 24 Oct 2022 13:42:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 2 + modules/arena/api_challenge.go | 35 ++++ modules/arena/api_matche.go | 28 ++- modules/arena/modelarena.go | 2 +- modules/arena/module.go | 1 + modules/battle/modelBattle.go | 6 + modules/battle/module.go | 22 +++ pb/arena_db.pb.go | 77 ++++---- pb/battle_msg.pb.go | 323 ++++++++++++++++++++++++++------- 9 files changed, 391 insertions(+), 105 deletions(-) diff --git a/comm/imodule.go b/comm/imodule.go index 2d31667e2..eaa5d9e86 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -169,6 +169,8 @@ type ( CreatePveBattle(session IUserSession, req *pb.BattlePVEReq) (code pb.ErrorCode, record *pb.DBBattleRecord) ///创建pvb战斗 CreatePvbBattle(session IUserSession, req *pb.BattlePVEReq) (code pb.ErrorCode, record *pb.DBBattleRecord) + ///创建pvp战斗 + CreatePvpBattle(session IUserSession, req *pb.BattlePVPReq) (code pb.ErrorCode, record *pb.DBBattleRecord) //校验战报 CheckBattleReport(session IUserSession, report *pb.BattleReport) (code pb.ErrorCode, iswin bool) } diff --git a/modules/arena/api_challenge.go b/modules/arena/api_challenge.go index 05d8b10e2..39b6f3e9a 100644 --- a/modules/arena/api_challenge.go +++ b/modules/arena/api_challenge.go @@ -2,6 +2,7 @@ package arena import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -15,6 +16,40 @@ func (this *apiComp) ChallengeCheck(session comm.IUserSession, req *pb.ArenaChal ///挑战 func (this *apiComp) Challenge(session comm.IUserSession, req *pb.ArenaChallengeReq) (code pb.ErrorCode, data proto.Message) { + var ( + red *pb.DBArenaUser + bule *pb.DBArenaUser + record *pb.DBBattleRecord + cd pb.ErrorCode + err error + ) + defer func() { + session.SendMsg(string(this.module.GetType()), "challenge", &pb.ArenaChallengeResp{Code: cd, Info: &pb.BattleInfo{ + Id: record.Id, + Title: record.Title, + Btype: record.Btype, + Ptype: record.Ptype, + RedCompId: record.RedCompId, + Redflist: record.Redflist, + BlueCompId: record.BlueCompId, + Buleflist: record.Buleflist, + }}) + }() + 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 { + cd = pb.ErrorCode_DBError + return + } + if bule, err = this.module.modelArena.queryPlayerInfo(req.Playerid); err != nil && err != mgo.MongodbNil { + cd = pb.ErrorCode_DBError + return + } + cd, record = this.module.battle.CreatePvpBattle(session, &pb.BattlePVPReq{ + Redformat: &pb.PVPFormation{Uid: red.Uid, Leadpos: red.Attack.Leadpos, Format: red.Defend.Formt}, + Buleformat: &pb.PVPFormation{Uid: bule.Uid, Leadpos: bule.Attack.Leadpos, Format: bule.Defend.Formt}, + }) return } diff --git a/modules/arena/api_matche.go b/modules/arena/api_matche.go index 314fa5ce5..a8befe922 100644 --- a/modules/arena/api_matche.go +++ b/modules/arena/api_matche.go @@ -2,6 +2,7 @@ package arena import ( "go_dreamfactory/comm" + "go_dreamfactory/lego/sys/mgo" "go_dreamfactory/pb" "google.golang.org/protobuf/proto" @@ -16,11 +17,36 @@ 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 ( - // err error + players []*pb.DBArenaUser + ai []*pb.DBArenaUser + mplayers []*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 { + code = pb.ErrorCode_DBError + return + } + if len(players) < 5 { + num := 5 - len(players) + if ai, err = this.module.modelArena.matcheAI(req.Minintegral, req.Maxintegral, 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}) return } diff --git a/modules/arena/modelarena.go b/modules/arena/modelarena.go index 89398fbdf..67038cf41 100644 --- a/modules/arena/modelarena.go +++ b/modules/arena/modelarena.go @@ -84,7 +84,7 @@ func (this *modelArena) updateArenaUserInfo(info *pb.DBArenaUser) (err error) { // } //匹配机器人 -func (this *modelArena) matcheAI() (results []*pb.DBArenaUser, err error) { +func (this *modelArena) matcheAI(min, max, num int32) (results []*pb.DBArenaUser, err error) { return } diff --git a/modules/arena/module.go b/modules/arena/module.go index 122413414..f9700b599 100644 --- a/modules/arena/module.go +++ b/modules/arena/module.go @@ -18,6 +18,7 @@ func NewModule() core.IModule { type Arena struct { modules.ModuleBase + battle comm.IBattle api *apiComp modelArena *modelArena } diff --git a/modules/battle/modelBattle.go b/modules/battle/modelBattle.go index fae41d389..77a2fd707 100644 --- a/modules/battle/modelBattle.go +++ b/modules/battle/modelBattle.go @@ -220,3 +220,9 @@ func (this *modelBattleComp) createBattleRole(hero *pb.DBHero, tid, pos int) (ro } return } + +//创建pvp 战斗请求 +func (this *modelBattleComp) createpvp(session comm.IUserSession, conn *db.DBConn, btype pb.BattleType, req *pb.BattlePVPReq) (record *pb.DBBattleRecord, code pb.ErrorCode) { + + return +} diff --git a/modules/battle/module.go b/modules/battle/module.go index 1ae466621..e46b3c4df 100644 --- a/modules/battle/module.go +++ b/modules/battle/module.go @@ -128,6 +128,28 @@ func (this *Battle) CreatePvbBattle(session comm.IUserSession, req *pb.BattlePVE return } +//创建pve战斗 +func (this *Battle) CreatePvpBattle(session comm.IUserSession, req *pb.BattlePVPReq) (code pb.ErrorCode, record *pb.DBBattleRecord) { + var ( + conn *db.DBConn + err error + ) + if !this.IsCross() { + conn, err = db.Local() + } else { + conn, err = db.ServerDBConn(session.GetServiecTag()) + } + if err != nil { + code = pb.ErrorCode_DBError + this.Errorf("session:%v err:", session, err) + return + } + if record, code = this.modelBattle.createpvp(session, conn, pb.BattleType_pve, req); code != pb.ErrorCode_Success { + return + } + return +} + //校验战报是否成功 func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.BattleReport) (code pb.ErrorCode, iswin bool) { diff --git a/pb/arena_db.pb.go b/pb/arena_db.pb.go index 76c612895..123a74aec 100644 --- a/pb/arena_db.pb.go +++ b/pb/arena_db.pb.go @@ -84,8 +84,8 @@ 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 string `protobuf:"bytes,3,opt,name=Integral,proto3" json:"Integral"` - Attack *DBPlayerBattleFormt `protobuf:"bytes,4,opt,name=attack,proto3" json:"attack"` //进攻阵型 + Integral int32 `protobuf:"varint,3,opt,name=Integral,proto3" json:"Integral"` + Defend *DBPlayerBattleFormt `protobuf:"bytes,4,opt,name=defend,proto3" json:"defend"` //防守 } func (x *ArenaPlayer) Reset() { @@ -134,16 +134,16 @@ func (x *ArenaPlayer) GetName() string { return "" } -func (x *ArenaPlayer) GetIntegral() string { +func (x *ArenaPlayer) GetIntegral() int32 { if x != nil { return x.Integral } - return "" + return 0 } -func (x *ArenaPlayer) GetAttack() *DBPlayerBattleFormt { +func (x *ArenaPlayer) GetDefend() *DBPlayerBattleFormt { if x != nil { - return x.Attack + return x.Defend } return nil } @@ -243,13 +243,14 @@ type DBArenaUser struct { unknownFields protoimpl.UnknownFields Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id - Integral int32 `protobuf:"varint,2,opt,name=integral,proto3" json:"integral"` //积分 - Attack *DBPlayerBattleFormt `protobuf:"bytes,3,opt,name=attack,proto3" json:"attack"` //进攻阵型 - Defend *DBPlayerBattleFormt `protobuf:"bytes,4,opt,name=defend,proto3" json:"defend"` //防守阵型 - Streak int32 `protobuf:"varint,5,opt,name=streak,proto3" json:"streak"` //连胜 - Attackrate int32 `protobuf:"varint,6,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率 - Defendrate int32 `protobuf:"varint,7,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率 - Rank int32 `protobuf:"varint,8,opt,name=rank,proto3" json:"rank"` //排名 + 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"` //排名 } func (x *DBArenaUser) Reset() { @@ -291,6 +292,13 @@ func (x *DBArenaUser) GetUid() string { return "" } +func (x *DBArenaUser) GetName() string { + if x != nil { + return x.Name + } + return "" +} + func (x *DBArenaUser) GetIntegral() int32 { if x != nil { return x.Integral @@ -355,10 +363,10 @@ var file_arena_arena_db_proto_rawDesc = []byte{ 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, - 0x09, 0x52, 0x08, 0x49, 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, + 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, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x22, 0xa5, 0x01, 0x0a, 0x13, 0x44, 0x42, + 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, @@ -369,24 +377,25 @@ var file_arena_arena_db_proto_rawDesc = []byte{ 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, 0x83, 0x02, 0x0a, 0x0b, 0x44, 0x42, 0x41, 0x72, 0x65, 0x6e, 0x61, 0x55, 0x73, 0x65, + 0x65, 0x22, 0x97, 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, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x18, - 0x02, 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, 0x03, 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, 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, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x05, 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, 0x06, 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, 0x07, 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, 0x08, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, + 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -411,7 +420,7 @@ var file_arena_arena_db_proto_goTypes = []interface{}{ } var file_arena_arena_db_proto_depIdxs = []int32{ 4, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero - 0, // 1: ArenaPlayer.attack:type_name -> DBPlayerBattleFormt + 0, // 1: ArenaPlayer.defend:type_name -> DBPlayerBattleFormt 0, // 2: DBArenaUser.attack:type_name -> DBPlayerBattleFormt 0, // 3: DBArenaUser.defend:type_name -> DBPlayerBattleFormt 4, // [4:4] is the sub-list for method output_type diff --git a/pb/battle_msg.pb.go b/pb/battle_msg.pb.go index c27006fdb..4538a2cf7 100644 --- a/pb/battle_msg.pb.go +++ b/pb/battle_msg.pb.go @@ -219,6 +219,142 @@ func (x *BattlePVEReq) GetMformat() []int32 { return nil } +//战斗布阵请求 +type PVPFormation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id + Leadpos int32 `protobuf:"varint,2,opt,name=leadpos,proto3" json:"leadpos"` //队长位置 + Format []*DBHero `protobuf:"bytes,3,rep,name=format,proto3" json:"format"` //自己英雄阵容信息 0-5 +} + +func (x *PVPFormation) Reset() { + *x = PVPFormation{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_msg_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PVPFormation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PVPFormation) ProtoMessage() {} + +func (x *PVPFormation) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_msg_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 PVPFormation.ProtoReflect.Descriptor instead. +func (*PVPFormation) Descriptor() ([]byte, []int) { + return file_battle_battle_msg_proto_rawDescGZIP(), []int{3} +} + +func (x *PVPFormation) GetUid() string { + if x != nil { + return x.Uid + } + return "" +} + +func (x *PVPFormation) GetLeadpos() int32 { + if x != nil { + return x.Leadpos + } + return 0 +} + +func (x *PVPFormation) GetFormat() []*DBHero { + if x != nil { + return x.Format + } + return nil +} + +// pve 战斗创建请求 (此请求 为服务端间使用 客户端可忽略) +type BattlePVPReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Ptype PlayType `protobuf:"varint,1,opt,name=ptype,proto3,enum=PlayType" json:"ptype"` //玩法类型 + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title"` //战斗标题 + Redformat *PVPFormation `protobuf:"bytes,4,opt,name=redformat,proto3" json:"redformat"` //布阵信息 + Buleformat *PVPFormation `protobuf:"bytes,5,opt,name=buleformat,proto3" json:"buleformat"` //布阵信息 +} + +func (x *BattlePVPReq) Reset() { + *x = BattlePVPReq{} + if protoimpl.UnsafeEnabled { + mi := &file_battle_battle_msg_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BattlePVPReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BattlePVPReq) ProtoMessage() {} + +func (x *BattlePVPReq) ProtoReflect() protoreflect.Message { + mi := &file_battle_battle_msg_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 BattlePVPReq.ProtoReflect.Descriptor instead. +func (*BattlePVPReq) Descriptor() ([]byte, []int) { + return file_battle_battle_msg_proto_rawDescGZIP(), []int{4} +} + +func (x *BattlePVPReq) GetPtype() PlayType { + if x != nil { + return x.Ptype + } + return PlayType_null +} + +func (x *BattlePVPReq) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *BattlePVPReq) GetRedformat() *PVPFormation { + if x != nil { + return x.Redformat + } + return nil +} + +func (x *BattlePVPReq) GetBuleformat() *PVPFormation { + if x != nil { + return x.Buleformat + } + return nil +} + //战斗开始推送 type BattleInfo struct { state protoimpl.MessageState @@ -238,7 +374,7 @@ type BattleInfo struct { func (x *BattleInfo) Reset() { *x = BattleInfo{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[3] + mi := &file_battle_battle_msg_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -251,7 +387,7 @@ func (x *BattleInfo) String() string { func (*BattleInfo) ProtoMessage() {} func (x *BattleInfo) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[3] + mi := &file_battle_battle_msg_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -264,7 +400,7 @@ func (x *BattleInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleInfo.ProtoReflect.Descriptor instead. func (*BattleInfo) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{3} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{5} } func (x *BattleInfo) GetId() string { @@ -336,7 +472,7 @@ type BattleReport struct { func (x *BattleReport) Reset() { *x = BattleReport{} if protoimpl.UnsafeEnabled { - mi := &file_battle_battle_msg_proto_msgTypes[4] + mi := &file_battle_battle_msg_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -349,7 +485,7 @@ func (x *BattleReport) String() string { func (*BattleReport) ProtoMessage() {} func (x *BattleReport) ProtoReflect() protoreflect.Message { - mi := &file_battle_battle_msg_proto_msgTypes[4] + mi := &file_battle_battle_msg_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -362,7 +498,7 @@ func (x *BattleReport) ProtoReflect() protoreflect.Message { // Deprecated: Use BattleReport.ProtoReflect.Descriptor instead. func (*BattleReport) Descriptor() ([]byte, []int) { - return file_battle_battle_msg_proto_rawDescGZIP(), []int{4} + return file_battle_battle_msg_proto_rawDescGZIP(), []int{6} } func (x *BattleReport) GetInfo() *BattleInfo { @@ -385,49 +521,66 @@ var file_battle_battle_msg_proto_rawDesc = []byte{ 0x0a, 0x17, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x2f, 0x62, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x3e, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x63, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, - 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, - 0x76, 0x22, 0x67, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x16, - 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, - 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, - 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6d, - 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, - 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, - 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, - 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, - 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, - 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, - 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, - 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, - 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, - 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, - 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, - 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74, - 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x12, + 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x67, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, + 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x89, + 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x52, 0x65, 0x71, 0x12, + 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, + 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5b, 0x0a, 0x0c, 0x50, 0x56, + 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, + 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52, + 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, + 0x6c, 0x65, 0x50, 0x56, 0x50, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, + 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, + 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0a, + 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x0a, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, + 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, + 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, + 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, + 0x74, 0x52, 0x09, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0c, + 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, + 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, + 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -442,30 +595,37 @@ func file_battle_battle_msg_proto_rawDescGZIP() []byte { return file_battle_battle_msg_proto_rawDescData } -var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_battle_battle_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_battle_battle_msg_proto_goTypes = []interface{}{ (*LineUp)(nil), // 0: LineUp (*BattleFormation)(nil), // 1: BattleFormation (*BattlePVEReq)(nil), // 2: BattlePVEReq - (*BattleInfo)(nil), // 3: BattleInfo - (*BattleReport)(nil), // 4: BattleReport - (PlayType)(0), // 5: PlayType - (BattleType)(0), // 6: BattleType - (*DBBattleFormt)(nil), // 7: DBBattleFormt + (*PVPFormation)(nil), // 3: PVPFormation + (*BattlePVPReq)(nil), // 4: BattlePVPReq + (*BattleInfo)(nil), // 5: BattleInfo + (*BattleReport)(nil), // 6: BattleReport + (PlayType)(0), // 7: PlayType + (*DBHero)(nil), // 8: DBHero + (BattleType)(0), // 9: BattleType + (*DBBattleFormt)(nil), // 10: DBBattleFormt } var file_battle_battle_msg_proto_depIdxs = []int32{ - 5, // 0: BattlePVEReq.ptype:type_name -> PlayType - 1, // 1: BattlePVEReq.format:type_name -> BattleFormation - 6, // 2: BattleInfo.btype:type_name -> BattleType - 5, // 3: BattleInfo.ptype:type_name -> PlayType - 7, // 4: BattleInfo.redflist:type_name -> DBBattleFormt - 7, // 5: BattleInfo.buleflist:type_name -> DBBattleFormt - 3, // 6: BattleReport.info:type_name -> BattleInfo - 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 + 7, // 0: BattlePVEReq.ptype:type_name -> PlayType + 1, // 1: BattlePVEReq.format:type_name -> BattleFormation + 8, // 2: PVPFormation.format:type_name -> DBHero + 7, // 3: BattlePVPReq.ptype:type_name -> PlayType + 3, // 4: BattlePVPReq.redformat:type_name -> PVPFormation + 3, // 5: BattlePVPReq.buleformat:type_name -> PVPFormation + 9, // 6: BattleInfo.btype:type_name -> BattleType + 7, // 7: BattleInfo.ptype:type_name -> PlayType + 10, // 8: BattleInfo.redflist:type_name -> DBBattleFormt + 10, // 9: BattleInfo.buleflist:type_name -> DBBattleFormt + 5, // 10: BattleReport.info:type_name -> BattleInfo + 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_battle_battle_msg_proto_init() } @@ -474,6 +634,7 @@ func file_battle_battle_msg_proto_init() { return } file_battle_battle_db_proto_init() + file_hero_hero_db_proto_init() if !protoimpl.UnsafeEnabled { file_battle_battle_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*LineUp); i { @@ -512,7 +673,7 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BattleInfo); i { + switch v := v.(*PVPFormation); i { case 0: return &v.state case 1: @@ -524,6 +685,30 @@ func file_battle_battle_msg_proto_init() { } } file_battle_battle_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BattlePVPReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_battle_battle_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BattleInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_battle_battle_msg_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BattleReport); i { case 0: return &v.state @@ -542,7 +727,7 @@ func file_battle_battle_msg_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_battle_battle_msg_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, },