schema.ts 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607
  1. //------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by a tool.
  4. // Changes to this file may cause incorrect behavior and will be lost if
  5. // the code is regenerated.
  6. // </auto-generated>
  7. //------------------------------------------------------------------------------
  8. import ByteBuf from '../bright/serialization/ByteBuf'
  9. export namespace test {
  10. export enum ETestQuality {
  11. /**
  12. * 最高品质
  13. */
  14. A = 1,
  15. /**
  16. * 黑色的
  17. */
  18. B = 2,
  19. /**
  20. * 蓝色的
  21. */
  22. C = 3,
  23. /**
  24. * 最差品质
  25. */
  26. D = 4,
  27. }
  28. }
  29. export namespace test {
  30. export enum AccessFlag {
  31. WRITE = 1,
  32. READ = 2,
  33. TRUNCATE = 4,
  34. NEW = 8,
  35. READ_WRITE = WRITE|READ,
  36. }
  37. }
  38. export enum Quality {
  39. /**
  40. * 普通
  41. */
  42. Normal = 1,
  43. /**
  44. * 高级
  45. */
  46. Senior = 2,
  47. /**
  48. * 稀有
  49. */
  50. Rare = 3,
  51. /**
  52. * 传说
  53. */
  54. Legend = 4,
  55. /**
  56. * 神话
  57. */
  58. Myth = 5,
  59. }
  60. export enum AttackType {
  61. /**
  62. * 近战
  63. */
  64. CloseCombat = 1,
  65. /**
  66. * 远程
  67. */
  68. Remote = 2,
  69. }
  70. export namespace test {
  71. /**
  72. * 这是个测试excel结构
  73. */
  74. export class TestExcelBean1 {
  75. constructor(_buf_: ByteBuf) {
  76. this.x1 = _buf_.ReadInt()
  77. this.x2 = _buf_.ReadString()
  78. this.x3 = _buf_.ReadInt()
  79. this.x4 = _buf_.ReadFloat()
  80. }
  81. /**
  82. * 最高品质
  83. */
  84. readonly x1: number
  85. /**
  86. * 黑色的
  87. */
  88. readonly x2: string
  89. /**
  90. * 蓝色的
  91. */
  92. readonly x3: number
  93. /**
  94. * 最差品质
  95. */
  96. readonly x4: number
  97. resolve(tables:Tables) {
  98. }
  99. }
  100. }
  101. export namespace test {
  102. /**
  103. * 这是个测试excel结构
  104. */
  105. export class TestExcelBean2 {
  106. constructor(_buf_: ByteBuf) {
  107. this.y1 = _buf_.ReadInt()
  108. this.y2 = _buf_.ReadString()
  109. this.y3 = _buf_.ReadFloat()
  110. }
  111. /**
  112. * 最高品质
  113. */
  114. readonly y1: number
  115. /**
  116. * 黑色的
  117. */
  118. readonly y2: string
  119. /**
  120. * 蓝色的
  121. */
  122. readonly y3: number
  123. resolve(tables:Tables) {
  124. }
  125. }
  126. }
  127. export namespace test {
  128. export abstract class Shape {
  129. static constructorFrom(_buf_: ByteBuf): Shape{
  130. switch (_buf_.ReadInt()) {
  131. case 2131829196: return new test.Circle(_buf_)
  132. case 694982337: return new test2.Rectangle(_buf_)
  133. default: throw new Error()
  134. }
  135. }
  136. constructor(_buf_: ByteBuf) {
  137. }
  138. resolve(tables:Tables) {
  139. }
  140. }
  141. }
  142. export namespace test {
  143. /**
  144. * 圆
  145. */
  146. export class Circle extends test.Shape {
  147. constructor(_buf_: ByteBuf) {
  148. super(_buf_)
  149. this.radius = _buf_.ReadFloat()
  150. }
  151. /**
  152. * 半径
  153. */
  154. readonly radius: number
  155. resolve(tables:Tables) {
  156. super.resolve(tables)
  157. }
  158. }
  159. }
  160. export namespace test2 {
  161. /**
  162. * 矩形
  163. */
  164. export class Rectangle extends test.Shape {
  165. constructor(_buf_: ByteBuf) {
  166. super(_buf_)
  167. this.width = _buf_.ReadFloat()
  168. this.height = _buf_.ReadFloat()
  169. }
  170. /**
  171. * 宽度
  172. */
  173. readonly width: number
  174. /**
  175. * 高度
  176. */
  177. readonly height: number
  178. resolve(tables:Tables) {
  179. super.resolve(tables)
  180. }
  181. }
  182. }
  183. export namespace Common {
  184. export class Reward {
  185. constructor(_buf_: ByteBuf) {
  186. this.itemid = _buf_.ReadInt()
  187. this.num = _buf_.ReadInt()
  188. }
  189. /**
  190. * 道具id
  191. */
  192. readonly itemid: number
  193. /**
  194. * 数量
  195. */
  196. readonly num: number
  197. resolve(tables:Tables) {
  198. }
  199. }
  200. }
  201. export namespace Common {
  202. export class Cost {
  203. constructor(_buf_: ByteBuf) {
  204. this.itemid = _buf_.ReadInt()
  205. this.num = _buf_.ReadInt()
  206. }
  207. /**
  208. * 道具id
  209. */
  210. readonly itemid: number
  211. /**
  212. * 数量
  213. */
  214. readonly num: number
  215. resolve(tables:Tables) {
  216. }
  217. }
  218. }
  219. export class Item {
  220. constructor(_buf_: ByteBuf) {
  221. this.idx = _buf_.ReadInt()
  222. this.type = _buf_.ReadInt()
  223. this.name = _buf_.ReadString()
  224. }
  225. /**
  226. * 道具ID
  227. */
  228. readonly idx: number
  229. /**
  230. * 类型
  231. */
  232. readonly type: number
  233. /**
  234. * 道具名
  235. */
  236. readonly name: string
  237. resolve(tables:Tables) {
  238. }
  239. }
  240. export class Skill {
  241. constructor(_buf_: ByteBuf) {
  242. this.idx = _buf_.ReadInt()
  243. this.remark = _buf_.ReadString()
  244. this.skillId = _buf_.ReadInt()
  245. this.skillType = _buf_.ReadInt()
  246. this.cd = _buf_.ReadInt()
  247. this.gridRange = _buf_.ReadInt()
  248. this.range = _buf_.ReadInt()
  249. this.triggerCondition = _buf_.ReadString()
  250. this.effects = _buf_.ReadString()
  251. this.buffId = _buf_.ReadString()
  252. this.skillName = _buf_.ReadString()
  253. this.desc = _buf_.ReadString()
  254. this.conflictSkillId = _buf_.ReadInt()
  255. }
  256. /**
  257. * 主键id
  258. */
  259. readonly idx: number
  260. /**
  261. * 备注
  262. */
  263. readonly remark: string
  264. /**
  265. * 技能ID
  266. */
  267. readonly skillId: number
  268. /**
  269. * 类型
  270. */
  271. readonly skillType: number
  272. /**
  273. * 冷却时间
  274. */
  275. readonly cd: number
  276. /**
  277. * 格子范围
  278. */
  279. readonly gridRange: number
  280. /**
  281. * 攻击距离
  282. */
  283. readonly range: number
  284. /**
  285. * 技能触发条件
  286. */
  287. readonly triggerCondition: string
  288. /**
  289. * 效果列表
  290. */
  291. readonly effects: string
  292. /**
  293. * buff
  294. */
  295. readonly buffId: string
  296. /**
  297. * 技能名字
  298. */
  299. readonly skillName: string
  300. /**
  301. * 技能描述
  302. */
  303. readonly desc: string
  304. /**
  305. * 冲突的技能id
  306. */
  307. readonly conflictSkillId: number
  308. resolve(tables:Tables) {
  309. }
  310. }
  311. export class HeroQualityWorth {
  312. constructor(_buf_: ByteBuf) {
  313. this.idx = _buf_.ReadInt()
  314. this.quality = _buf_.ReadInt()
  315. this.gold = _buf_.ReadInt()
  316. this.gem = _buf_.ReadInt()
  317. }
  318. /**
  319. * 唯一id
  320. */
  321. readonly idx: number
  322. /**
  323. * 品质
  324. */
  325. readonly quality: Quality
  326. /**
  327. * 局内金币
  328. */
  329. readonly gold: number
  330. /**
  331. * 局内宝石
  332. */
  333. readonly gem: number
  334. resolve(tables:Tables) {
  335. }
  336. }
  337. export class System {
  338. constructor(_buf_: ByteBuf) {
  339. this.idx = _buf_.ReadInt()
  340. this.mainKey = _buf_.ReadString()
  341. this.value = _buf_.ReadString()
  342. }
  343. /**
  344. * IDX
  345. */
  346. readonly idx: number
  347. /**
  348. * 常量主键
  349. */
  350. readonly mainKey: string
  351. /**
  352. * 常量值
  353. */
  354. readonly value: string
  355. resolve(tables:Tables) {
  356. }
  357. }
  358. export class BattleSpacialSummon {
  359. constructor(_buf_: ByteBuf) {
  360. this.idx = _buf_.ReadInt()
  361. this.quality = _buf_.ReadInt()
  362. this.weight = _buf_.ReadInt()
  363. this.costgem = _buf_.ReadInt()
  364. }
  365. /**
  366. * 唯一id
  367. */
  368. readonly idx: number
  369. /**
  370. * 品质
  371. */
  372. readonly quality: Quality
  373. /**
  374. * 权重
  375. */
  376. readonly weight: number
  377. /**
  378. * 消耗宝石数量
  379. */
  380. readonly costgem: number
  381. resolve(tables:Tables) {
  382. }
  383. }
  384. export class Hero {
  385. constructor(_buf_: ByteBuf) {
  386. this.id = _buf_.ReadInt()
  387. this.quality = _buf_.ReadInt()
  388. this.attacktype = _buf_.ReadInt()
  389. this.name = _buf_.ReadString()
  390. { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.skills = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = _buf_.ReadInt(); this.skills.push(_e0);}}
  391. { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.composeheros = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = _buf_.ReadInt(); this.composeheros.push(_e0);}}
  392. this.isShow = _buf_.ReadInt()
  393. }
  394. /**
  395. * 英雄ID
  396. */
  397. readonly id: number
  398. /**
  399. * 品质
  400. */
  401. readonly quality: Quality
  402. /**
  403. * 攻击类型
  404. */
  405. readonly attacktype: AttackType
  406. /**
  407. * 名字
  408. */
  409. readonly name: string
  410. /**
  411. * 技能列表
  412. */
  413. readonly skills: number[]
  414. /**
  415. * 合成英雄公式
  416. */
  417. readonly composeheros: number[]
  418. /**
  419. * 是否测试
  420. */
  421. readonly isShow: number
  422. resolve(tables:Tables) {
  423. }
  424. }
  425. export class BattleSummonWeight {
  426. constructor(_buf_: ByteBuf) {
  427. this.idx = _buf_.ReadInt()
  428. this.quality = _buf_.ReadInt()
  429. this.weight = _buf_.ReadInt()
  430. }
  431. /**
  432. * 唯一id
  433. */
  434. readonly idx: number
  435. /**
  436. * 品质
  437. */
  438. readonly quality: Quality
  439. /**
  440. * 权重
  441. */
  442. readonly weight: number
  443. resolve(tables:Tables) {
  444. }
  445. }
  446. export class WaveRewards {
  447. constructor(_buf_: ByteBuf) {
  448. this.idx = _buf_.ReadInt()
  449. this.waveMin = _buf_.ReadInt()
  450. this.waveMax = _buf_.ReadInt()
  451. this.level = _buf_.ReadInt()
  452. { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.rewards = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = new Common.Reward(_buf_); this.rewards.push(_e0);}}
  453. }
  454. /**
  455. * idx
  456. */
  457. readonly idx: number
  458. /**
  459. * 波数下限
  460. */
  461. readonly waveMin: number
  462. /**
  463. * 波数上限
  464. */
  465. readonly waveMax: number
  466. /**
  467. * 难度
  468. */
  469. readonly level: number
  470. /**
  471. * 奖励列表
  472. */
  473. readonly rewards: Common.Reward[]
  474. resolve(tables:Tables) {
  475. for (let _e of this.rewards) { _e?.resolve(tables); }
  476. }
  477. }
  478. export class SkillBuff {
  479. constructor(_buf_: ByteBuf) {
  480. this.idx = _buf_.ReadInt()
  481. this.remark = _buf_.ReadString()
  482. this.type = _buf_.ReadInt()
  483. this.parameters = _buf_.ReadString()
  484. this.probability = _buf_.ReadInt()
  485. this.triggerCondition = _buf_.ReadString()
  486. this.effectType = _buf_.ReadInt()
  487. this.duration = _buf_.ReadInt()
  488. this.overlapTimes = _buf_.ReadInt()
  489. this.uniqueGain = _buf_.ReadBool()
  490. this.halo = _buf_.ReadBool()
  491. this.attributes = _buf_.ReadString()
  492. this.mixBufficon = _buf_.ReadInt()
  493. this.skillShowId = _buf_.ReadInt()
  494. this.floatingTextId = _buf_.ReadInt()
  495. }
  496. /**
  497. * buffid
  498. */
  499. readonly idx: number
  500. /**
  501. * 备注
  502. */
  503. readonly remark: string
  504. /**
  505. * buff类型
  506. */
  507. readonly type: number
  508. /**
  509. * buff参数
  510. */
  511. readonly parameters: string
  512. /**
  513. * 触发概率
  514. */
  515. readonly probability: number
  516. /**
  517. * 触发条件
  518. */
  519. readonly triggerCondition: string
  520. /**
  521. * 效果类型
  522. */
  523. readonly effectType: number
  524. /**
  525. * 持续时间
  526. */
  527. readonly duration: number
  528. /**
  529. * 叠加次数
  530. */
  531. readonly overlapTimes: number
  532. /**
  533. * 唯一增益
  534. */
  535. readonly uniqueGain: boolean
  536. /**
  537. * 是否是光环
  538. */
  539. readonly halo: boolean
  540. /**
  541. * buff增加的属性
  542. */
  543. readonly attributes: string
  544. /**
  545. * 是否合并
  546. */
  547. readonly mixBufficon: number
  548. /**
  549. * 效果id
  550. */
  551. readonly skillShowId: number
  552. /**
  553. * 飘字id
  554. */
  555. readonly floatingTextId: number
  556. resolve(tables:Tables) {
  557. }
  558. }
  559. export class Wave {
  560. constructor(_buf_: ByteBuf) {
  561. this.idx = _buf_.ReadInt()
  562. this.waveIndex = _buf_.ReadInt()
  563. this.level = _buf_.ReadInt()
  564. this.model = _buf_.ReadInt()
  565. this.counter = _buf_.ReadInt()
  566. this.hp = _buf_.ReadInt()
  567. this.speed = _buf_.ReadInt()
  568. this.gap = _buf_.ReadInt()
  569. this.isboss = _buf_.ReadInt()
  570. this.perAddCoid = _buf_.ReadInt()
  571. this.perAddGem = _buf_.ReadInt()
  572. }
  573. /**
  574. * 唯一id
  575. */
  576. readonly idx: number
  577. /**
  578. * 波数
  579. */
  580. readonly waveIndex: number
  581. /**
  582. * 难度
  583. */
  584. readonly level: number
  585. /**
  586. * 怪物模型
  587. */
  588. readonly model: number
  589. /**
  590. * 数量
  591. */
  592. readonly counter: number
  593. /**
  594. * 血量
  595. */
  596. readonly hp: number
  597. /**
  598. * 速度
  599. */
  600. readonly speed: number
  601. /**
  602. * 间距
  603. */
  604. readonly gap: number
  605. /**
  606. * 是否是boss
  607. */
  608. readonly isboss: number
  609. /**
  610. * 每只怪增加局内金币
  611. */
  612. readonly perAddCoid: number
  613. /**
  614. * 每只怪增加局内宝石
  615. */
  616. readonly perAddGem: number
  617. resolve(tables:Tables) {
  618. }
  619. }
  620. export class StrengthenLevel {
  621. constructor(_buf_: ByteBuf) {
  622. this.idx = _buf_.ReadInt()
  623. this.quality = _buf_.ReadInt()
  624. this.level = _buf_.ReadInt()
  625. { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.rewards = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = new Common.Reward(_buf_); this.rewards.push(_e0);}}
  626. this.attributes = _buf_.ReadString()
  627. }
  628. /**
  629. * 唯一id
  630. */
  631. readonly idx: number
  632. /**
  633. * 品质
  634. */
  635. readonly quality: Quality
  636. /**
  637. * 等级
  638. */
  639. readonly level: number
  640. /**
  641. * 消耗
  642. */
  643. readonly rewards: Common.Reward[]
  644. /**
  645. * buff增加的属性
  646. */
  647. readonly attributes: string
  648. resolve(tables:Tables) {
  649. for (let _e of this.rewards) { _e?.resolve(tables); }
  650. }
  651. }
  652. export class Attr {
  653. constructor(_buf_: ByteBuf) {
  654. this.idx = _buf_.ReadInt()
  655. this.type = _buf_.ReadString()
  656. this.showLogic = _buf_.ReadInt()
  657. this.sort = _buf_.ReadInt()
  658. this.icon = _buf_.ReadString()
  659. this.fightFactor = _buf_.ReadFloat()
  660. this.scoreFactor = _buf_.ReadFloat()
  661. this.showType = _buf_.ReadInt()
  662. this.baseValue = _buf_.ReadLongAsNumber()
  663. }
  664. /**
  665. * 序列
  666. */
  667. readonly idx: number
  668. /**
  669. * 属性ID
  670. */
  671. readonly type: string
  672. /**
  673. * 显示逻辑
  674. */
  675. readonly showLogic: number
  676. /**
  677. * 排序
  678. */
  679. readonly sort: number
  680. /**
  681. * 图标
  682. */
  683. readonly icon: string
  684. /**
  685. * 战力系数
  686. */
  687. readonly fightFactor: number
  688. /**
  689. * 评分系数
  690. */
  691. readonly scoreFactor: number
  692. /**
  693. * 显示类型
  694. */
  695. readonly showType: number
  696. /**
  697. * 基础值
  698. */
  699. readonly baseValue: number
  700. resolve(tables:Tables) {
  701. }
  702. }
  703. export class HeroLevel {
  704. constructor(_buf_: ByteBuf) {
  705. this.idx = _buf_.ReadInt()
  706. this.id = _buf_.ReadInt()
  707. this.level = _buf_.ReadInt()
  708. { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.unlockSkill = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = _buf_.ReadInt(); this.unlockSkill.push(_e0);}}
  709. this.unlockSkillDesc = _buf_.ReadString()
  710. { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.upgradeconsume = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = new Common.Cost(_buf_); this.upgradeconsume.push(_e0);}}
  711. this.atk = _buf_.ReadInt()
  712. this.atkSpeed = _buf_.ReadInt()
  713. this.atkRange = _buf_.ReadInt()
  714. }
  715. /**
  716. * 序號
  717. */
  718. readonly idx: number
  719. /**
  720. * 英雄ID
  721. */
  722. readonly id: number
  723. /**
  724. * 等级
  725. */
  726. readonly level: number
  727. /**
  728. * 英雄解锁技能
  729. */
  730. readonly unlockSkill: number[]
  731. /**
  732. * 解锁技能描述
  733. */
  734. readonly unlockSkillDesc: string
  735. /**
  736. * 升级消耗
  737. */
  738. readonly upgradeconsume: Common.Cost[]
  739. /**
  740. * 攻击力
  741. */
  742. readonly atk: number
  743. /**
  744. * 攻击间隔
  745. */
  746. readonly atkSpeed: number
  747. /**
  748. * 攻击间隔
  749. */
  750. readonly atkRange: number
  751. resolve(tables:Tables) {
  752. for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
  753. }
  754. }
  755. /**
  756. * 英雄表.xlsx
  757. */
  758. export class TbHero {
  759. private _dataMap: Map<number, Hero>
  760. private _dataList: Hero[]
  761. constructor(_buf_: ByteBuf) {
  762. this._dataMap = new Map<number, Hero>()
  763. this._dataList = []
  764. for(let n = _buf_.ReadInt(); n > 0; n--) {
  765. let _v: Hero
  766. _v = new Hero(_buf_)
  767. this._dataList.push(_v)
  768. this._dataMap.set(_v.id, _v)
  769. }
  770. }
  771. getDataMap(): Map<number, Hero> { return this._dataMap; }
  772. getDataList(): Hero[] { return this._dataList; }
  773. get(key: number): Hero | undefined {
  774. return this._dataMap.get(key);
  775. }
  776. resolve(tables:Tables) {
  777. for(let data of this._dataList)
  778. {
  779. data.resolve(tables)
  780. }
  781. }
  782. }
  783. /**
  784. * 英雄等级表.xlsx
  785. */
  786. export class TbHeroLevel {
  787. private _dataMap: Map<number, HeroLevel>
  788. private _dataList: HeroLevel[]
  789. constructor(_buf_: ByteBuf) {
  790. this._dataMap = new Map<number, HeroLevel>()
  791. this._dataList = []
  792. for(let n = _buf_.ReadInt(); n > 0; n--) {
  793. let _v: HeroLevel
  794. _v = new HeroLevel(_buf_)
  795. this._dataList.push(_v)
  796. this._dataMap.set(_v.idx, _v)
  797. }
  798. }
  799. getDataMap(): Map<number, HeroLevel> { return this._dataMap; }
  800. getDataList(): HeroLevel[] { return this._dataList; }
  801. get(key: number): HeroLevel | undefined {
  802. return this._dataMap.get(key);
  803. }
  804. resolve(tables:Tables) {
  805. for(let data of this._dataList)
  806. {
  807. data.resolve(tables)
  808. }
  809. }
  810. }
  811. /**
  812. * ZD技能Buff.xlsx
  813. */
  814. export class TbSkillBuff {
  815. private _dataMap: Map<number, SkillBuff>
  816. private _dataList: SkillBuff[]
  817. constructor(_buf_: ByteBuf) {
  818. this._dataMap = new Map<number, SkillBuff>()
  819. this._dataList = []
  820. for(let n = _buf_.ReadInt(); n > 0; n--) {
  821. let _v: SkillBuff
  822. _v = new SkillBuff(_buf_)
  823. this._dataList.push(_v)
  824. this._dataMap.set(_v.idx, _v)
  825. }
  826. }
  827. getDataMap(): Map<number, SkillBuff> { return this._dataMap; }
  828. getDataList(): SkillBuff[] { return this._dataList; }
  829. get(key: number): SkillBuff | undefined {
  830. return this._dataMap.get(key);
  831. }
  832. resolve(tables:Tables) {
  833. for(let data of this._dataList)
  834. {
  835. data.resolve(tables)
  836. }
  837. }
  838. }
  839. /**
  840. * ZD技能表.xlsx
  841. */
  842. export class TbSkill {
  843. private _dataMap: Map<number, Skill>
  844. private _dataList: Skill[]
  845. constructor(_buf_: ByteBuf) {
  846. this._dataMap = new Map<number, Skill>()
  847. this._dataList = []
  848. for(let n = _buf_.ReadInt(); n > 0; n--) {
  849. let _v: Skill
  850. _v = new Skill(_buf_)
  851. this._dataList.push(_v)
  852. this._dataMap.set(_v.skillId, _v)
  853. }
  854. }
  855. getDataMap(): Map<number, Skill> { return this._dataMap; }
  856. getDataList(): Skill[] { return this._dataList; }
  857. get(key: number): Skill | undefined {
  858. return this._dataMap.get(key);
  859. }
  860. resolve(tables:Tables) {
  861. for(let data of this._dataList)
  862. {
  863. data.resolve(tables)
  864. }
  865. }
  866. }
  867. /**
  868. * 波数表.xlsx
  869. */
  870. export class TbWave {
  871. private _dataMap: Map<number, Wave>
  872. private _dataList: Wave[]
  873. constructor(_buf_: ByteBuf) {
  874. this._dataMap = new Map<number, Wave>()
  875. this._dataList = []
  876. for(let n = _buf_.ReadInt(); n > 0; n--) {
  877. let _v: Wave
  878. _v = new Wave(_buf_)
  879. this._dataList.push(_v)
  880. this._dataMap.set(_v.idx, _v)
  881. }
  882. }
  883. getDataMap(): Map<number, Wave> { return this._dataMap; }
  884. getDataList(): Wave[] { return this._dataList; }
  885. get(key: number): Wave | undefined {
  886. return this._dataMap.get(key);
  887. }
  888. resolve(tables:Tables) {
  889. for(let data of this._dataList)
  890. {
  891. data.resolve(tables)
  892. }
  893. }
  894. }
  895. /**
  896. * 波数奖励表.xlsx
  897. */
  898. export class TbWaveRewards {
  899. private _dataMap: Map<number, WaveRewards>
  900. private _dataList: WaveRewards[]
  901. constructor(_buf_: ByteBuf) {
  902. this._dataMap = new Map<number, WaveRewards>()
  903. this._dataList = []
  904. for(let n = _buf_.ReadInt(); n > 0; n--) {
  905. let _v: WaveRewards
  906. _v = new WaveRewards(_buf_)
  907. this._dataList.push(_v)
  908. this._dataMap.set(_v.idx, _v)
  909. }
  910. }
  911. getDataMap(): Map<number, WaveRewards> { return this._dataMap; }
  912. getDataList(): WaveRewards[] { return this._dataList; }
  913. get(key: number): WaveRewards | undefined {
  914. return this._dataMap.get(key);
  915. }
  916. resolve(tables:Tables) {
  917. for(let data of this._dataList)
  918. {
  919. data.resolve(tables)
  920. }
  921. }
  922. }
  923. /**
  924. * 道具表.xlsx
  925. */
  926. export class TbItem {
  927. private _dataMap: Map<number, Item>
  928. private _dataList: Item[]
  929. constructor(_buf_: ByteBuf) {
  930. this._dataMap = new Map<number, Item>()
  931. this._dataList = []
  932. for(let n = _buf_.ReadInt(); n > 0; n--) {
  933. let _v: Item
  934. _v = new Item(_buf_)
  935. this._dataList.push(_v)
  936. this._dataMap.set(_v.idx, _v)
  937. }
  938. }
  939. getDataMap(): Map<number, Item> { return this._dataMap; }
  940. getDataList(): Item[] { return this._dataList; }
  941. get(key: number): Item | undefined {
  942. return this._dataMap.get(key);
  943. }
  944. resolve(tables:Tables) {
  945. for(let data of this._dataList)
  946. {
  947. data.resolve(tables)
  948. }
  949. }
  950. }
  951. /**
  952. * 系统常量表.xlsx
  953. */
  954. export class TbSystem {
  955. private _dataMap: Map<string, System>
  956. private _dataList: System[]
  957. constructor(_buf_: ByteBuf) {
  958. this._dataMap = new Map<string, System>()
  959. this._dataList = []
  960. for(let n = _buf_.ReadInt(); n > 0; n--) {
  961. let _v: System
  962. _v = new System(_buf_)
  963. this._dataList.push(_v)
  964. this._dataMap.set(_v.mainKey, _v)
  965. }
  966. }
  967. getDataMap(): Map<string, System> { return this._dataMap; }
  968. getDataList(): System[] { return this._dataList; }
  969. get(key: string): System | undefined {
  970. return this._dataMap.get(key);
  971. }
  972. resolve(tables:Tables) {
  973. for(let data of this._dataList)
  974. {
  975. data.resolve(tables)
  976. }
  977. }
  978. }
  979. /**
  980. * 英雄品质价值表.xlsx
  981. */
  982. export class TbHeroQualityWorth {
  983. private _dataMap: Map<number, HeroQualityWorth>
  984. private _dataList: HeroQualityWorth[]
  985. constructor(_buf_: ByteBuf) {
  986. this._dataMap = new Map<number, HeroQualityWorth>()
  987. this._dataList = []
  988. for(let n = _buf_.ReadInt(); n > 0; n--) {
  989. let _v: HeroQualityWorth
  990. _v = new HeroQualityWorth(_buf_)
  991. this._dataList.push(_v)
  992. this._dataMap.set(_v.idx, _v)
  993. }
  994. }
  995. getDataMap(): Map<number, HeroQualityWorth> { return this._dataMap; }
  996. getDataList(): HeroQualityWorth[] { return this._dataList; }
  997. get(key: number): HeroQualityWorth | undefined {
  998. return this._dataMap.get(key);
  999. }
  1000. resolve(tables:Tables) {
  1001. for(let data of this._dataList)
  1002. {
  1003. data.resolve(tables)
  1004. }
  1005. }
  1006. }
  1007. /**
  1008. * 战斗召唤权重表.xlsx
  1009. */
  1010. export class TbBattleSummonWeight {
  1011. private _dataMap: Map<number, BattleSummonWeight>
  1012. private _dataList: BattleSummonWeight[]
  1013. constructor(_buf_: ByteBuf) {
  1014. this._dataMap = new Map<number, BattleSummonWeight>()
  1015. this._dataList = []
  1016. for(let n = _buf_.ReadInt(); n > 0; n--) {
  1017. let _v: BattleSummonWeight
  1018. _v = new BattleSummonWeight(_buf_)
  1019. this._dataList.push(_v)
  1020. this._dataMap.set(_v.idx, _v)
  1021. }
  1022. }
  1023. getDataMap(): Map<number, BattleSummonWeight> { return this._dataMap; }
  1024. getDataList(): BattleSummonWeight[] { return this._dataList; }
  1025. get(key: number): BattleSummonWeight | undefined {
  1026. return this._dataMap.get(key);
  1027. }
  1028. resolve(tables:Tables) {
  1029. for(let data of this._dataList)
  1030. {
  1031. data.resolve(tables)
  1032. }
  1033. }
  1034. }
  1035. /**
  1036. * 赌博召唤表.xlsx
  1037. */
  1038. export class TbBattleSpacialSummon {
  1039. private _dataMap: Map<number, BattleSpacialSummon>
  1040. private _dataList: BattleSpacialSummon[]
  1041. constructor(_buf_: ByteBuf) {
  1042. this._dataMap = new Map<number, BattleSpacialSummon>()
  1043. this._dataList = []
  1044. for(let n = _buf_.ReadInt(); n > 0; n--) {
  1045. let _v: BattleSpacialSummon
  1046. _v = new BattleSpacialSummon(_buf_)
  1047. this._dataList.push(_v)
  1048. this._dataMap.set(_v.idx, _v)
  1049. }
  1050. }
  1051. getDataMap(): Map<number, BattleSpacialSummon> { return this._dataMap; }
  1052. getDataList(): BattleSpacialSummon[] { return this._dataList; }
  1053. get(key: number): BattleSpacialSummon | undefined {
  1054. return this._dataMap.get(key);
  1055. }
  1056. resolve(tables:Tables) {
  1057. for(let data of this._dataList)
  1058. {
  1059. data.resolve(tables)
  1060. }
  1061. }
  1062. }
  1063. /**
  1064. * 赌博召唤表.xlsx
  1065. */
  1066. export class TbAttr {
  1067. private _dataMap: Map<number, Attr>
  1068. private _dataList: Attr[]
  1069. constructor(_buf_: ByteBuf) {
  1070. this._dataMap = new Map<number, Attr>()
  1071. this._dataList = []
  1072. for(let n = _buf_.ReadInt(); n > 0; n--) {
  1073. let _v: Attr
  1074. _v = new Attr(_buf_)
  1075. this._dataList.push(_v)
  1076. this._dataMap.set(_v.idx, _v)
  1077. }
  1078. }
  1079. getDataMap(): Map<number, Attr> { return this._dataMap; }
  1080. getDataList(): Attr[] { return this._dataList; }
  1081. get(key: number): Attr | undefined {
  1082. return this._dataMap.get(key);
  1083. }
  1084. resolve(tables:Tables) {
  1085. for(let data of this._dataList)
  1086. {
  1087. data.resolve(tables)
  1088. }
  1089. }
  1090. }
  1091. /**
  1092. * 赌博召唤表.xlsx
  1093. */
  1094. export class TbStrengthenLevel {
  1095. private _dataMap: Map<number, StrengthenLevel>
  1096. private _dataList: StrengthenLevel[]
  1097. constructor(_buf_: ByteBuf) {
  1098. this._dataMap = new Map<number, StrengthenLevel>()
  1099. this._dataList = []
  1100. for(let n = _buf_.ReadInt(); n > 0; n--) {
  1101. let _v: StrengthenLevel
  1102. _v = new StrengthenLevel(_buf_)
  1103. this._dataList.push(_v)
  1104. this._dataMap.set(_v.idx, _v)
  1105. }
  1106. }
  1107. getDataMap(): Map<number, StrengthenLevel> { return this._dataMap; }
  1108. getDataList(): StrengthenLevel[] { return this._dataList; }
  1109. get(key: number): StrengthenLevel | undefined {
  1110. return this._dataMap.get(key);
  1111. }
  1112. resolve(tables:Tables) {
  1113. for(let data of this._dataList)
  1114. {
  1115. data.resolve(tables)
  1116. }
  1117. }
  1118. }
  1119. type ByteBufLoader = (file: string) => ByteBuf
  1120. export class Tables {
  1121. private _TbHero: TbHero
  1122. /**
  1123. * 英雄表.xlsx
  1124. */
  1125. get TbHero(): TbHero { return this._TbHero;}
  1126. private _TbHeroLevel: TbHeroLevel
  1127. /**
  1128. * 英雄等级表.xlsx
  1129. */
  1130. get TbHeroLevel(): TbHeroLevel { return this._TbHeroLevel;}
  1131. private _TbSkillBuff: TbSkillBuff
  1132. /**
  1133. * ZD技能Buff.xlsx
  1134. */
  1135. get TbSkillBuff(): TbSkillBuff { return this._TbSkillBuff;}
  1136. private _TbSkill: TbSkill
  1137. /**
  1138. * ZD技能表.xlsx
  1139. */
  1140. get TbSkill(): TbSkill { return this._TbSkill;}
  1141. private _TbWave: TbWave
  1142. /**
  1143. * 波数表.xlsx
  1144. */
  1145. get TbWave(): TbWave { return this._TbWave;}
  1146. private _TbWaveRewards: TbWaveRewards
  1147. /**
  1148. * 波数奖励表.xlsx
  1149. */
  1150. get TbWaveRewards(): TbWaveRewards { return this._TbWaveRewards;}
  1151. private _TbItem: TbItem
  1152. /**
  1153. * 道具表.xlsx
  1154. */
  1155. get TbItem(): TbItem { return this._TbItem;}
  1156. private _TbSystem: TbSystem
  1157. /**
  1158. * 系统常量表.xlsx
  1159. */
  1160. get TbSystem(): TbSystem { return this._TbSystem;}
  1161. private _TbHeroQualityWorth: TbHeroQualityWorth
  1162. /**
  1163. * 英雄品质价值表.xlsx
  1164. */
  1165. get TbHeroQualityWorth(): TbHeroQualityWorth { return this._TbHeroQualityWorth;}
  1166. private _TbBattleSummonWeight: TbBattleSummonWeight
  1167. /**
  1168. * 战斗召唤权重表.xlsx
  1169. */
  1170. get TbBattleSummonWeight(): TbBattleSummonWeight { return this._TbBattleSummonWeight;}
  1171. private _TbBattleSpacialSummon: TbBattleSpacialSummon
  1172. /**
  1173. * 赌博召唤表.xlsx
  1174. */
  1175. get TbBattleSpacialSummon(): TbBattleSpacialSummon { return this._TbBattleSpacialSummon;}
  1176. private _TbAttr: TbAttr
  1177. /**
  1178. * 赌博召唤表.xlsx
  1179. */
  1180. get TbAttr(): TbAttr { return this._TbAttr;}
  1181. private _TbStrengthenLevel: TbStrengthenLevel
  1182. /**
  1183. * 赌博召唤表.xlsx
  1184. */
  1185. get TbStrengthenLevel(): TbStrengthenLevel { return this._TbStrengthenLevel;}
  1186. static getTableNames(): string[] {
  1187. let names: string[] = [];
  1188. names.push('tbhero');
  1189. names.push('tbherolevel');
  1190. names.push('tbskillbuff');
  1191. names.push('tbskill');
  1192. names.push('tbwave');
  1193. names.push('tbwaverewards');
  1194. names.push('tbitem');
  1195. names.push('tbsystem');
  1196. names.push('tbheroqualityworth');
  1197. names.push('tbbattlesummonweight');
  1198. names.push('tbbattlespacialsummon');
  1199. names.push('tbattr');
  1200. names.push('tbstrengthenlevel');
  1201. return names;
  1202. }
  1203. constructor(loader: ByteBufLoader) {
  1204. this._TbHero = new TbHero(loader('tbhero'))
  1205. this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
  1206. this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
  1207. this._TbSkill = new TbSkill(loader('tbskill'))
  1208. this._TbWave = new TbWave(loader('tbwave'))
  1209. this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
  1210. this._TbItem = new TbItem(loader('tbitem'))
  1211. this._TbSystem = new TbSystem(loader('tbsystem'))
  1212. this._TbHeroQualityWorth = new TbHeroQualityWorth(loader('tbheroqualityworth'))
  1213. this._TbBattleSummonWeight = new TbBattleSummonWeight(loader('tbbattlesummonweight'))
  1214. this._TbBattleSpacialSummon = new TbBattleSpacialSummon(loader('tbbattlespacialsummon'))
  1215. this._TbAttr = new TbAttr(loader('tbattr'))
  1216. this._TbStrengthenLevel = new TbStrengthenLevel(loader('tbstrengthenlevel'))
  1217. this._TbHero.resolve(this)
  1218. this._TbHeroLevel.resolve(this)
  1219. this._TbSkillBuff.resolve(this)
  1220. this._TbSkill.resolve(this)
  1221. this._TbWave.resolve(this)
  1222. this._TbWaveRewards.resolve(this)
  1223. this._TbItem.resolve(this)
  1224. this._TbSystem.resolve(this)
  1225. this._TbHeroQualityWorth.resolve(this)
  1226. this._TbBattleSummonWeight.resolve(this)
  1227. this._TbBattleSpacialSummon.resolve(this)
  1228. this._TbAttr.resolve(this)
  1229. this._TbStrengthenLevel.resolve(this)
  1230. }
  1231. }