| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066 |
- // message结构的属性名请使用 驼峰小写字母开始
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // versions:
- // protoc-gen-go v1.36.8
- // protoc v6.31.1
- // source: battle.proto
- package pb
- import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- sync "sync"
- unsafe "unsafe"
- )
- const (
- // Verify that this generated code is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
- // Verify that runtime/protoimpl is sufficiently up-to-date.
- _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
- )
- type BattleReplay struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
- ErrorText string `protobuf:"bytes,2,opt,name=errorText,proto3" json:"errorText,omitempty"`
- Result *BattleResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleReplay) Reset() {
- *x = BattleReplay{}
- mi := &file_battle_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleReplay) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleReplay) ProtoMessage() {}
- func (x *BattleReplay) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[0]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleReplay.ProtoReflect.Descriptor instead.
- func (*BattleReplay) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{0}
- }
- func (x *BattleReplay) GetErrorCode() int32 {
- if x != nil {
- return x.ErrorCode
- }
- return 0
- }
- func (x *BattleReplay) GetErrorText() string {
- if x != nil {
- return x.ErrorText
- }
- return ""
- }
- func (x *BattleReplay) GetResult() *BattleResult {
- if x != nil {
- return x.Result
- }
- return nil
- }
- // 战斗参数
- type BattleParam struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 随机种子数
- RandomSeed uint64 `protobuf:"varint,1,opt,name=randomSeed,proto3" json:"randomSeed,omitempty"`
- // 地图ID
- MapID uint32 `protobuf:"varint,2,opt,name=mapID,proto3" json:"mapID,omitempty"`
- // 阵营数据
- Camps []*BattleCampParam `protobuf:"bytes,3,rep,name=camps,proto3" json:"camps,omitempty"`
- // 是否需要生成详细校验数据
- IsGenerateVerificationInfo bool `protobuf:"varint,4,opt,name=isGenerateVerificationInfo,proto3" json:"isGenerateVerificationInfo,omitempty"`
- // 战斗类型 BattleType 1:测试 2:探险 3:PVP 4:SLG
- BattleType int32 `protobuf:"varint,5,opt,name=battleType,proto3" json:"battleType,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleParam) Reset() {
- *x = BattleParam{}
- mi := &file_battle_proto_msgTypes[1]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleParam) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleParam) ProtoMessage() {}
- func (x *BattleParam) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[1]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleParam.ProtoReflect.Descriptor instead.
- func (*BattleParam) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{1}
- }
- func (x *BattleParam) GetRandomSeed() uint64 {
- if x != nil {
- return x.RandomSeed
- }
- return 0
- }
- func (x *BattleParam) GetMapID() uint32 {
- if x != nil {
- return x.MapID
- }
- return 0
- }
- func (x *BattleParam) GetCamps() []*BattleCampParam {
- if x != nil {
- return x.Camps
- }
- return nil
- }
- func (x *BattleParam) GetIsGenerateVerificationInfo() bool {
- if x != nil {
- return x.IsGenerateVerificationInfo
- }
- return false
- }
- func (x *BattleParam) GetBattleType() int32 {
- if x != nil {
- return x.BattleType
- }
- return 0
- }
- // 阵营参数
- type BattleCampParam struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 阵营 BattleCampType
- Camp int32 `protobuf:"varint,1,opt,name=camp,proto3" json:"camp,omitempty"`
- // 战斗力
- Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
- // 战斗小队
- Squads []*BattleSquadParam `protobuf:"bytes,3,rep,name=squads,proto3" json:"squads,omitempty"`
- // 玩家唯一ID,0表示是怪物
- PlayerID int64 `protobuf:"varint,4,opt,name=playerID,proto3" json:"playerID,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleCampParam) Reset() {
- *x = BattleCampParam{}
- mi := &file_battle_proto_msgTypes[2]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleCampParam) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleCampParam) ProtoMessage() {}
- func (x *BattleCampParam) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[2]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleCampParam.ProtoReflect.Descriptor instead.
- func (*BattleCampParam) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{2}
- }
- func (x *BattleCampParam) GetCamp() int32 {
- if x != nil {
- return x.Camp
- }
- return 0
- }
- func (x *BattleCampParam) GetPower() int64 {
- if x != nil {
- return x.Power
- }
- return 0
- }
- func (x *BattleCampParam) GetSquads() []*BattleSquadParam {
- if x != nil {
- return x.Squads
- }
- return nil
- }
- func (x *BattleCampParam) GetPlayerID() int64 {
- if x != nil {
- return x.PlayerID
- }
- return 0
- }
- // 战斗小队参数
- type BattleSquadParam struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 阵位索引
- TileIndex int32 `protobuf:"varint,1,opt,name=tileIndex,proto3" json:"tileIndex,omitempty"`
- // 战斗对象
- Fighter *Fighter `protobuf:"bytes,2,opt,name=fighter,proto3" json:"fighter,omitempty"`
- // 小兵
- Soldiers []*BattleSoldierParam `protobuf:"bytes,3,rep,name=soldiers,proto3" json:"soldiers,omitempty"`
- // 军团属性列表
- Attrs *Attrs `protobuf:"bytes,4,opt,name=attrs,proto3" json:"attrs,omitempty"`
- // 兵种类型
- TroopsID int32 `protobuf:"varint,5,opt,name=troopsID,proto3" json:"troopsID,omitempty"`
- // 兵种数量
- TroopsNum int32 `protobuf:"varint,6,opt,name=troopsNum,proto3" json:"troopsNum,omitempty"`
- // 统兵上限数量
- HeroTroopNum int32 `protobuf:"varint,7,opt,name=heroTroopNum,proto3" json:"heroTroopNum,omitempty"`
- // 首战兵种数量(连战)
- FirstTroopsNum int32 `protobuf:"varint,8,opt,name=firstTroopsNum,proto3" json:"firstTroopsNum,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleSquadParam) Reset() {
- *x = BattleSquadParam{}
- mi := &file_battle_proto_msgTypes[3]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleSquadParam) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleSquadParam) ProtoMessage() {}
- func (x *BattleSquadParam) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[3]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleSquadParam.ProtoReflect.Descriptor instead.
- func (*BattleSquadParam) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{3}
- }
- func (x *BattleSquadParam) GetTileIndex() int32 {
- if x != nil {
- return x.TileIndex
- }
- return 0
- }
- func (x *BattleSquadParam) GetFighter() *Fighter {
- if x != nil {
- return x.Fighter
- }
- return nil
- }
- func (x *BattleSquadParam) GetSoldiers() []*BattleSoldierParam {
- if x != nil {
- return x.Soldiers
- }
- return nil
- }
- func (x *BattleSquadParam) GetAttrs() *Attrs {
- if x != nil {
- return x.Attrs
- }
- return nil
- }
- func (x *BattleSquadParam) GetTroopsID() int32 {
- if x != nil {
- return x.TroopsID
- }
- return 0
- }
- func (x *BattleSquadParam) GetTroopsNum() int32 {
- if x != nil {
- return x.TroopsNum
- }
- return 0
- }
- func (x *BattleSquadParam) GetHeroTroopNum() int32 {
- if x != nil {
- return x.HeroTroopNum
- }
- return 0
- }
- func (x *BattleSquadParam) GetFirstTroopsNum() int32 {
- if x != nil {
- return x.FirstTroopsNum
- }
- return 0
- }
- // 战斗对象
- type Fighter struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 唯一ID
- Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- // 战斗对象类型 1:英雄 2:怪物
- BattleObjType int32 `protobuf:"varint,2,opt,name=battleObjType,proto3" json:"battleObjType,omitempty"`
- // 配置ID
- ConfigID int32 `protobuf:"varint,3,opt,name=configID,proto3" json:"configID,omitempty"`
- // 编队位置索引 默认0,前端用
- TileIndex int32 `protobuf:"varint,4,opt,name=tileIndex,proto3" json:"tileIndex,omitempty"`
- // 属性列表
- Attrs *Attrs `protobuf:"bytes,5,opt,name=attrs,proto3" json:"attrs,omitempty"`
- // 技能列表
- Skills []uint32 `protobuf:"varint,6,rep,packed,name=skills,proto3" json:"skills,omitempty"`
- // 等级
- Level int32 `protobuf:"varint,7,opt,name=level,proto3" json:"level,omitempty"`
- // 外显等级
- DisplayLevel int32 `protobuf:"varint,8,opt,name=displayLevel,proto3" json:"displayLevel,omitempty"`
- // 英雄星级
- Star int32 `protobuf:"varint,9,opt,name=star,proto3" json:"star,omitempty"`
- // 是否死亡
- IsDead bool `protobuf:"varint,10,opt,name=isDead,proto3" json:"isDead,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *Fighter) Reset() {
- *x = Fighter{}
- mi := &file_battle_proto_msgTypes[4]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *Fighter) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*Fighter) ProtoMessage() {}
- func (x *Fighter) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[4]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use Fighter.ProtoReflect.Descriptor instead.
- func (*Fighter) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{4}
- }
- func (x *Fighter) GetId() int64 {
- if x != nil {
- return x.Id
- }
- return 0
- }
- func (x *Fighter) GetBattleObjType() int32 {
- if x != nil {
- return x.BattleObjType
- }
- return 0
- }
- func (x *Fighter) GetConfigID() int32 {
- if x != nil {
- return x.ConfigID
- }
- return 0
- }
- func (x *Fighter) GetTileIndex() int32 {
- if x != nil {
- return x.TileIndex
- }
- return 0
- }
- func (x *Fighter) GetAttrs() *Attrs {
- if x != nil {
- return x.Attrs
- }
- return nil
- }
- func (x *Fighter) GetSkills() []uint32 {
- if x != nil {
- return x.Skills
- }
- return nil
- }
- func (x *Fighter) GetLevel() int32 {
- if x != nil {
- return x.Level
- }
- return 0
- }
- func (x *Fighter) GetDisplayLevel() int32 {
- if x != nil {
- return x.DisplayLevel
- }
- return 0
- }
- func (x *Fighter) GetStar() int32 {
- if x != nil {
- return x.Star
- }
- return 0
- }
- func (x *Fighter) GetIsDead() bool {
- if x != nil {
- return x.IsDead
- }
- return false
- }
- // 战斗小兵参数
- type BattleSoldierParam struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 配置ID
- ConfigID int32 `protobuf:"varint,1,opt,name=configID,proto3" json:"configID,omitempty"`
- // 编队位置索引
- TileIndex int32 `protobuf:"varint,2,opt,name=tileIndex,proto3" json:"tileIndex,omitempty"`
- // 属性列表
- Attrs *Attrs `protobuf:"bytes,3,opt,name=attrs,proto3" json:"attrs,omitempty"`
- // 技能列表
- Skills []uint32 `protobuf:"varint,4,rep,packed,name=skills,proto3" json:"skills,omitempty"`
- // 数量
- Num int32 `protobuf:"varint,5,opt,name=num,proto3" json:"num,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleSoldierParam) Reset() {
- *x = BattleSoldierParam{}
- mi := &file_battle_proto_msgTypes[5]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleSoldierParam) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleSoldierParam) ProtoMessage() {}
- func (x *BattleSoldierParam) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[5]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleSoldierParam.ProtoReflect.Descriptor instead.
- func (*BattleSoldierParam) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{5}
- }
- func (x *BattleSoldierParam) GetConfigID() int32 {
- if x != nil {
- return x.ConfigID
- }
- return 0
- }
- func (x *BattleSoldierParam) GetTileIndex() int32 {
- if x != nil {
- return x.TileIndex
- }
- return 0
- }
- func (x *BattleSoldierParam) GetAttrs() *Attrs {
- if x != nil {
- return x.Attrs
- }
- return nil
- }
- func (x *BattleSoldierParam) GetSkills() []uint32 {
- if x != nil {
- return x.Skills
- }
- return nil
- }
- func (x *BattleSoldierParam) GetNum() int32 {
- if x != nil {
- return x.Num
- }
- return 0
- }
- // 阵营结果
- type BattleCampResult struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 阵营 BattleCampType
- Camp int32 `protobuf:"varint,1,opt,name=camp,proto3" json:"camp,omitempty"`
- // 各个小队的结果
- SquadResults []*BattleSquadResult `protobuf:"bytes,2,rep,name=squadResults,proto3" json:"squadResults,omitempty"`
- // 玩家唯一ID,0表示是怪物
- PlayerID int64 `protobuf:"varint,3,opt,name=playerID,proto3" json:"playerID,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleCampResult) Reset() {
- *x = BattleCampResult{}
- mi := &file_battle_proto_msgTypes[6]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleCampResult) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleCampResult) ProtoMessage() {}
- func (x *BattleCampResult) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[6]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleCampResult.ProtoReflect.Descriptor instead.
- func (*BattleCampResult) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{6}
- }
- func (x *BattleCampResult) GetCamp() int32 {
- if x != nil {
- return x.Camp
- }
- return 0
- }
- func (x *BattleCampResult) GetSquadResults() []*BattleSquadResult {
- if x != nil {
- return x.SquadResults
- }
- return nil
- }
- func (x *BattleCampResult) GetPlayerID() int64 {
- if x != nil {
- return x.PlayerID
- }
- return 0
- }
- // 小队结果
- type BattleSquadResult struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 战斗对象结果
- FighterResult *FighterResult `protobuf:"bytes,1,opt,name=fighterResult,proto3" json:"fighterResult,omitempty"`
- // 士兵剩余数量
- SoldierNum int32 `protobuf:"varint,2,opt,name=soldierNum,proto3" json:"soldierNum,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleSquadResult) Reset() {
- *x = BattleSquadResult{}
- mi := &file_battle_proto_msgTypes[7]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleSquadResult) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleSquadResult) ProtoMessage() {}
- func (x *BattleSquadResult) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[7]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleSquadResult.ProtoReflect.Descriptor instead.
- func (*BattleSquadResult) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{7}
- }
- func (x *BattleSquadResult) GetFighterResult() *FighterResult {
- if x != nil {
- return x.FighterResult
- }
- return nil
- }
- func (x *BattleSquadResult) GetSoldierNum() int32 {
- if x != nil {
- return x.SoldierNum
- }
- return 0
- }
- // 战斗对象结果
- type FighterResult struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 唯一ID
- Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
- // 战斗对象类型 1:英雄 2:怪物
- BattleObjType int32 `protobuf:"varint,2,opt,name=battleObjType,proto3" json:"battleObjType,omitempty"`
- // 配置ID
- ConfigID int32 `protobuf:"varint,3,opt,name=configID,proto3" json:"configID,omitempty"`
- // 是否死亡
- IsDead bool `protobuf:"varint,4,opt,name=isDead,proto3" json:"isDead,omitempty"`
- // 剩余血量万分比 (需要除以10000)
- Hp int32 `protobuf:"varint,5,opt,name=hp,proto3" json:"hp,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *FighterResult) Reset() {
- *x = FighterResult{}
- mi := &file_battle_proto_msgTypes[8]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *FighterResult) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*FighterResult) ProtoMessage() {}
- func (x *FighterResult) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[8]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use FighterResult.ProtoReflect.Descriptor instead.
- func (*FighterResult) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{8}
- }
- func (x *FighterResult) GetId() int64 {
- if x != nil {
- return x.Id
- }
- return 0
- }
- func (x *FighterResult) GetBattleObjType() int32 {
- if x != nil {
- return x.BattleObjType
- }
- return 0
- }
- func (x *FighterResult) GetConfigID() int32 {
- if x != nil {
- return x.ConfigID
- }
- return 0
- }
- func (x *FighterResult) GetIsDead() bool {
- if x != nil {
- return x.IsDead
- }
- return false
- }
- func (x *FighterResult) GetHp() int32 {
- if x != nil {
- return x.Hp
- }
- return 0
- }
- // 战斗结果
- type BattleResult struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 胜利的阵营 -1表示平局
- VictoriousCamp int32 `protobuf:"varint,1,opt,name=victoriousCamp,proto3" json:"victoriousCamp,omitempty"`
- // 结果校验码 相等时表示执行结果一致
- Checksum int64 `protobuf:"varint,2,opt,name=checksum,proto3" json:"checksum,omitempty"`
- // 阵营结果
- CampResult []*BattleCampResult `protobuf:"bytes,3,rep,name=campResult,proto3" json:"campResult,omitempty"`
- // 详细校验结果
- VerifyInfos []*BattleVerifyInfo `protobuf:"bytes,4,rep,name=verifyInfos,proto3" json:"verifyInfos,omitempty"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleResult) Reset() {
- *x = BattleResult{}
- mi := &file_battle_proto_msgTypes[9]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleResult) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleResult) ProtoMessage() {}
- func (x *BattleResult) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[9]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleResult.ProtoReflect.Descriptor instead.
- func (*BattleResult) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{9}
- }
- func (x *BattleResult) GetVictoriousCamp() int32 {
- if x != nil {
- return x.VictoriousCamp
- }
- return 0
- }
- func (x *BattleResult) GetChecksum() int64 {
- if x != nil {
- return x.Checksum
- }
- return 0
- }
- func (x *BattleResult) GetCampResult() []*BattleCampResult {
- if x != nil {
- return x.CampResult
- }
- return nil
- }
- func (x *BattleResult) GetVerifyInfos() []*BattleVerifyInfo {
- if x != nil {
- return x.VerifyInfos
- }
- return nil
- }
- // 校验详细信息
- type BattleVerifyInfo struct {
- state protoimpl.MessageState `protogen:"open.v1"`
- // 类名
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // 校验码
- Checksum int64 `protobuf:"varint,2,opt,name=checksum,proto3" json:"checksum,omitempty"`
- // 成员信息
- Members map[string]string `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- // 子节点信息
- Children map[string]*BattleVerifyInfo `protobuf:"bytes,4,rep,name=children,proto3" json:"children,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
- unknownFields protoimpl.UnknownFields
- sizeCache protoimpl.SizeCache
- }
- func (x *BattleVerifyInfo) Reset() {
- *x = BattleVerifyInfo{}
- mi := &file_battle_proto_msgTypes[10]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
- func (x *BattleVerifyInfo) String() string {
- return protoimpl.X.MessageStringOf(x)
- }
- func (*BattleVerifyInfo) ProtoMessage() {}
- func (x *BattleVerifyInfo) ProtoReflect() protoreflect.Message {
- mi := &file_battle_proto_msgTypes[10]
- if x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
- }
- // Deprecated: Use BattleVerifyInfo.ProtoReflect.Descriptor instead.
- func (*BattleVerifyInfo) Descriptor() ([]byte, []int) {
- return file_battle_proto_rawDescGZIP(), []int{10}
- }
- func (x *BattleVerifyInfo) GetName() string {
- if x != nil {
- return x.Name
- }
- return ""
- }
- func (x *BattleVerifyInfo) GetChecksum() int64 {
- if x != nil {
- return x.Checksum
- }
- return 0
- }
- func (x *BattleVerifyInfo) GetMembers() map[string]string {
- if x != nil {
- return x.Members
- }
- return nil
- }
- func (x *BattleVerifyInfo) GetChildren() map[string]*BattleVerifyInfo {
- if x != nil {
- return x.Children
- }
- return nil
- }
- var File_battle_proto protoreflect.FileDescriptor
- const file_battle_proto_rawDesc = "" +
- "\n" +
- "\fbattle.proto\x12\x02pb\x1a\x0fbase_type.proto\"t\n" +
- "\fBattleReplay\x12\x1c\n" +
- "\terrorCode\x18\x01 \x01(\x05R\terrorCode\x12\x1c\n" +
- "\terrorText\x18\x02 \x01(\tR\terrorText\x12(\n" +
- "\x06result\x18\x03 \x01(\v2\x10.pb.BattleResultR\x06result\"\xce\x01\n" +
- "\vBattleParam\x12\x1e\n" +
- "\n" +
- "randomSeed\x18\x01 \x01(\x04R\n" +
- "randomSeed\x12\x14\n" +
- "\x05mapID\x18\x02 \x01(\rR\x05mapID\x12)\n" +
- "\x05camps\x18\x03 \x03(\v2\x13.pb.BattleCampParamR\x05camps\x12>\n" +
- "\x1aisGenerateVerificationInfo\x18\x04 \x01(\bR\x1aisGenerateVerificationInfo\x12\x1e\n" +
- "\n" +
- "battleType\x18\x05 \x01(\x05R\n" +
- "battleType\"\x85\x01\n" +
- "\x0fBattleCampParam\x12\x12\n" +
- "\x04camp\x18\x01 \x01(\x05R\x04camp\x12\x14\n" +
- "\x05power\x18\x02 \x01(\x03R\x05power\x12,\n" +
- "\x06squads\x18\x03 \x03(\v2\x14.pb.BattleSquadParamR\x06squads\x12\x1a\n" +
- "\bplayerID\x18\x04 \x01(\x03R\bplayerID\"\xb2\x02\n" +
- "\x10BattleSquadParam\x12\x1c\n" +
- "\ttileIndex\x18\x01 \x01(\x05R\ttileIndex\x12%\n" +
- "\afighter\x18\x02 \x01(\v2\v.pb.FighterR\afighter\x122\n" +
- "\bsoldiers\x18\x03 \x03(\v2\x16.pb.BattleSoldierParamR\bsoldiers\x12\x1f\n" +
- "\x05attrs\x18\x04 \x01(\v2\t.pb.AttrsR\x05attrs\x12\x1a\n" +
- "\btroopsID\x18\x05 \x01(\x05R\btroopsID\x12\x1c\n" +
- "\ttroopsNum\x18\x06 \x01(\x05R\ttroopsNum\x12\"\n" +
- "\fheroTroopNum\x18\a \x01(\x05R\fheroTroopNum\x12&\n" +
- "\x0efirstTroopsNum\x18\b \x01(\x05R\x0efirstTroopsNum\"\x98\x02\n" +
- "\aFighter\x12\x0e\n" +
- "\x02id\x18\x01 \x01(\x03R\x02id\x12$\n" +
- "\rbattleObjType\x18\x02 \x01(\x05R\rbattleObjType\x12\x1a\n" +
- "\bconfigID\x18\x03 \x01(\x05R\bconfigID\x12\x1c\n" +
- "\ttileIndex\x18\x04 \x01(\x05R\ttileIndex\x12\x1f\n" +
- "\x05attrs\x18\x05 \x01(\v2\t.pb.AttrsR\x05attrs\x12\x16\n" +
- "\x06skills\x18\x06 \x03(\rR\x06skills\x12\x14\n" +
- "\x05level\x18\a \x01(\x05R\x05level\x12\"\n" +
- "\fdisplayLevel\x18\b \x01(\x05R\fdisplayLevel\x12\x12\n" +
- "\x04star\x18\t \x01(\x05R\x04star\x12\x16\n" +
- "\x06isDead\x18\n" +
- " \x01(\bR\x06isDead\"\x99\x01\n" +
- "\x12BattleSoldierParam\x12\x1a\n" +
- "\bconfigID\x18\x01 \x01(\x05R\bconfigID\x12\x1c\n" +
- "\ttileIndex\x18\x02 \x01(\x05R\ttileIndex\x12\x1f\n" +
- "\x05attrs\x18\x03 \x01(\v2\t.pb.AttrsR\x05attrs\x12\x16\n" +
- "\x06skills\x18\x04 \x03(\rR\x06skills\x12\x10\n" +
- "\x03num\x18\x05 \x01(\x05R\x03num\"}\n" +
- "\x10BattleCampResult\x12\x12\n" +
- "\x04camp\x18\x01 \x01(\x05R\x04camp\x129\n" +
- "\fsquadResults\x18\x02 \x03(\v2\x15.pb.BattleSquadResultR\fsquadResults\x12\x1a\n" +
- "\bplayerID\x18\x03 \x01(\x03R\bplayerID\"l\n" +
- "\x11BattleSquadResult\x127\n" +
- "\rfighterResult\x18\x01 \x01(\v2\x11.pb.FighterResultR\rfighterResult\x12\x1e\n" +
- "\n" +
- "soldierNum\x18\x02 \x01(\x05R\n" +
- "soldierNum\"\x89\x01\n" +
- "\rFighterResult\x12\x0e\n" +
- "\x02id\x18\x01 \x01(\x03R\x02id\x12$\n" +
- "\rbattleObjType\x18\x02 \x01(\x05R\rbattleObjType\x12\x1a\n" +
- "\bconfigID\x18\x03 \x01(\x05R\bconfigID\x12\x16\n" +
- "\x06isDead\x18\x04 \x01(\bR\x06isDead\x12\x0e\n" +
- "\x02hp\x18\x05 \x01(\x05R\x02hp\"\xc0\x01\n" +
- "\fBattleResult\x12&\n" +
- "\x0evictoriousCamp\x18\x01 \x01(\x05R\x0evictoriousCamp\x12\x1a\n" +
- "\bchecksum\x18\x02 \x01(\x03R\bchecksum\x124\n" +
- "\n" +
- "campResult\x18\x03 \x03(\v2\x14.pb.BattleCampResultR\n" +
- "campResult\x126\n" +
- "\vverifyInfos\x18\x04 \x03(\v2\x14.pb.BattleVerifyInfoR\vverifyInfos\"\xce\x02\n" +
- "\x10BattleVerifyInfo\x12\x12\n" +
- "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" +
- "\bchecksum\x18\x02 \x01(\x03R\bchecksum\x12;\n" +
- "\amembers\x18\x03 \x03(\v2!.pb.BattleVerifyInfo.MembersEntryR\amembers\x12>\n" +
- "\bchildren\x18\x04 \x03(\v2\".pb.BattleVerifyInfo.ChildrenEntryR\bchildren\x1a:\n" +
- "\fMembersEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
- "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aQ\n" +
- "\rChildrenEntry\x12\x10\n" +
- "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" +
- "\x05value\x18\x02 \x01(\v2\x14.pb.BattleVerifyInfoR\x05value:\x028\x01B\x05Z\x03/pbb\x06proto3"
- var (
- file_battle_proto_rawDescOnce sync.Once
- file_battle_proto_rawDescData []byte
- )
- func file_battle_proto_rawDescGZIP() []byte {
- file_battle_proto_rawDescOnce.Do(func() {
- file_battle_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_battle_proto_rawDesc), len(file_battle_proto_rawDesc)))
- })
- return file_battle_proto_rawDescData
- }
- var file_battle_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
- var file_battle_proto_goTypes = []any{
- (*BattleReplay)(nil), // 0: pb.BattleReplay
- (*BattleParam)(nil), // 1: pb.BattleParam
- (*BattleCampParam)(nil), // 2: pb.BattleCampParam
- (*BattleSquadParam)(nil), // 3: pb.BattleSquadParam
- (*Fighter)(nil), // 4: pb.Fighter
- (*BattleSoldierParam)(nil), // 5: pb.BattleSoldierParam
- (*BattleCampResult)(nil), // 6: pb.BattleCampResult
- (*BattleSquadResult)(nil), // 7: pb.BattleSquadResult
- (*FighterResult)(nil), // 8: pb.FighterResult
- (*BattleResult)(nil), // 9: pb.BattleResult
- (*BattleVerifyInfo)(nil), // 10: pb.BattleVerifyInfo
- nil, // 11: pb.BattleVerifyInfo.MembersEntry
- nil, // 12: pb.BattleVerifyInfo.ChildrenEntry
- (*Attrs)(nil), // 13: pb.Attrs
- }
- var file_battle_proto_depIdxs = []int32{
- 9, // 0: pb.BattleReplay.result:type_name -> pb.BattleResult
- 2, // 1: pb.BattleParam.camps:type_name -> pb.BattleCampParam
- 3, // 2: pb.BattleCampParam.squads:type_name -> pb.BattleSquadParam
- 4, // 3: pb.BattleSquadParam.fighter:type_name -> pb.Fighter
- 5, // 4: pb.BattleSquadParam.soldiers:type_name -> pb.BattleSoldierParam
- 13, // 5: pb.BattleSquadParam.attrs:type_name -> pb.Attrs
- 13, // 6: pb.Fighter.attrs:type_name -> pb.Attrs
- 13, // 7: pb.BattleSoldierParam.attrs:type_name -> pb.Attrs
- 7, // 8: pb.BattleCampResult.squadResults:type_name -> pb.BattleSquadResult
- 8, // 9: pb.BattleSquadResult.fighterResult:type_name -> pb.FighterResult
- 6, // 10: pb.BattleResult.campResult:type_name -> pb.BattleCampResult
- 10, // 11: pb.BattleResult.verifyInfos:type_name -> pb.BattleVerifyInfo
- 11, // 12: pb.BattleVerifyInfo.members:type_name -> pb.BattleVerifyInfo.MembersEntry
- 12, // 13: pb.BattleVerifyInfo.children:type_name -> pb.BattleVerifyInfo.ChildrenEntry
- 10, // 14: pb.BattleVerifyInfo.ChildrenEntry.value:type_name -> pb.BattleVerifyInfo
- 15, // [15:15] is the sub-list for method output_type
- 15, // [15:15] is the sub-list for method input_type
- 15, // [15:15] is the sub-list for extension type_name
- 15, // [15:15] is the sub-list for extension extendee
- 0, // [0:15] is the sub-list for field type_name
- }
- func init() { file_battle_proto_init() }
- func file_battle_proto_init() {
- if File_battle_proto != nil {
- return
- }
- file_base_type_proto_init()
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: unsafe.Slice(unsafe.StringData(file_battle_proto_rawDesc), len(file_battle_proto_rawDesc)),
- NumEnums: 0,
- NumMessages: 13,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_battle_proto_goTypes,
- DependencyIndexes: file_battle_proto_depIdxs,
- MessageInfos: file_battle_proto_msgTypes,
- }.Build()
- File_battle_proto = out.File
- file_battle_proto_goTypes = nil
- file_battle_proto_depIdxs = nil
- }
|