battle.pb.go 29 KB

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