battle.pb.go 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100
  1. // message结构的属性名请使用 驼峰小写字母开始
  2. // Code generated by protoc-gen-go. DO NOT EDIT.
  3. // versions:
  4. // protoc-gen-go v1.36.8
  5. // protoc v6.31.1
  6. // source: battle.proto
  7. package pb
  8. import (
  9. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  10. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  11. reflect "reflect"
  12. sync "sync"
  13. unsafe "unsafe"
  14. )
  15. const (
  16. // Verify that this generated code is sufficiently up-to-date.
  17. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  18. // Verify that runtime/protoimpl is sufficiently up-to-date.
  19. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  20. )
  21. type BattleReplay struct {
  22. state protoimpl.MessageState `protogen:"open.v1"`
  23. ErrorCode int32 `protobuf:"varint,1,opt,name=errorCode,proto3" json:"errorCode,omitempty"`
  24. ErrorText string `protobuf:"bytes,2,opt,name=errorText,proto3" json:"errorText,omitempty"`
  25. Result *BattleResult `protobuf:"bytes,3,opt,name=result,proto3" json:"result,omitempty"`
  26. unknownFields protoimpl.UnknownFields
  27. sizeCache protoimpl.SizeCache
  28. }
  29. func (x *BattleReplay) Reset() {
  30. *x = BattleReplay{}
  31. mi := &file_battle_proto_msgTypes[0]
  32. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  33. ms.StoreMessageInfo(mi)
  34. }
  35. func (x *BattleReplay) String() string {
  36. return protoimpl.X.MessageStringOf(x)
  37. }
  38. func (*BattleReplay) ProtoMessage() {}
  39. func (x *BattleReplay) ProtoReflect() protoreflect.Message {
  40. mi := &file_battle_proto_msgTypes[0]
  41. if x != nil {
  42. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  43. if ms.LoadMessageInfo() == nil {
  44. ms.StoreMessageInfo(mi)
  45. }
  46. return ms
  47. }
  48. return mi.MessageOf(x)
  49. }
  50. // Deprecated: Use BattleReplay.ProtoReflect.Descriptor instead.
  51. func (*BattleReplay) Descriptor() ([]byte, []int) {
  52. return file_battle_proto_rawDescGZIP(), []int{0}
  53. }
  54. func (x *BattleReplay) GetErrorCode() int32 {
  55. if x != nil {
  56. return x.ErrorCode
  57. }
  58. return 0
  59. }
  60. func (x *BattleReplay) GetErrorText() string {
  61. if x != nil {
  62. return x.ErrorText
  63. }
  64. return ""
  65. }
  66. func (x *BattleReplay) GetResult() *BattleResult {
  67. if x != nil {
  68. return x.Result
  69. }
  70. return nil
  71. }
  72. // 战斗参数
  73. type BattleParam struct {
  74. state protoimpl.MessageState `protogen:"open.v1"`
  75. // 随机种子数
  76. RandomSeed uint64 `protobuf:"varint,1,opt,name=randomSeed,proto3" json:"randomSeed,omitempty"`
  77. // 地图ID
  78. MapID uint32 `protobuf:"varint,2,opt,name=mapID,proto3" json:"mapID,omitempty"`
  79. // 阵营数据
  80. Camps []*BattleCampParam `protobuf:"bytes,3,rep,name=camps,proto3" json:"camps,omitempty"`
  81. // 是否需要生成详细校验数据
  82. IsGenerateVerificationInfo bool `protobuf:"varint,4,opt,name=isGenerateVerificationInfo,proto3" json:"isGenerateVerificationInfo,omitempty"`
  83. // 战斗类型 BattleType 1:测试 2:探险 3:PVP 4:SLG
  84. BattleType int32 `protobuf:"varint,5,opt,name=battleType,proto3" json:"battleType,omitempty"`
  85. // 配置数据
  86. ConfigData []byte `protobuf:"bytes,6,opt,name=configData,proto3" json:"configData,omitempty"`
  87. // 是否生成配置数据
  88. GenerateConfigData bool `protobuf:"varint,7,opt,name=generateConfigData,proto3" json:"generateConfigData,omitempty"`
  89. unknownFields protoimpl.UnknownFields
  90. sizeCache protoimpl.SizeCache
  91. }
  92. func (x *BattleParam) Reset() {
  93. *x = BattleParam{}
  94. mi := &file_battle_proto_msgTypes[1]
  95. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  96. ms.StoreMessageInfo(mi)
  97. }
  98. func (x *BattleParam) String() string {
  99. return protoimpl.X.MessageStringOf(x)
  100. }
  101. func (*BattleParam) ProtoMessage() {}
  102. func (x *BattleParam) ProtoReflect() protoreflect.Message {
  103. mi := &file_battle_proto_msgTypes[1]
  104. if x != nil {
  105. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  106. if ms.LoadMessageInfo() == nil {
  107. ms.StoreMessageInfo(mi)
  108. }
  109. return ms
  110. }
  111. return mi.MessageOf(x)
  112. }
  113. // Deprecated: Use BattleParam.ProtoReflect.Descriptor instead.
  114. func (*BattleParam) Descriptor() ([]byte, []int) {
  115. return file_battle_proto_rawDescGZIP(), []int{1}
  116. }
  117. func (x *BattleParam) GetRandomSeed() uint64 {
  118. if x != nil {
  119. return x.RandomSeed
  120. }
  121. return 0
  122. }
  123. func (x *BattleParam) GetMapID() uint32 {
  124. if x != nil {
  125. return x.MapID
  126. }
  127. return 0
  128. }
  129. func (x *BattleParam) GetCamps() []*BattleCampParam {
  130. if x != nil {
  131. return x.Camps
  132. }
  133. return nil
  134. }
  135. func (x *BattleParam) GetIsGenerateVerificationInfo() bool {
  136. if x != nil {
  137. return x.IsGenerateVerificationInfo
  138. }
  139. return false
  140. }
  141. func (x *BattleParam) GetBattleType() int32 {
  142. if x != nil {
  143. return x.BattleType
  144. }
  145. return 0
  146. }
  147. func (x *BattleParam) GetConfigData() []byte {
  148. if x != nil {
  149. return x.ConfigData
  150. }
  151. return nil
  152. }
  153. func (x *BattleParam) GetGenerateConfigData() bool {
  154. if x != nil {
  155. return x.GenerateConfigData
  156. }
  157. return false
  158. }
  159. // 阵营参数
  160. type BattleCampParam struct {
  161. state protoimpl.MessageState `protogen:"open.v1"`
  162. // 阵营 BattleCampType
  163. Camp int32 `protobuf:"varint,1,opt,name=camp,proto3" json:"camp,omitempty"`
  164. // 战斗力
  165. Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
  166. // 战斗小队
  167. Squads []*BattleSquadParam `protobuf:"bytes,3,rep,name=squads,proto3" json:"squads,omitempty"`
  168. // 玩家唯一ID,0表示是怪物
  169. PlayerID int64 `protobuf:"varint,4,opt,name=playerID,proto3" json:"playerID,omitempty"`
  170. unknownFields protoimpl.UnknownFields
  171. sizeCache protoimpl.SizeCache
  172. }
  173. func (x *BattleCampParam) Reset() {
  174. *x = BattleCampParam{}
  175. mi := &file_battle_proto_msgTypes[2]
  176. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  177. ms.StoreMessageInfo(mi)
  178. }
  179. func (x *BattleCampParam) String() string {
  180. return protoimpl.X.MessageStringOf(x)
  181. }
  182. func (*BattleCampParam) ProtoMessage() {}
  183. func (x *BattleCampParam) ProtoReflect() protoreflect.Message {
  184. mi := &file_battle_proto_msgTypes[2]
  185. if x != nil {
  186. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  187. if ms.LoadMessageInfo() == nil {
  188. ms.StoreMessageInfo(mi)
  189. }
  190. return ms
  191. }
  192. return mi.MessageOf(x)
  193. }
  194. // Deprecated: Use BattleCampParam.ProtoReflect.Descriptor instead.
  195. func (*BattleCampParam) Descriptor() ([]byte, []int) {
  196. return file_battle_proto_rawDescGZIP(), []int{2}
  197. }
  198. func (x *BattleCampParam) GetCamp() int32 {
  199. if x != nil {
  200. return x.Camp
  201. }
  202. return 0
  203. }
  204. func (x *BattleCampParam) GetPower() int64 {
  205. if x != nil {
  206. return x.Power
  207. }
  208. return 0
  209. }
  210. func (x *BattleCampParam) GetSquads() []*BattleSquadParam {
  211. if x != nil {
  212. return x.Squads
  213. }
  214. return nil
  215. }
  216. func (x *BattleCampParam) GetPlayerID() int64 {
  217. if x != nil {
  218. return x.PlayerID
  219. }
  220. return 0
  221. }
  222. // 战斗小队参数
  223. type BattleSquadParam struct {
  224. state protoimpl.MessageState `protogen:"open.v1"`
  225. // 阵位索引
  226. TileIndex int32 `protobuf:"varint,1,opt,name=tileIndex,proto3" json:"tileIndex,omitempty"`
  227. // 战斗对象
  228. Fighter *Fighter `protobuf:"bytes,2,opt,name=fighter,proto3" json:"fighter,omitempty"`
  229. // 小兵
  230. Soldiers []*BattleSoldierParam `protobuf:"bytes,3,rep,name=soldiers,proto3" json:"soldiers,omitempty"`
  231. // 军团属性列表
  232. Attrs *Attrs `protobuf:"bytes,4,opt,name=attrs,proto3" json:"attrs,omitempty"`
  233. // 兵种类型
  234. TroopsID int32 `protobuf:"varint,5,opt,name=troopsID,proto3" json:"troopsID,omitempty"`
  235. // 兵种数量
  236. TroopsNum int32 `protobuf:"varint,6,opt,name=troopsNum,proto3" json:"troopsNum,omitempty"`
  237. // 统兵上限数量
  238. HeroTroopNum int32 `protobuf:"varint,7,opt,name=heroTroopNum,proto3" json:"heroTroopNum,omitempty"`
  239. // 首战兵种数量(连战)
  240. FirstTroopsNum int32 `protobuf:"varint,8,opt,name=firstTroopsNum,proto3" json:"firstTroopsNum,omitempty"`
  241. unknownFields protoimpl.UnknownFields
  242. sizeCache protoimpl.SizeCache
  243. }
  244. func (x *BattleSquadParam) Reset() {
  245. *x = BattleSquadParam{}
  246. mi := &file_battle_proto_msgTypes[3]
  247. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  248. ms.StoreMessageInfo(mi)
  249. }
  250. func (x *BattleSquadParam) String() string {
  251. return protoimpl.X.MessageStringOf(x)
  252. }
  253. func (*BattleSquadParam) ProtoMessage() {}
  254. func (x *BattleSquadParam) ProtoReflect() protoreflect.Message {
  255. mi := &file_battle_proto_msgTypes[3]
  256. if x != nil {
  257. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  258. if ms.LoadMessageInfo() == nil {
  259. ms.StoreMessageInfo(mi)
  260. }
  261. return ms
  262. }
  263. return mi.MessageOf(x)
  264. }
  265. // Deprecated: Use BattleSquadParam.ProtoReflect.Descriptor instead.
  266. func (*BattleSquadParam) Descriptor() ([]byte, []int) {
  267. return file_battle_proto_rawDescGZIP(), []int{3}
  268. }
  269. func (x *BattleSquadParam) GetTileIndex() int32 {
  270. if x != nil {
  271. return x.TileIndex
  272. }
  273. return 0
  274. }
  275. func (x *BattleSquadParam) GetFighter() *Fighter {
  276. if x != nil {
  277. return x.Fighter
  278. }
  279. return nil
  280. }
  281. func (x *BattleSquadParam) GetSoldiers() []*BattleSoldierParam {
  282. if x != nil {
  283. return x.Soldiers
  284. }
  285. return nil
  286. }
  287. func (x *BattleSquadParam) GetAttrs() *Attrs {
  288. if x != nil {
  289. return x.Attrs
  290. }
  291. return nil
  292. }
  293. func (x *BattleSquadParam) GetTroopsID() int32 {
  294. if x != nil {
  295. return x.TroopsID
  296. }
  297. return 0
  298. }
  299. func (x *BattleSquadParam) GetTroopsNum() int32 {
  300. if x != nil {
  301. return x.TroopsNum
  302. }
  303. return 0
  304. }
  305. func (x *BattleSquadParam) GetHeroTroopNum() int32 {
  306. if x != nil {
  307. return x.HeroTroopNum
  308. }
  309. return 0
  310. }
  311. func (x *BattleSquadParam) GetFirstTroopsNum() int32 {
  312. if x != nil {
  313. return x.FirstTroopsNum
  314. }
  315. return 0
  316. }
  317. // 战斗对象
  318. type Fighter struct {
  319. state protoimpl.MessageState `protogen:"open.v1"`
  320. // 唯一ID
  321. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  322. // 战斗对象类型 1:英雄 2:怪物
  323. BattleObjType int32 `protobuf:"varint,2,opt,name=battleObjType,proto3" json:"battleObjType,omitempty"`
  324. // 配置ID
  325. ConfigID int32 `protobuf:"varint,3,opt,name=configID,proto3" json:"configID,omitempty"`
  326. // 编队位置索引 默认0,前端用
  327. TileIndex int32 `protobuf:"varint,4,opt,name=tileIndex,proto3" json:"tileIndex,omitempty"`
  328. // 属性列表
  329. Attrs *Attrs `protobuf:"bytes,5,opt,name=attrs,proto3" json:"attrs,omitempty"`
  330. // 技能列表
  331. Skills []uint32 `protobuf:"varint,6,rep,packed,name=skills,proto3" json:"skills,omitempty"`
  332. // 等级
  333. Level int32 `protobuf:"varint,7,opt,name=level,proto3" json:"level,omitempty"`
  334. // 外显等级
  335. DisplayLevel int32 `protobuf:"varint,8,opt,name=displayLevel,proto3" json:"displayLevel,omitempty"`
  336. // 英雄星级
  337. Star int32 `protobuf:"varint,9,opt,name=star,proto3" json:"star,omitempty"`
  338. // 是否死亡
  339. IsDead bool `protobuf:"varint,10,opt,name=isDead,proto3" json:"isDead,omitempty"`
  340. unknownFields protoimpl.UnknownFields
  341. sizeCache protoimpl.SizeCache
  342. }
  343. func (x *Fighter) Reset() {
  344. *x = Fighter{}
  345. mi := &file_battle_proto_msgTypes[4]
  346. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  347. ms.StoreMessageInfo(mi)
  348. }
  349. func (x *Fighter) String() string {
  350. return protoimpl.X.MessageStringOf(x)
  351. }
  352. func (*Fighter) ProtoMessage() {}
  353. func (x *Fighter) ProtoReflect() protoreflect.Message {
  354. mi := &file_battle_proto_msgTypes[4]
  355. if x != nil {
  356. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  357. if ms.LoadMessageInfo() == nil {
  358. ms.StoreMessageInfo(mi)
  359. }
  360. return ms
  361. }
  362. return mi.MessageOf(x)
  363. }
  364. // Deprecated: Use Fighter.ProtoReflect.Descriptor instead.
  365. func (*Fighter) Descriptor() ([]byte, []int) {
  366. return file_battle_proto_rawDescGZIP(), []int{4}
  367. }
  368. func (x *Fighter) GetId() int64 {
  369. if x != nil {
  370. return x.Id
  371. }
  372. return 0
  373. }
  374. func (x *Fighter) GetBattleObjType() int32 {
  375. if x != nil {
  376. return x.BattleObjType
  377. }
  378. return 0
  379. }
  380. func (x *Fighter) GetConfigID() int32 {
  381. if x != nil {
  382. return x.ConfigID
  383. }
  384. return 0
  385. }
  386. func (x *Fighter) GetTileIndex() int32 {
  387. if x != nil {
  388. return x.TileIndex
  389. }
  390. return 0
  391. }
  392. func (x *Fighter) GetAttrs() *Attrs {
  393. if x != nil {
  394. return x.Attrs
  395. }
  396. return nil
  397. }
  398. func (x *Fighter) GetSkills() []uint32 {
  399. if x != nil {
  400. return x.Skills
  401. }
  402. return nil
  403. }
  404. func (x *Fighter) GetLevel() int32 {
  405. if x != nil {
  406. return x.Level
  407. }
  408. return 0
  409. }
  410. func (x *Fighter) GetDisplayLevel() int32 {
  411. if x != nil {
  412. return x.DisplayLevel
  413. }
  414. return 0
  415. }
  416. func (x *Fighter) GetStar() int32 {
  417. if x != nil {
  418. return x.Star
  419. }
  420. return 0
  421. }
  422. func (x *Fighter) GetIsDead() bool {
  423. if x != nil {
  424. return x.IsDead
  425. }
  426. return false
  427. }
  428. // 战斗小兵参数
  429. type BattleSoldierParam struct {
  430. state protoimpl.MessageState `protogen:"open.v1"`
  431. // 配置ID
  432. ConfigID int32 `protobuf:"varint,1,opt,name=configID,proto3" json:"configID,omitempty"`
  433. // 编队位置索引
  434. TileIndex int32 `protobuf:"varint,2,opt,name=tileIndex,proto3" json:"tileIndex,omitempty"`
  435. // 属性列表
  436. Attrs *Attrs `protobuf:"bytes,3,opt,name=attrs,proto3" json:"attrs,omitempty"`
  437. // 技能列表
  438. Skills []uint32 `protobuf:"varint,4,rep,packed,name=skills,proto3" json:"skills,omitempty"`
  439. // 数量
  440. Num int32 `protobuf:"varint,5,opt,name=num,proto3" json:"num,omitempty"`
  441. unknownFields protoimpl.UnknownFields
  442. sizeCache protoimpl.SizeCache
  443. }
  444. func (x *BattleSoldierParam) Reset() {
  445. *x = BattleSoldierParam{}
  446. mi := &file_battle_proto_msgTypes[5]
  447. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  448. ms.StoreMessageInfo(mi)
  449. }
  450. func (x *BattleSoldierParam) String() string {
  451. return protoimpl.X.MessageStringOf(x)
  452. }
  453. func (*BattleSoldierParam) ProtoMessage() {}
  454. func (x *BattleSoldierParam) ProtoReflect() protoreflect.Message {
  455. mi := &file_battle_proto_msgTypes[5]
  456. if x != nil {
  457. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  458. if ms.LoadMessageInfo() == nil {
  459. ms.StoreMessageInfo(mi)
  460. }
  461. return ms
  462. }
  463. return mi.MessageOf(x)
  464. }
  465. // Deprecated: Use BattleSoldierParam.ProtoReflect.Descriptor instead.
  466. func (*BattleSoldierParam) Descriptor() ([]byte, []int) {
  467. return file_battle_proto_rawDescGZIP(), []int{5}
  468. }
  469. func (x *BattleSoldierParam) GetConfigID() int32 {
  470. if x != nil {
  471. return x.ConfigID
  472. }
  473. return 0
  474. }
  475. func (x *BattleSoldierParam) GetTileIndex() int32 {
  476. if x != nil {
  477. return x.TileIndex
  478. }
  479. return 0
  480. }
  481. func (x *BattleSoldierParam) GetAttrs() *Attrs {
  482. if x != nil {
  483. return x.Attrs
  484. }
  485. return nil
  486. }
  487. func (x *BattleSoldierParam) GetSkills() []uint32 {
  488. if x != nil {
  489. return x.Skills
  490. }
  491. return nil
  492. }
  493. func (x *BattleSoldierParam) GetNum() int32 {
  494. if x != nil {
  495. return x.Num
  496. }
  497. return 0
  498. }
  499. // 阵营结果
  500. type BattleCampResult struct {
  501. state protoimpl.MessageState `protogen:"open.v1"`
  502. // 阵营 BattleCampType
  503. Camp int32 `protobuf:"varint,1,opt,name=camp,proto3" json:"camp,omitempty"`
  504. // 各个小队的结果
  505. SquadResults []*BattleSquadResult `protobuf:"bytes,2,rep,name=squadResults,proto3" json:"squadResults,omitempty"`
  506. // 玩家唯一ID,0表示是怪物
  507. PlayerID int64 `protobuf:"varint,3,opt,name=playerID,proto3" json:"playerID,omitempty"`
  508. unknownFields protoimpl.UnknownFields
  509. sizeCache protoimpl.SizeCache
  510. }
  511. func (x *BattleCampResult) Reset() {
  512. *x = BattleCampResult{}
  513. mi := &file_battle_proto_msgTypes[6]
  514. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  515. ms.StoreMessageInfo(mi)
  516. }
  517. func (x *BattleCampResult) String() string {
  518. return protoimpl.X.MessageStringOf(x)
  519. }
  520. func (*BattleCampResult) ProtoMessage() {}
  521. func (x *BattleCampResult) ProtoReflect() protoreflect.Message {
  522. mi := &file_battle_proto_msgTypes[6]
  523. if x != nil {
  524. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  525. if ms.LoadMessageInfo() == nil {
  526. ms.StoreMessageInfo(mi)
  527. }
  528. return ms
  529. }
  530. return mi.MessageOf(x)
  531. }
  532. // Deprecated: Use BattleCampResult.ProtoReflect.Descriptor instead.
  533. func (*BattleCampResult) Descriptor() ([]byte, []int) {
  534. return file_battle_proto_rawDescGZIP(), []int{6}
  535. }
  536. func (x *BattleCampResult) GetCamp() int32 {
  537. if x != nil {
  538. return x.Camp
  539. }
  540. return 0
  541. }
  542. func (x *BattleCampResult) GetSquadResults() []*BattleSquadResult {
  543. if x != nil {
  544. return x.SquadResults
  545. }
  546. return nil
  547. }
  548. func (x *BattleCampResult) GetPlayerID() int64 {
  549. if x != nil {
  550. return x.PlayerID
  551. }
  552. return 0
  553. }
  554. // 小队结果
  555. type BattleSquadResult struct {
  556. state protoimpl.MessageState `protogen:"open.v1"`
  557. // 战斗对象结果
  558. FighterResult *FighterResult `protobuf:"bytes,1,opt,name=fighterResult,proto3" json:"fighterResult,omitempty"`
  559. // 士兵剩余数量
  560. SoldierNum int32 `protobuf:"varint,2,opt,name=soldierNum,proto3" json:"soldierNum,omitempty"`
  561. unknownFields protoimpl.UnknownFields
  562. sizeCache protoimpl.SizeCache
  563. }
  564. func (x *BattleSquadResult) Reset() {
  565. *x = BattleSquadResult{}
  566. mi := &file_battle_proto_msgTypes[7]
  567. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  568. ms.StoreMessageInfo(mi)
  569. }
  570. func (x *BattleSquadResult) String() string {
  571. return protoimpl.X.MessageStringOf(x)
  572. }
  573. func (*BattleSquadResult) ProtoMessage() {}
  574. func (x *BattleSquadResult) ProtoReflect() protoreflect.Message {
  575. mi := &file_battle_proto_msgTypes[7]
  576. if x != nil {
  577. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  578. if ms.LoadMessageInfo() == nil {
  579. ms.StoreMessageInfo(mi)
  580. }
  581. return ms
  582. }
  583. return mi.MessageOf(x)
  584. }
  585. // Deprecated: Use BattleSquadResult.ProtoReflect.Descriptor instead.
  586. func (*BattleSquadResult) Descriptor() ([]byte, []int) {
  587. return file_battle_proto_rawDescGZIP(), []int{7}
  588. }
  589. func (x *BattleSquadResult) GetFighterResult() *FighterResult {
  590. if x != nil {
  591. return x.FighterResult
  592. }
  593. return nil
  594. }
  595. func (x *BattleSquadResult) GetSoldierNum() int32 {
  596. if x != nil {
  597. return x.SoldierNum
  598. }
  599. return 0
  600. }
  601. // 战斗对象结果
  602. type FighterResult struct {
  603. state protoimpl.MessageState `protogen:"open.v1"`
  604. // 唯一ID
  605. Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  606. // 战斗对象类型 1:英雄 2:怪物
  607. BattleObjType int32 `protobuf:"varint,2,opt,name=battleObjType,proto3" json:"battleObjType,omitempty"`
  608. // 配置ID
  609. ConfigID int32 `protobuf:"varint,3,opt,name=configID,proto3" json:"configID,omitempty"`
  610. // 是否死亡
  611. IsDead bool `protobuf:"varint,4,opt,name=isDead,proto3" json:"isDead,omitempty"`
  612. // 剩余血量万分比 (需要除以10000)
  613. Hp int32 `protobuf:"varint,5,opt,name=hp,proto3" json:"hp,omitempty"`
  614. unknownFields protoimpl.UnknownFields
  615. sizeCache protoimpl.SizeCache
  616. }
  617. func (x *FighterResult) Reset() {
  618. *x = FighterResult{}
  619. mi := &file_battle_proto_msgTypes[8]
  620. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  621. ms.StoreMessageInfo(mi)
  622. }
  623. func (x *FighterResult) String() string {
  624. return protoimpl.X.MessageStringOf(x)
  625. }
  626. func (*FighterResult) ProtoMessage() {}
  627. func (x *FighterResult) ProtoReflect() protoreflect.Message {
  628. mi := &file_battle_proto_msgTypes[8]
  629. if x != nil {
  630. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  631. if ms.LoadMessageInfo() == nil {
  632. ms.StoreMessageInfo(mi)
  633. }
  634. return ms
  635. }
  636. return mi.MessageOf(x)
  637. }
  638. // Deprecated: Use FighterResult.ProtoReflect.Descriptor instead.
  639. func (*FighterResult) Descriptor() ([]byte, []int) {
  640. return file_battle_proto_rawDescGZIP(), []int{8}
  641. }
  642. func (x *FighterResult) GetId() int64 {
  643. if x != nil {
  644. return x.Id
  645. }
  646. return 0
  647. }
  648. func (x *FighterResult) GetBattleObjType() int32 {
  649. if x != nil {
  650. return x.BattleObjType
  651. }
  652. return 0
  653. }
  654. func (x *FighterResult) GetConfigID() int32 {
  655. if x != nil {
  656. return x.ConfigID
  657. }
  658. return 0
  659. }
  660. func (x *FighterResult) GetIsDead() bool {
  661. if x != nil {
  662. return x.IsDead
  663. }
  664. return false
  665. }
  666. func (x *FighterResult) GetHp() int32 {
  667. if x != nil {
  668. return x.Hp
  669. }
  670. return 0
  671. }
  672. // 战斗结果
  673. type BattleResult struct {
  674. state protoimpl.MessageState `protogen:"open.v1"`
  675. // 胜利的阵营 -1表示平局
  676. VictoriousCamp int32 `protobuf:"varint,1,opt,name=victoriousCamp,proto3" json:"victoriousCamp,omitempty"`
  677. // 结果校验码 相等时表示执行结果一致
  678. Checksum int64 `protobuf:"varint,2,opt,name=checksum,proto3" json:"checksum,omitempty"`
  679. // 阵营结果
  680. CampResult []*BattleCampResult `protobuf:"bytes,3,rep,name=campResult,proto3" json:"campResult,omitempty"`
  681. // 详细校验结果
  682. VerifyInfos []*BattleVerifyInfo `protobuf:"bytes,4,rep,name=verifyInfos,proto3" json:"verifyInfos,omitempty"`
  683. // 配置数据
  684. ConfigData []byte `protobuf:"bytes,6,opt,name=configData,proto3" json:"configData,omitempty"`
  685. unknownFields protoimpl.UnknownFields
  686. sizeCache protoimpl.SizeCache
  687. }
  688. func (x *BattleResult) Reset() {
  689. *x = BattleResult{}
  690. mi := &file_battle_proto_msgTypes[9]
  691. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  692. ms.StoreMessageInfo(mi)
  693. }
  694. func (x *BattleResult) String() string {
  695. return protoimpl.X.MessageStringOf(x)
  696. }
  697. func (*BattleResult) ProtoMessage() {}
  698. func (x *BattleResult) ProtoReflect() protoreflect.Message {
  699. mi := &file_battle_proto_msgTypes[9]
  700. if x != nil {
  701. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  702. if ms.LoadMessageInfo() == nil {
  703. ms.StoreMessageInfo(mi)
  704. }
  705. return ms
  706. }
  707. return mi.MessageOf(x)
  708. }
  709. // Deprecated: Use BattleResult.ProtoReflect.Descriptor instead.
  710. func (*BattleResult) Descriptor() ([]byte, []int) {
  711. return file_battle_proto_rawDescGZIP(), []int{9}
  712. }
  713. func (x *BattleResult) GetVictoriousCamp() int32 {
  714. if x != nil {
  715. return x.VictoriousCamp
  716. }
  717. return 0
  718. }
  719. func (x *BattleResult) GetChecksum() int64 {
  720. if x != nil {
  721. return x.Checksum
  722. }
  723. return 0
  724. }
  725. func (x *BattleResult) GetCampResult() []*BattleCampResult {
  726. if x != nil {
  727. return x.CampResult
  728. }
  729. return nil
  730. }
  731. func (x *BattleResult) GetVerifyInfos() []*BattleVerifyInfo {
  732. if x != nil {
  733. return x.VerifyInfos
  734. }
  735. return nil
  736. }
  737. func (x *BattleResult) GetConfigData() []byte {
  738. if x != nil {
  739. return x.ConfigData
  740. }
  741. return nil
  742. }
  743. // 校验详细信息
  744. type BattleVerifyInfo struct {
  745. state protoimpl.MessageState `protogen:"open.v1"`
  746. // 类名
  747. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  748. // 校验码
  749. Checksum int64 `protobuf:"varint,2,opt,name=checksum,proto3" json:"checksum,omitempty"`
  750. // 成员信息
  751. 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"`
  752. // 子节点信息
  753. 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"`
  754. unknownFields protoimpl.UnknownFields
  755. sizeCache protoimpl.SizeCache
  756. }
  757. func (x *BattleVerifyInfo) Reset() {
  758. *x = BattleVerifyInfo{}
  759. mi := &file_battle_proto_msgTypes[10]
  760. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  761. ms.StoreMessageInfo(mi)
  762. }
  763. func (x *BattleVerifyInfo) String() string {
  764. return protoimpl.X.MessageStringOf(x)
  765. }
  766. func (*BattleVerifyInfo) ProtoMessage() {}
  767. func (x *BattleVerifyInfo) ProtoReflect() protoreflect.Message {
  768. mi := &file_battle_proto_msgTypes[10]
  769. if x != nil {
  770. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  771. if ms.LoadMessageInfo() == nil {
  772. ms.StoreMessageInfo(mi)
  773. }
  774. return ms
  775. }
  776. return mi.MessageOf(x)
  777. }
  778. // Deprecated: Use BattleVerifyInfo.ProtoReflect.Descriptor instead.
  779. func (*BattleVerifyInfo) Descriptor() ([]byte, []int) {
  780. return file_battle_proto_rawDescGZIP(), []int{10}
  781. }
  782. func (x *BattleVerifyInfo) GetName() string {
  783. if x != nil {
  784. return x.Name
  785. }
  786. return ""
  787. }
  788. func (x *BattleVerifyInfo) GetChecksum() int64 {
  789. if x != nil {
  790. return x.Checksum
  791. }
  792. return 0
  793. }
  794. func (x *BattleVerifyInfo) GetMembers() map[string]string {
  795. if x != nil {
  796. return x.Members
  797. }
  798. return nil
  799. }
  800. func (x *BattleVerifyInfo) GetChildren() map[string]*BattleVerifyInfo {
  801. if x != nil {
  802. return x.Children
  803. }
  804. return nil
  805. }
  806. var File_battle_proto protoreflect.FileDescriptor
  807. const file_battle_proto_rawDesc = "" +
  808. "\n" +
  809. "\fbattle.proto\x12\x02pb\x1a\x0fbase_type.proto\"t\n" +
  810. "\fBattleReplay\x12\x1c\n" +
  811. "\terrorCode\x18\x01 \x01(\x05R\terrorCode\x12\x1c\n" +
  812. "\terrorText\x18\x02 \x01(\tR\terrorText\x12(\n" +
  813. "\x06result\x18\x03 \x01(\v2\x10.pb.BattleResultR\x06result\"\x9e\x02\n" +
  814. "\vBattleParam\x12\x1e\n" +
  815. "\n" +
  816. "randomSeed\x18\x01 \x01(\x04R\n" +
  817. "randomSeed\x12\x14\n" +
  818. "\x05mapID\x18\x02 \x01(\rR\x05mapID\x12)\n" +
  819. "\x05camps\x18\x03 \x03(\v2\x13.pb.BattleCampParamR\x05camps\x12>\n" +
  820. "\x1aisGenerateVerificationInfo\x18\x04 \x01(\bR\x1aisGenerateVerificationInfo\x12\x1e\n" +
  821. "\n" +
  822. "battleType\x18\x05 \x01(\x05R\n" +
  823. "battleType\x12\x1e\n" +
  824. "\n" +
  825. "configData\x18\x06 \x01(\fR\n" +
  826. "configData\x12.\n" +
  827. "\x12generateConfigData\x18\a \x01(\bR\x12generateConfigData\"\x85\x01\n" +
  828. "\x0fBattleCampParam\x12\x12\n" +
  829. "\x04camp\x18\x01 \x01(\x05R\x04camp\x12\x14\n" +
  830. "\x05power\x18\x02 \x01(\x03R\x05power\x12,\n" +
  831. "\x06squads\x18\x03 \x03(\v2\x14.pb.BattleSquadParamR\x06squads\x12\x1a\n" +
  832. "\bplayerID\x18\x04 \x01(\x03R\bplayerID\"\xb2\x02\n" +
  833. "\x10BattleSquadParam\x12\x1c\n" +
  834. "\ttileIndex\x18\x01 \x01(\x05R\ttileIndex\x12%\n" +
  835. "\afighter\x18\x02 \x01(\v2\v.pb.FighterR\afighter\x122\n" +
  836. "\bsoldiers\x18\x03 \x03(\v2\x16.pb.BattleSoldierParamR\bsoldiers\x12\x1f\n" +
  837. "\x05attrs\x18\x04 \x01(\v2\t.pb.AttrsR\x05attrs\x12\x1a\n" +
  838. "\btroopsID\x18\x05 \x01(\x05R\btroopsID\x12\x1c\n" +
  839. "\ttroopsNum\x18\x06 \x01(\x05R\ttroopsNum\x12\"\n" +
  840. "\fheroTroopNum\x18\a \x01(\x05R\fheroTroopNum\x12&\n" +
  841. "\x0efirstTroopsNum\x18\b \x01(\x05R\x0efirstTroopsNum\"\x98\x02\n" +
  842. "\aFighter\x12\x0e\n" +
  843. "\x02id\x18\x01 \x01(\x03R\x02id\x12$\n" +
  844. "\rbattleObjType\x18\x02 \x01(\x05R\rbattleObjType\x12\x1a\n" +
  845. "\bconfigID\x18\x03 \x01(\x05R\bconfigID\x12\x1c\n" +
  846. "\ttileIndex\x18\x04 \x01(\x05R\ttileIndex\x12\x1f\n" +
  847. "\x05attrs\x18\x05 \x01(\v2\t.pb.AttrsR\x05attrs\x12\x16\n" +
  848. "\x06skills\x18\x06 \x03(\rR\x06skills\x12\x14\n" +
  849. "\x05level\x18\a \x01(\x05R\x05level\x12\"\n" +
  850. "\fdisplayLevel\x18\b \x01(\x05R\fdisplayLevel\x12\x12\n" +
  851. "\x04star\x18\t \x01(\x05R\x04star\x12\x16\n" +
  852. "\x06isDead\x18\n" +
  853. " \x01(\bR\x06isDead\"\x99\x01\n" +
  854. "\x12BattleSoldierParam\x12\x1a\n" +
  855. "\bconfigID\x18\x01 \x01(\x05R\bconfigID\x12\x1c\n" +
  856. "\ttileIndex\x18\x02 \x01(\x05R\ttileIndex\x12\x1f\n" +
  857. "\x05attrs\x18\x03 \x01(\v2\t.pb.AttrsR\x05attrs\x12\x16\n" +
  858. "\x06skills\x18\x04 \x03(\rR\x06skills\x12\x10\n" +
  859. "\x03num\x18\x05 \x01(\x05R\x03num\"}\n" +
  860. "\x10BattleCampResult\x12\x12\n" +
  861. "\x04camp\x18\x01 \x01(\x05R\x04camp\x129\n" +
  862. "\fsquadResults\x18\x02 \x03(\v2\x15.pb.BattleSquadResultR\fsquadResults\x12\x1a\n" +
  863. "\bplayerID\x18\x03 \x01(\x03R\bplayerID\"l\n" +
  864. "\x11BattleSquadResult\x127\n" +
  865. "\rfighterResult\x18\x01 \x01(\v2\x11.pb.FighterResultR\rfighterResult\x12\x1e\n" +
  866. "\n" +
  867. "soldierNum\x18\x02 \x01(\x05R\n" +
  868. "soldierNum\"\x89\x01\n" +
  869. "\rFighterResult\x12\x0e\n" +
  870. "\x02id\x18\x01 \x01(\x03R\x02id\x12$\n" +
  871. "\rbattleObjType\x18\x02 \x01(\x05R\rbattleObjType\x12\x1a\n" +
  872. "\bconfigID\x18\x03 \x01(\x05R\bconfigID\x12\x16\n" +
  873. "\x06isDead\x18\x04 \x01(\bR\x06isDead\x12\x0e\n" +
  874. "\x02hp\x18\x05 \x01(\x05R\x02hp\"\xe0\x01\n" +
  875. "\fBattleResult\x12&\n" +
  876. "\x0evictoriousCamp\x18\x01 \x01(\x05R\x0evictoriousCamp\x12\x1a\n" +
  877. "\bchecksum\x18\x02 \x01(\x03R\bchecksum\x124\n" +
  878. "\n" +
  879. "campResult\x18\x03 \x03(\v2\x14.pb.BattleCampResultR\n" +
  880. "campResult\x126\n" +
  881. "\vverifyInfos\x18\x04 \x03(\v2\x14.pb.BattleVerifyInfoR\vverifyInfos\x12\x1e\n" +
  882. "\n" +
  883. "configData\x18\x06 \x01(\fR\n" +
  884. "configData\"\xce\x02\n" +
  885. "\x10BattleVerifyInfo\x12\x12\n" +
  886. "\x04name\x18\x01 \x01(\tR\x04name\x12\x1a\n" +
  887. "\bchecksum\x18\x02 \x01(\x03R\bchecksum\x12;\n" +
  888. "\amembers\x18\x03 \x03(\v2!.pb.BattleVerifyInfo.MembersEntryR\amembers\x12>\n" +
  889. "\bchildren\x18\x04 \x03(\v2\".pb.BattleVerifyInfo.ChildrenEntryR\bchildren\x1a:\n" +
  890. "\fMembersEntry\x12\x10\n" +
  891. "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
  892. "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aQ\n" +
  893. "\rChildrenEntry\x12\x10\n" +
  894. "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" +
  895. "\x05value\x18\x02 \x01(\v2\x14.pb.BattleVerifyInfoR\x05value:\x028\x01B\x05Z\x03/pbb\x06proto3"
  896. var (
  897. file_battle_proto_rawDescOnce sync.Once
  898. file_battle_proto_rawDescData []byte
  899. )
  900. func file_battle_proto_rawDescGZIP() []byte {
  901. file_battle_proto_rawDescOnce.Do(func() {
  902. file_battle_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_battle_proto_rawDesc), len(file_battle_proto_rawDesc)))
  903. })
  904. return file_battle_proto_rawDescData
  905. }
  906. var file_battle_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
  907. var file_battle_proto_goTypes = []any{
  908. (*BattleReplay)(nil), // 0: pb.BattleReplay
  909. (*BattleParam)(nil), // 1: pb.BattleParam
  910. (*BattleCampParam)(nil), // 2: pb.BattleCampParam
  911. (*BattleSquadParam)(nil), // 3: pb.BattleSquadParam
  912. (*Fighter)(nil), // 4: pb.Fighter
  913. (*BattleSoldierParam)(nil), // 5: pb.BattleSoldierParam
  914. (*BattleCampResult)(nil), // 6: pb.BattleCampResult
  915. (*BattleSquadResult)(nil), // 7: pb.BattleSquadResult
  916. (*FighterResult)(nil), // 8: pb.FighterResult
  917. (*BattleResult)(nil), // 9: pb.BattleResult
  918. (*BattleVerifyInfo)(nil), // 10: pb.BattleVerifyInfo
  919. nil, // 11: pb.BattleVerifyInfo.MembersEntry
  920. nil, // 12: pb.BattleVerifyInfo.ChildrenEntry
  921. (*Attrs)(nil), // 13: pb.Attrs
  922. }
  923. var file_battle_proto_depIdxs = []int32{
  924. 9, // 0: pb.BattleReplay.result:type_name -> pb.BattleResult
  925. 2, // 1: pb.BattleParam.camps:type_name -> pb.BattleCampParam
  926. 3, // 2: pb.BattleCampParam.squads:type_name -> pb.BattleSquadParam
  927. 4, // 3: pb.BattleSquadParam.fighter:type_name -> pb.Fighter
  928. 5, // 4: pb.BattleSquadParam.soldiers:type_name -> pb.BattleSoldierParam
  929. 13, // 5: pb.BattleSquadParam.attrs:type_name -> pb.Attrs
  930. 13, // 6: pb.Fighter.attrs:type_name -> pb.Attrs
  931. 13, // 7: pb.BattleSoldierParam.attrs:type_name -> pb.Attrs
  932. 7, // 8: pb.BattleCampResult.squadResults:type_name -> pb.BattleSquadResult
  933. 8, // 9: pb.BattleSquadResult.fighterResult:type_name -> pb.FighterResult
  934. 6, // 10: pb.BattleResult.campResult:type_name -> pb.BattleCampResult
  935. 10, // 11: pb.BattleResult.verifyInfos:type_name -> pb.BattleVerifyInfo
  936. 11, // 12: pb.BattleVerifyInfo.members:type_name -> pb.BattleVerifyInfo.MembersEntry
  937. 12, // 13: pb.BattleVerifyInfo.children:type_name -> pb.BattleVerifyInfo.ChildrenEntry
  938. 10, // 14: pb.BattleVerifyInfo.ChildrenEntry.value:type_name -> pb.BattleVerifyInfo
  939. 15, // [15:15] is the sub-list for method output_type
  940. 15, // [15:15] is the sub-list for method input_type
  941. 15, // [15:15] is the sub-list for extension type_name
  942. 15, // [15:15] is the sub-list for extension extendee
  943. 0, // [0:15] is the sub-list for field type_name
  944. }
  945. func init() { file_battle_proto_init() }
  946. func file_battle_proto_init() {
  947. if File_battle_proto != nil {
  948. return
  949. }
  950. file_base_type_proto_init()
  951. type x struct{}
  952. out := protoimpl.TypeBuilder{
  953. File: protoimpl.DescBuilder{
  954. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  955. RawDescriptor: unsafe.Slice(unsafe.StringData(file_battle_proto_rawDesc), len(file_battle_proto_rawDesc)),
  956. NumEnums: 0,
  957. NumMessages: 13,
  958. NumExtensions: 0,
  959. NumServices: 0,
  960. },
  961. GoTypes: file_battle_proto_goTypes,
  962. DependencyIndexes: file_battle_proto_depIdxs,
  963. MessageInfos: file_battle_proto_msgTypes,
  964. }.Build()
  965. File_battle_proto = out.File
  966. file_battle_proto_goTypes = nil
  967. file_battle_proto_depIdxs = nil
  968. }