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 SkillBuff {
  220. constructor(_buf_: ByteBuf) {
  221. this.idx = _buf_.ReadInt()
  222. this.remark = _buf_.ReadString()
  223. this.type = _buf_.ReadInt()
  224. this.parameters = _buf_.ReadString()
  225. this.probability = _buf_.ReadInt()
  226. this.triggerCondition = _buf_.ReadString()
  227. this.effectType = _buf_.ReadInt()
  228. this.duration = _buf_.ReadInt()
  229. this.overlapTimes = _buf_.ReadInt()
  230. this.uniqueGain = _buf_.ReadBool()
  231. this.halo = _buf_.ReadBool()
  232. this.attributes = _buf_.ReadString()
  233. this.mixBufficon = _buf_.ReadInt()
  234. this.skillShowId = _buf_.ReadInt()
  235. this.floatingTextId = _buf_.ReadInt()
  236. }
  237. /**
  238. * buffid
  239. */
  240. readonly idx: number
  241. /**
  242. * 备注
  243. */
  244. readonly remark: string
  245. /**
  246. * buff类型
  247. */
  248. readonly type: number
  249. /**
  250. * buff参数
  251. */
  252. readonly parameters: string
  253. /**
  254. * 触发概率
  255. */
  256. readonly probability: number
  257. /**
  258. * 触发条件
  259. */
  260. readonly triggerCondition: string
  261. /**
  262. * 效果类型
  263. */
  264. readonly effectType: number
  265. /**
  266. * 持续时间
  267. */
  268. readonly duration: number
  269. /**
  270. * 叠加次数
  271. */
  272. readonly overlapTimes: number
  273. /**
  274. * 唯一增益
  275. */
  276. readonly uniqueGain: boolean
  277. /**
  278. * 是否是光环
  279. */
  280. readonly halo: boolean
  281. /**
  282. * buff增加的属性
  283. */
  284. readonly attributes: string
  285. /**
  286. * 是否合并
  287. */
  288. readonly mixBufficon: number
  289. /**
  290. * 效果id
  291. */
  292. readonly skillShowId: number
  293. /**
  294. * 飘字id
  295. */
  296. readonly floatingTextId: number
  297. resolve(tables:Tables) {
  298. }
  299. }
  300. export class Skill {
  301. constructor(_buf_: ByteBuf) {
  302. this.idx = _buf_.ReadInt()
  303. this.remark = _buf_.ReadString()
  304. this.skillId = _buf_.ReadInt()
  305. this.skillType = _buf_.ReadInt()
  306. this.cd = _buf_.ReadInt()
  307. this.gridRange = _buf_.ReadInt()
  308. this.range = _buf_.ReadInt()
  309. this.triggerCondition = _buf_.ReadString()
  310. this.effects = _buf_.ReadString()
  311. this.buffId = _buf_.ReadString()
  312. this.skillName = _buf_.ReadString()
  313. this.desc = _buf_.ReadString()
  314. this.conflictSkillId = _buf_.ReadInt()
  315. }
  316. /**
  317. * 主键id
  318. */
  319. readonly idx: number
  320. /**
  321. * 备注
  322. */
  323. readonly remark: string
  324. /**
  325. * 技能ID
  326. */
  327. readonly skillId: number
  328. /**
  329. * 类型
  330. */
  331. readonly skillType: number
  332. /**
  333. * 冷却时间
  334. */
  335. readonly cd: number
  336. /**
  337. * 格子范围
  338. */
  339. readonly gridRange: number
  340. /**
  341. * 攻击距离
  342. */
  343. readonly range: number
  344. /**
  345. * 技能触发条件
  346. */
  347. readonly triggerCondition: string
  348. /**
  349. * 效果列表
  350. */
  351. readonly effects: string
  352. /**
  353. * buff
  354. */
  355. readonly buffId: string
  356. /**
  357. * 技能名字
  358. */
  359. readonly skillName: string
  360. /**
  361. * 技能描述
  362. */
  363. readonly desc: string
  364. /**
  365. * 冲突的技能id
  366. */
  367. readonly conflictSkillId: number
  368. resolve(tables:Tables) {
  369. }
  370. }
  371. export class WaveRewards {
  372. constructor(_buf_: ByteBuf) {
  373. this.idx = _buf_.ReadInt()
  374. this.waveMin = _buf_.ReadInt()
  375. this.waveMax = _buf_.ReadInt()
  376. this.level = _buf_.ReadInt()
  377. { 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);}}
  378. }
  379. /**
  380. * idx
  381. */
  382. readonly idx: number
  383. /**
  384. * 波数下限
  385. */
  386. readonly waveMin: number
  387. /**
  388. * 波数上限
  389. */
  390. readonly waveMax: number
  391. /**
  392. * 难度
  393. */
  394. readonly level: number
  395. /**
  396. * 奖励列表
  397. */
  398. readonly rewards: Common.Reward[]
  399. resolve(tables:Tables) {
  400. for (let _e of this.rewards) { _e?.resolve(tables); }
  401. }
  402. }
  403. export class BattleSpacialSummon {
  404. constructor(_buf_: ByteBuf) {
  405. this.idx = _buf_.ReadInt()
  406. this.quality = _buf_.ReadInt()
  407. this.weight = _buf_.ReadInt()
  408. this.costgem = _buf_.ReadInt()
  409. }
  410. /**
  411. * 唯一id
  412. */
  413. readonly idx: number
  414. /**
  415. * 品质
  416. */
  417. readonly quality: Quality
  418. /**
  419. * 权重
  420. */
  421. readonly weight: number
  422. /**
  423. * 消耗宝石数量
  424. */
  425. readonly costgem: number
  426. resolve(tables:Tables) {
  427. }
  428. }
  429. export class System {
  430. constructor(_buf_: ByteBuf) {
  431. this.idx = _buf_.ReadInt()
  432. this.mainKey = _buf_.ReadString()
  433. this.value = _buf_.ReadString()
  434. }
  435. /**
  436. * IDX
  437. */
  438. readonly idx: number
  439. /**
  440. * 常量主键
  441. */
  442. readonly mainKey: string
  443. /**
  444. * 常量值
  445. */
  446. readonly value: string
  447. resolve(tables:Tables) {
  448. }
  449. }
  450. export class HeroQualityWorth {
  451. constructor(_buf_: ByteBuf) {
  452. this.idx = _buf_.ReadInt()
  453. this.quality = _buf_.ReadInt()
  454. this.gold = _buf_.ReadInt()
  455. this.gem = _buf_.ReadInt()
  456. }
  457. /**
  458. * 唯一id
  459. */
  460. readonly idx: number
  461. /**
  462. * 品质
  463. */
  464. readonly quality: Quality
  465. /**
  466. * 局内金币
  467. */
  468. readonly gold: number
  469. /**
  470. * 局内宝石
  471. */
  472. readonly gem: number
  473. resolve(tables:Tables) {
  474. }
  475. }
  476. export class BattleSummonWeight {
  477. constructor(_buf_: ByteBuf) {
  478. this.idx = _buf_.ReadInt()
  479. this.quality = _buf_.ReadInt()
  480. this.weight = _buf_.ReadInt()
  481. }
  482. /**
  483. * 唯一id
  484. */
  485. readonly idx: number
  486. /**
  487. * 品质
  488. */
  489. readonly quality: Quality
  490. /**
  491. * 权重
  492. */
  493. readonly weight: number
  494. resolve(tables:Tables) {
  495. }
  496. }
  497. export class Item {
  498. constructor(_buf_: ByteBuf) {
  499. this.idx = _buf_.ReadInt()
  500. this.type = _buf_.ReadInt()
  501. this.name = _buf_.ReadString()
  502. }
  503. /**
  504. * 道具ID
  505. */
  506. readonly idx: number
  507. /**
  508. * 类型
  509. */
  510. readonly type: number
  511. /**
  512. * 道具名
  513. */
  514. readonly name: string
  515. resolve(tables:Tables) {
  516. }
  517. }
  518. export class Hero {
  519. constructor(_buf_: ByteBuf) {
  520. this.id = _buf_.ReadInt()
  521. this.quality = _buf_.ReadInt()
  522. this.attacktype = _buf_.ReadInt()
  523. this.name = _buf_.ReadString()
  524. { 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);}}
  525. { 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);}}
  526. this.isShow = _buf_.ReadInt()
  527. }
  528. /**
  529. * 英雄ID
  530. */
  531. readonly id: number
  532. /**
  533. * 品质
  534. */
  535. readonly quality: Quality
  536. /**
  537. * 攻击类型
  538. */
  539. readonly attacktype: AttackType
  540. /**
  541. * 名字
  542. */
  543. readonly name: string
  544. /**
  545. * 技能列表
  546. */
  547. readonly skills: number[]
  548. /**
  549. * 合成英雄公式
  550. */
  551. readonly composeheros: number[]
  552. /**
  553. * 是否测试
  554. */
  555. readonly isShow: 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. }