| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100 |
- // 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"`
- // 配置数据
- ConfigData []byte `protobuf:"bytes,6,opt,name=configData,proto3" json:"configData,omitempty"`
- // 是否生成配置数据
- GenerateConfigData bool `protobuf:"varint,7,opt,name=generateConfigData,proto3" json:"generateConfigData,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
- }
- func (x *BattleParam) GetConfigData() []byte {
- if x != nil {
- return x.ConfigData
- }
- return nil
- }
- func (x *BattleParam) GetGenerateConfigData() bool {
- if x != nil {
- return x.GenerateConfigData
- }
- return false
- }
- // 阵营参数
- 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"`
- // 配置数据
- ConfigData []byte `protobuf:"bytes,6,opt,name=configData,proto3" json:"configData,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
- }
- func (x *BattleResult) GetConfigData() []byte {
- if x != nil {
- return x.ConfigData
- }
- 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\"\x9e\x02\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\x12\x1e\n" +
- "\n" +
- "configData\x18\x06 \x01(\fR\n" +
- "configData\x12.\n" +
- "\x12generateConfigData\x18\a \x01(\bR\x12generateConfigData\"\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\"\xe0\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\x12\x1e\n" +
- "\n" +
- "configData\x18\x06 \x01(\fR\n" +
- "configData\"\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
- }
|