上传竞技场系统

This commit is contained in:
liwei1dao 2022-10-24 13:42:29 +08:00
parent 88d0b5519f
commit 2027cc3184
9 changed files with 391 additions and 105 deletions

View File

@ -169,6 +169,8 @@ type (
CreatePveBattle(session IUserSession, req *pb.BattlePVEReq) (code pb.ErrorCode, record *pb.DBBattleRecord) CreatePveBattle(session IUserSession, req *pb.BattlePVEReq) (code pb.ErrorCode, record *pb.DBBattleRecord)
///创建pvb战斗 ///创建pvb战斗
CreatePvbBattle(session IUserSession, req *pb.BattlePVEReq) (code pb.ErrorCode, record *pb.DBBattleRecord) 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) CheckBattleReport(session IUserSession, report *pb.BattleReport) (code pb.ErrorCode, iswin bool)
} }

View File

@ -2,6 +2,7 @@ package arena
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"google.golang.org/protobuf/proto" "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) { 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 return
} }

View File

@ -2,6 +2,7 @@ package arena
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/mgo"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"google.golang.org/protobuf/proto" "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) { func (this *apiComp) Matche(session comm.IUserSession, req *pb.ArenaMatcheReq) (code pb.ErrorCode, data proto.Message) {
var ( var (
// err error players []*pb.DBArenaUser
ai []*pb.DBArenaUser
mplayers []*pb.ArenaPlayer
err error
) )
if code = this.MatcheCheck(session, req); code != pb.ErrorCode_Success { if code = this.MatcheCheck(session, req); code != pb.ErrorCode_Success {
return 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 return
} }

View File

@ -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 return
} }

View File

@ -18,6 +18,7 @@ func NewModule() core.IModule {
type Arena struct { type Arena struct {
modules.ModuleBase modules.ModuleBase
battle comm.IBattle
api *apiComp api *apiComp
modelArena *modelArena modelArena *modelArena
} }

View File

@ -220,3 +220,9 @@ func (this *modelBattleComp) createBattleRole(hero *pb.DBHero, tid, pos int) (ro
} }
return 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
}

View File

@ -128,6 +128,28 @@ func (this *Battle) CreatePvbBattle(session comm.IUserSession, req *pb.BattlePVE
return 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) { func (this *Battle) CheckBattleReport(session comm.IUserSession, report *pb.BattleReport) (code pb.ErrorCode, iswin bool) {

View File

@ -84,8 +84,8 @@ type ArenaPlayer struct {
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
Integral string `protobuf:"bytes,3,opt,name=Integral,proto3" json:"Integral"` 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,4,opt,name=defend,proto3" json:"defend"` //防守
} }
func (x *ArenaPlayer) Reset() { func (x *ArenaPlayer) Reset() {
@ -134,16 +134,16 @@ func (x *ArenaPlayer) GetName() string {
return "" return ""
} }
func (x *ArenaPlayer) GetIntegral() string { func (x *ArenaPlayer) GetIntegral() int32 {
if x != nil { if x != nil {
return x.Integral return x.Integral
} }
return "" return 0
} }
func (x *ArenaPlayer) GetAttack() *DBPlayerBattleFormt { func (x *ArenaPlayer) GetDefend() *DBPlayerBattleFormt {
if x != nil { if x != nil {
return x.Attack return x.Defend
} }
return nil return nil
} }
@ -243,13 +243,14 @@ type DBArenaUser struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id Uid string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"` //用户id
Integral int32 `protobuf:"varint,2,opt,name=integral,proto3" json:"integral"` //积分 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"` //玩家名称
Attack *DBPlayerBattleFormt `protobuf:"bytes,3,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"` //防守阵型 Attack *DBPlayerBattleFormt `protobuf:"bytes,4,opt,name=attack,proto3" json:"attack"` //进攻阵型
Streak int32 `protobuf:"varint,5,opt,name=streak,proto3" json:"streak"` //连胜 Defend *DBPlayerBattleFormt `protobuf:"bytes,5,opt,name=defend,proto3" json:"defend"` //防守阵型
Attackrate int32 `protobuf:"varint,6,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率 Streak int32 `protobuf:"varint,6,opt,name=streak,proto3" json:"streak"` //连胜
Defendrate int32 `protobuf:"varint,7,opt,name=defendrate,proto3" json:"defendrate"` //防守胜率 Attackrate int32 `protobuf:"varint,7,opt,name=attackrate,proto3" json:"attackrate"` //进攻胜率
Rank int32 `protobuf:"varint,8,opt,name=rank,proto3" json:"rank"` //排名 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() { func (x *DBArenaUser) Reset() {
@ -291,6 +292,13 @@ func (x *DBArenaUser) GetUid() string {
return "" return ""
} }
func (x *DBArenaUser) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *DBArenaUser) GetIntegral() int32 { func (x *DBArenaUser) GetIntegral() int32 {
if x != nil { if x != nil {
return x.Integral 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, 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, 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, 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, 0x05, 0x52, 0x08, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x06, 0x64,
0x74, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 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, 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, 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, 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, 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, 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, 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, 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, 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, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x12, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67,
0x2c, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x72, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x67,
0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x04, 0x20,
0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x2c, 0x0a, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61,
0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63,
0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x6b, 0x12, 0x2c, 0x0a, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
0x72, 0x6d, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x0b, 0x32, 0x14, 0x2e, 0x44, 0x42, 0x50, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0x61, 0x74, 0x74,
0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x72, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x06, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x12,
0x65, 0x61, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x72, 0x61, 0x74, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52,
0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6b, 0x72, 0x06, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x61, 0x63,
0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x72, 0x61, 0x74, 0x6b, 0x72, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x61, 0x74, 0x74,
0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x65, 0x6e, 0x64, 0x72, 0x61, 0x63, 0x6b, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x65, 0x6e,
0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x64, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x64, 0x65, 0x66,
0x05, 0x52, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x65, 0x6e, 0x64, 0x72, 0x61, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x6e, 0x6b, 0x18,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -411,7 +420,7 @@ var file_arena_arena_db_proto_goTypes = []interface{}{
} }
var file_arena_arena_db_proto_depIdxs = []int32{ var file_arena_arena_db_proto_depIdxs = []int32{
4, // 0: DBPlayerBattleFormt.formt:type_name -> DBHero 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, // 2: DBArenaUser.attack:type_name -> DBPlayerBattleFormt
0, // 3: DBArenaUser.defend:type_name -> DBPlayerBattleFormt 0, // 3: DBArenaUser.defend:type_name -> DBPlayerBattleFormt
4, // [4:4] is the sub-list for method output_type 4, // [4:4] is the sub-list for method output_type

View File

@ -219,6 +219,142 @@ func (x *BattlePVEReq) GetMformat() []int32 {
return nil 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 { type BattleInfo struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -238,7 +374,7 @@ type BattleInfo struct {
func (x *BattleInfo) Reset() { func (x *BattleInfo) Reset() {
*x = BattleInfo{} *x = BattleInfo{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -251,7 +387,7 @@ func (x *BattleInfo) String() string {
func (*BattleInfo) ProtoMessage() {} func (*BattleInfo) ProtoMessage() {}
func (x *BattleInfo) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -264,7 +400,7 @@ func (x *BattleInfo) ProtoReflect() protoreflect.Message {
// Deprecated: Use BattleInfo.ProtoReflect.Descriptor instead. // Deprecated: Use BattleInfo.ProtoReflect.Descriptor instead.
func (*BattleInfo) Descriptor() ([]byte, []int) { 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 { func (x *BattleInfo) GetId() string {
@ -336,7 +472,7 @@ type BattleReport struct {
func (x *BattleReport) Reset() { func (x *BattleReport) Reset() {
*x = BattleReport{} *x = BattleReport{}
if protoimpl.UnsafeEnabled { 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 := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -349,7 +485,7 @@ func (x *BattleReport) String() string {
func (*BattleReport) ProtoMessage() {} func (*BattleReport) ProtoMessage() {}
func (x *BattleReport) ProtoReflect() protoreflect.Message { 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 { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -362,7 +498,7 @@ func (x *BattleReport) ProtoReflect() protoreflect.Message {
// Deprecated: Use BattleReport.ProtoReflect.Descriptor instead. // Deprecated: Use BattleReport.ProtoReflect.Descriptor instead.
func (*BattleReport) Descriptor() ([]byte, []int) { 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 { 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, 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, 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, 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, 0x6f, 0x1a, 0x12, 0x68, 0x65, 0x72, 0x6f, 0x2f, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x64, 0x62, 0x2e,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3e, 0x0a, 0x06, 0x4c, 0x69, 0x6e, 0x65, 0x55, 0x70, 0x12,
0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x74, 0x61, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69,
0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x74, 0x61, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x76, 0x22, 0x67, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x04, 0x73, 0x74, 0x61, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x76, 0x18, 0x03, 0x20, 0x01, 0x28,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x05, 0x52, 0x02, 0x6c, 0x76, 0x22, 0x67, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46,
0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x16, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x65, 0x61, 0x64,
0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c, 0x65, 0x61, 0x64, 0x70,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x6f, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x03,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x66, 0x72, 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, 0x22, 0x89, 0x01, 0x0a, 0x0c, 0x42, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x52, 0x0c, 0x66, 0x72, 0x69, 0x65, 0x6e, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x89,
0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x50, 0x56, 0x45, 0x52, 0x65, 0x71, 0x12,
0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09,
0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65,
0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46,
0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x0a, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x03, 0x28,
0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5b, 0x0a, 0x0c, 0x50, 0x56,
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07,
0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x6c, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6c,
0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x65, 0x61, 0x64, 0x70, 0x6f, 0x73, 0x12, 0x1f, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
0x0a, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x07, 0x2e, 0x44, 0x42, 0x48, 0x65, 0x72, 0x6f, 0x52,
0x50, 0x6c, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0xa1, 0x01, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74,
0x1c, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x05, 0x20, 0x01, 0x6c, 0x65, 0x50, 0x56, 0x50, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x70, 0x74, 0x79, 0x70,
0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2a, 0x0a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x50, 0x6c, 0x61, 0x79, 0x54, 0x79,
0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x70, 0x65, 0x52, 0x05, 0x70, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74,
0x0e, 0x2e, 0x44, 0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12,
0x08, 0x72, 0x65, 0x64, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x6c, 0x75, 0x2b, 0x0a, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01,
0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
0x6c, 0x75, 0x65, 0x43, 0x6f, 0x6d, 0x70, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x09, 0x62, 0x75, 0x6c, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x64, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x2d, 0x0a, 0x0a,
0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x44, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
0x42, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x74, 0x52, 0x09, 0x62, 0x75, 0x32, 0x0d, 0x2e, 0x50, 0x56, 0x50, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
0x6c, 0x65, 0x66, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x4b, 0x0a, 0x0c, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x0a, 0x62, 0x75, 0x6c, 0x65, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x0a,
0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x1f, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x49, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69,
0x66, 0x6f, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x05, 0x62, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
0x74, 0x69, 0x6d, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x0b, 0x2e, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x62, 0x74,
0x6f, 0x74, 0x6f, 0x33, 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 ( var (
@ -442,30 +595,37 @@ func file_battle_battle_msg_proto_rawDescGZIP() []byte {
return file_battle_battle_msg_proto_rawDescData 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{}{ var file_battle_battle_msg_proto_goTypes = []interface{}{
(*LineUp)(nil), // 0: LineUp (*LineUp)(nil), // 0: LineUp
(*BattleFormation)(nil), // 1: BattleFormation (*BattleFormation)(nil), // 1: BattleFormation
(*BattlePVEReq)(nil), // 2: BattlePVEReq (*BattlePVEReq)(nil), // 2: BattlePVEReq
(*BattleInfo)(nil), // 3: BattleInfo (*PVPFormation)(nil), // 3: PVPFormation
(*BattleReport)(nil), // 4: BattleReport (*BattlePVPReq)(nil), // 4: BattlePVPReq
(PlayType)(0), // 5: PlayType (*BattleInfo)(nil), // 5: BattleInfo
(BattleType)(0), // 6: BattleType (*BattleReport)(nil), // 6: BattleReport
(*DBBattleFormt)(nil), // 7: DBBattleFormt (PlayType)(0), // 7: PlayType
(*DBHero)(nil), // 8: DBHero
(BattleType)(0), // 9: BattleType
(*DBBattleFormt)(nil), // 10: DBBattleFormt
} }
var file_battle_battle_msg_proto_depIdxs = []int32{ var file_battle_battle_msg_proto_depIdxs = []int32{
5, // 0: BattlePVEReq.ptype:type_name -> PlayType 7, // 0: BattlePVEReq.ptype:type_name -> PlayType
1, // 1: BattlePVEReq.format:type_name -> BattleFormation 1, // 1: BattlePVEReq.format:type_name -> BattleFormation
6, // 2: BattleInfo.btype:type_name -> BattleType 8, // 2: PVPFormation.format:type_name -> DBHero
5, // 3: BattleInfo.ptype:type_name -> PlayType 7, // 3: BattlePVPReq.ptype:type_name -> PlayType
7, // 4: BattleInfo.redflist:type_name -> DBBattleFormt 3, // 4: BattlePVPReq.redformat:type_name -> PVPFormation
7, // 5: BattleInfo.buleflist:type_name -> DBBattleFormt 3, // 5: BattlePVPReq.buleformat:type_name -> PVPFormation
3, // 6: BattleReport.info:type_name -> BattleInfo 9, // 6: BattleInfo.btype:type_name -> BattleType
7, // [7:7] is the sub-list for method output_type 7, // 7: BattleInfo.ptype:type_name -> PlayType
7, // [7:7] is the sub-list for method input_type 10, // 8: BattleInfo.redflist:type_name -> DBBattleFormt
7, // [7:7] is the sub-list for extension type_name 10, // 9: BattleInfo.buleflist:type_name -> DBBattleFormt
7, // [7:7] is the sub-list for extension extendee 5, // 10: BattleReport.info:type_name -> BattleInfo
0, // [0:7] is the sub-list for field type_name 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() } func init() { file_battle_battle_msg_proto_init() }
@ -474,6 +634,7 @@ func file_battle_battle_msg_proto_init() {
return return
} }
file_battle_battle_db_proto_init() file_battle_battle_db_proto_init()
file_hero_hero_db_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_battle_battle_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_battle_battle_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LineUp); i { 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{} { 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: case 0:
return &v.state return &v.state
case 1: 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{} { 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 { switch v := v.(*BattleReport); i {
case 0: case 0:
return &v.state return &v.state
@ -542,7 +727,7 @@ func file_battle_battle_msg_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_battle_battle_msg_proto_rawDesc, RawDescriptor: file_battle_battle_msg_proto_rawDesc,
NumEnums: 0, NumEnums: 0,
NumMessages: 5, NumMessages: 7,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },