schema.ts 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401
  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 BattleSummonWeight {
  220. constructor(_buf_: ByteBuf) {
  221. this.idx = _buf_.ReadInt()
  222. this.quality = _buf_.ReadInt()
  223. this.weight = _buf_.ReadInt()
  224. }
  225. /**
  226. * 唯一id
  227. */
  228. readonly idx: number
  229. /**
  230. * 品质
  231. */
  232. readonly quality: Quality
  233. /**
  234. * 权重
  235. */
  236. readonly weight: number
  237. resolve(tables:Tables) {
  238. }
  239. }
  240. export class WaveRewards {
  241. constructor(_buf_: ByteBuf) {
  242. this.idx = _buf_.ReadInt()
  243. this.waveMin = _buf_.ReadInt()
  244. this.waveMax = _buf_.ReadInt()
  245. this.level = _buf_.ReadInt()
  246. { 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);}}
  247. }
  248. /**
  249. * idx
  250. */
  251. readonly idx: number
  252. /**
  253. * 波数下限
  254. */
  255. readonly waveMin: number
  256. /**
  257. * 波数上限
  258. */
  259. readonly waveMax: number
  260. /**
  261. * 难度
  262. */
  263. readonly level: number
  264. /**
  265. * 奖励列表
  266. */
  267. readonly rewards: Common.Reward[]
  268. resolve(tables:Tables) {
  269. for (let _e of this.rewards) { _e?.resolve(tables); }
  270. }
  271. }
  272. export class SkillBuff {
  273. constructor(_buf_: ByteBuf) {
  274. this.idx = _buf_.ReadInt()
  275. this.remark = _buf_.ReadString()
  276. this.type = _buf_.ReadInt()
  277. this.parameters = _buf_.ReadString()
  278. this.probability = _buf_.ReadInt()
  279. this.triggerCondition = _buf_.ReadString()
  280. this.effectType = _buf_.ReadInt()
  281. this.duration = _buf_.ReadInt()
  282. this.overlapTimes = _buf_.ReadInt()
  283. this.uniqueGain = _buf_.ReadBool()
  284. this.halo = _buf_.ReadBool()
  285. this.attributes = _buf_.ReadString()
  286. this.mixBufficon = _buf_.ReadInt()
  287. this.skillShowId = _buf_.ReadInt()
  288. this.floatingTextId = _buf_.ReadInt()
  289. }
  290. /**
  291. * buffid
  292. */
  293. readonly idx: number
  294. /**
  295. * 备注
  296. */
  297. readonly remark: string
  298. /**
  299. * buff类型
  300. */
  301. readonly type: number
  302. /**
  303. * buff参数
  304. */
  305. readonly parameters: string
  306. /**
  307. * 触发概率
  308. */
  309. readonly probability: number
  310. /**
  311. * 触发条件
  312. */
  313. readonly triggerCondition: string
  314. /**
  315. * 效果类型
  316. */
  317. readonly effectType: number
  318. /**
  319. * 持续时间
  320. */
  321. readonly duration: number
  322. /**
  323. * 叠加次数
  324. */
  325. readonly overlapTimes: number
  326. /**
  327. * 唯一增益
  328. */
  329. readonly uniqueGain: boolean
  330. /**
  331. * 是否是光环
  332. */
  333. readonly halo: boolean
  334. /**
  335. * buff增加的属性
  336. */
  337. readonly attributes: string
  338. /**
  339. * 是否合并
  340. */
  341. readonly mixBufficon: number
  342. /**
  343. * 效果id
  344. */
  345. readonly skillShowId: number
  346. /**
  347. * 飘字id
  348. */
  349. readonly floatingTextId: number
  350. resolve(tables:Tables) {
  351. }
  352. }
  353. export class BattleSpacialSummon {
  354. constructor(_buf_: ByteBuf) {
  355. this.idx = _buf_.ReadInt()
  356. this.quality = _buf_.ReadInt()
  357. this.weight = _buf_.ReadInt()
  358. this.costgem = _buf_.ReadInt()
  359. }
  360. /**
  361. * 唯一id
  362. */
  363. readonly idx: number
  364. /**
  365. * 品质
  366. */
  367. readonly quality: Quality
  368. /**
  369. * 权重
  370. */
  371. readonly weight: number
  372. /**
  373. * 消耗宝石数量
  374. */
  375. readonly costgem: number
  376. resolve(tables:Tables) {
  377. }
  378. }
  379. export class HeroQualityWorth {
  380. constructor(_buf_: ByteBuf) {
  381. this.idx = _buf_.ReadInt()
  382. this.quality = _buf_.ReadInt()
  383. this.gold = _buf_.ReadInt()
  384. this.gem = _buf_.ReadInt()
  385. }
  386. /**
  387. * 唯一id
  388. */
  389. readonly idx: number
  390. /**
  391. * 品质
  392. */
  393. readonly quality: Quality
  394. /**
  395. * 局内金币
  396. */
  397. readonly gold: number
  398. /**
  399. * 局内宝石
  400. */
  401. readonly gem: number
  402. resolve(tables:Tables) {
  403. }
  404. }
  405. export class Item {
  406. constructor(_buf_: ByteBuf) {
  407. this.idx = _buf_.ReadInt()
  408. this.type = _buf_.ReadInt()
  409. this.name = _buf_.ReadString()
  410. }
  411. /**
  412. * 道具ID
  413. */
  414. readonly idx: number
  415. /**
  416. * 类型
  417. */
  418. readonly type: number
  419. /**
  420. * 道具名
  421. */
  422. readonly name: string
  423. resolve(tables:Tables) {
  424. }
  425. }
  426. export class Wave {
  427. constructor(_buf_: ByteBuf) {
  428. this.idx = _buf_.ReadInt()
  429. this.waveIndex = _buf_.ReadInt()
  430. this.level = _buf_.ReadInt()
  431. this.model = _buf_.ReadInt()
  432. this.counter = _buf_.ReadInt()
  433. this.hp = _buf_.ReadInt()
  434. this.speed = _buf_.ReadInt()
  435. this.gap = _buf_.ReadInt()
  436. this.isboss = _buf_.ReadInt()
  437. this.perAddCoid = _buf_.ReadInt()
  438. this.perAddGem = _buf_.ReadInt()
  439. }
  440. /**
  441. * 唯一id
  442. */
  443. readonly idx: number
  444. /**
  445. * 波数
  446. */
  447. readonly waveIndex: number
  448. /**
  449. * 难度
  450. */
  451. readonly level: number
  452. /**
  453. * 怪物模型
  454. */
  455. readonly model: number
  456. /**
  457. * 数量
  458. */
  459. readonly counter: number
  460. /**
  461. * 血量
  462. */
  463. readonly hp: number
  464. /**
  465. * 速度
  466. */
  467. readonly speed: number
  468. /**
  469. * 间距
  470. */
  471. readonly gap: number
  472. /**
  473. * 是否是boss
  474. */
  475. readonly isboss: number
  476. /**
  477. * 每只怪增加局内金币
  478. */
  479. readonly perAddCoid: number
  480. /**
  481. * 每只怪增加局内宝石
  482. */
  483. readonly perAddGem: number
  484. resolve(tables:Tables) {
  485. }
  486. }
  487. export class Skill {
  488. constructor(_buf_: ByteBuf) {
  489. this.idx = _buf_.ReadInt()
  490. this.remark = _buf_.ReadString()
  491. this.skillId = _buf_.ReadInt()
  492. this.skillType = _buf_.ReadInt()
  493. this.cd = _buf_.ReadInt()
  494. this.gridRange = _buf_.ReadInt()
  495. this.range = _buf_.ReadInt()
  496. this.triggerCondition = _buf_.ReadString()
  497. this.effects = _buf_.ReadString()
  498. this.buffId = _buf_.ReadString()
  499. this.skillName = _buf_.ReadString()
  500. this.desc = _buf_.ReadString()
  501. this.conflictSkillId = _buf_.ReadInt()
  502. }
  503. /**
  504. * 主键id
  505. */
  506. readonly idx: number
  507. /**
  508. * 备注
  509. */
  510. readonly remark: string
  511. /**
  512. * 技能ID
  513. */
  514. readonly skillId: number
  515. /**
  516. * 类型
  517. */
  518. readonly skillType: number
  519. /**
  520. * 冷却时间
  521. */
  522. readonly cd: number
  523. /**
  524. * 格子范围
  525. */
  526. readonly gridRange: number
  527. /**
  528. * 攻击距离
  529. */
  530. readonly range: number
  531. /**
  532. * 技能触发条件
  533. */
  534. readonly triggerCondition: string
  535. /**
  536. * 效果列表
  537. */
  538. readonly effects: string
  539. /**
  540. * buff
  541. */
  542. readonly buffId: string
  543. /**
  544. * 技能名字
  545. */
  546. readonly skillName: string
  547. /**
  548. * 技能描述
  549. */
  550. readonly desc: string
  551. /**
  552. * 冲突的技能id
  553. */
  554. readonly conflictSkillId: number
  555. resolve(tables:Tables) {
  556. }
  557. }
  558. export class Hero {
  559. constructor(_buf_: ByteBuf) {
  560. this.id = _buf_.ReadInt()
  561. this.quality = _buf_.ReadInt()
  562. this.attacktype = _buf_.ReadInt()
  563. this.name = _buf_.ReadString()
  564. { 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);}}
  565. { 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);}}
  566. this.isShow = _buf_.ReadInt()
  567. }
  568. /**
  569. * 英雄ID
  570. */
  571. readonly id: number
  572. /**
  573. * 品质
  574. */
  575. readonly quality: Quality
  576. /**
  577. * 攻击类型
  578. */
  579. readonly attacktype: AttackType
  580. /**
  581. * 名字
  582. */
  583. readonly name: string
  584. /**
  585. * 技能列表
  586. */
  587. readonly skills: number[]
  588. /**
  589. * 合成英雄公式
  590. */
  591. readonly composeheros: number[]
  592. /**
  593. * 是否测试
  594. */
  595. readonly isShow: number
  596. resolve(tables:Tables) {
  597. }
  598. }
  599. export class System {
  600. constructor(_buf_: ByteBuf) {
  601. this.idx = _buf_.ReadInt()
  602. this.mainKey = _buf_.ReadString()
  603. this.value = _buf_.ReadString()
  604. }
  605. /**
  606. * IDX
  607. */
  608. readonly idx: number
  609. /**
  610. * 常量主键
  611. */
  612. readonly mainKey: string
  613. /**
  614. * 常量值
  615. */
  616. readonly value: string
  617. resolve(tables:Tables) {
  618. }
  619. }
  620. export class HeroLevel {
  621. constructor(_buf_: ByteBuf) {
  622. this.idx = _buf_.ReadInt()
  623. this.id = _buf_.ReadInt()
  624. this.level = _buf_.ReadInt()
  625. { 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);}}
  626. this.unlockSkillDesc = _buf_.ReadString()
  627. { 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);}}
  628. this.atk = _buf_.ReadInt()
  629. this.atkSpeed = _buf_.ReadInt()
  630. }
  631. /**
  632. * 序號
  633. */
  634. readonly idx: number
  635. /**
  636. * 英雄ID
  637. */
  638. readonly id: number
  639. /**
  640. * 等级
  641. */
  642. readonly level: number
  643. /**
  644. * 英雄解锁技能
  645. */
  646. readonly unlockSkill: number[]
  647. /**
  648. * 解锁技能描述
  649. */
  650. readonly unlockSkillDesc: string
  651. /**
  652. * 升级消耗
  653. */
  654. readonly upgradeconsume: Common.Cost[]
  655. /**
  656. * 攻击力
  657. */
  658. readonly atk: number
  659. /**
  660. * 攻击间隔
  661. */
  662. readonly atkSpeed: number
  663. resolve(tables:Tables) {
  664. for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
  665. }
  666. }
  667. /**
  668. * 英雄表.xlsx
  669. */
  670. export class TbHero {
  671. private _dataMap: Map<number, Hero>
  672. private _dataList: Hero[]
  673. constructor(_buf_: ByteBuf) {
  674. this._dataMap = new Map<number, Hero>()
  675. this._dataList = []
  676. for(let n = _buf_.ReadInt(); n > 0; n--) {
  677. let _v: Hero
  678. _v = new Hero(_buf_)
  679. this._dataList.push(_v)
  680. this._dataMap.set(_v.id, _v)
  681. }
  682. }
  683. getDataMap(): Map<number, Hero> { return this._dataMap; }
  684. getDataList(): Hero[] { return this._dataList; }
  685. get(key: number): Hero | undefined {
  686. return this._dataMap.get(key);
  687. }
  688. resolve(tables:Tables) {
  689. for(let data of this._dataList)
  690. {
  691. data.resolve(tables)
  692. }
  693. }
  694. }
  695. /**
  696. * 英雄等级表.xlsx
  697. */
  698. export class TbHeroLevel {
  699. private _dataMap: Map<number, HeroLevel>
  700. private _dataList: HeroLevel[]
  701. constructor(_buf_: ByteBuf) {
  702. this._dataMap = new Map<number, HeroLevel>()
  703. this._dataList = []
  704. for(let n = _buf_.ReadInt(); n > 0; n--) {
  705. let _v: HeroLevel
  706. _v = new HeroLevel(_buf_)
  707. this._dataList.push(_v)
  708. this._dataMap.set(_v.idx, _v)
  709. }
  710. }
  711. getDataMap(): Map<number, HeroLevel> { return this._dataMap; }
  712. getDataList(): HeroLevel[] { return this._dataList; }
  713. get(key: number): HeroLevel | undefined {
  714. return this._dataMap.get(key);
  715. }
  716. resolve(tables:Tables) {
  717. for(let data of this._dataList)
  718. {
  719. data.resolve(tables)
  720. }
  721. }
  722. }
  723. /**
  724. * ZD技能Buff.xlsx
  725. */
  726. export class TbSkillBuff {
  727. private _dataMap: Map<number, SkillBuff>
  728. private _dataList: SkillBuff[]
  729. constructor(_buf_: ByteBuf) {
  730. this._dataMap = new Map<number, SkillBuff>()
  731. this._dataList = []
  732. for(let n = _buf_.ReadInt(); n > 0; n--) {
  733. let _v: SkillBuff
  734. _v = new SkillBuff(_buf_)
  735. this._dataList.push(_v)
  736. this._dataMap.set(_v.idx, _v)
  737. }
  738. }
  739. getDataMap(): Map<number, SkillBuff> { return this._dataMap; }
  740. getDataList(): SkillBuff[] { return this._dataList; }
  741. get(key: number): SkillBuff | undefined {
  742. return this._dataMap.get(key);
  743. }
  744. resolve(tables:Tables) {
  745. for(let data of this._dataList)
  746. {
  747. data.resolve(tables)
  748. }
  749. }
  750. }
  751. /**
  752. * ZD技能表.xlsx
  753. */
  754. export class TbSkill {
  755. private _dataMap: Map<number, Skill>
  756. private _dataList: Skill[]
  757. constructor(_buf_: ByteBuf) {
  758. this._dataMap = new Map<number, Skill>()
  759. this._dataList = []
  760. for(let n = _buf_.ReadInt(); n > 0; n--) {
  761. let _v: Skill
  762. _v = new Skill(_buf_)
  763. this._dataList.push(_v)
  764. this._dataMap.set(_v.skillId, _v)
  765. }
  766. }
  767. getDataMap(): Map<number, Skill> { return this._dataMap; }
  768. getDataList(): Skill[] { return this._dataList; }
  769. get(key: number): Skill | undefined {
  770. return this._dataMap.get(key);
  771. }
  772. resolve(tables:Tables) {
  773. for(let data of this._dataList)
  774. {
  775. data.resolve(tables)
  776. }
  777. }
  778. }
  779. /**
  780. * 波数表.xlsx
  781. */
  782. export class TbWave {
  783. private _dataMap: Map<number, Wave>
  784. private _dataList: Wave[]
  785. constructor(_buf_: ByteBuf) {
  786. this._dataMap = new Map<number, Wave>()
  787. this._dataList = []
  788. for(let n = _buf_.ReadInt(); n > 0; n--) {
  789. let _v: Wave
  790. _v = new Wave(_buf_)
  791. this._dataList.push(_v)
  792. this._dataMap.set(_v.idx, _v)
  793. }
  794. }
  795. getDataMap(): Map<number, Wave> { return this._dataMap; }
  796. getDataList(): Wave[] { return this._dataList; }
  797. get(key: number): Wave | undefined {
  798. return this._dataMap.get(key);
  799. }
  800. resolve(tables:Tables) {
  801. for(let data of this._dataList)
  802. {
  803. data.resolve(tables)
  804. }
  805. }
  806. }
  807. /**
  808. * 波数奖励表.xlsx
  809. */
  810. export class TbWaveRewards {
  811. private _dataMap: Map<number, WaveRewards>
  812. private _dataList: WaveRewards[]
  813. constructor(_buf_: ByteBuf) {
  814. this._dataMap = new Map<number, WaveRewards>()
  815. this._dataList = []
  816. for(let n = _buf_.ReadInt(); n > 0; n--) {
  817. let _v: WaveRewards
  818. _v = new WaveRewards(_buf_)
  819. this._dataList.push(_v)
  820. this._dataMap.set(_v.idx, _v)
  821. }
  822. }
  823. getDataMap(): Map<number, WaveRewards> { return this._dataMap; }
  824. getDataList(): WaveRewards[] { return this._dataList; }
  825. get(key: number): WaveRewards | undefined {
  826. return this._dataMap.get(key);
  827. }
  828. resolve(tables:Tables) {
  829. for(let data of this._dataList)
  830. {
  831. data.resolve(tables)
  832. }
  833. }
  834. }
  835. /**
  836. * 道具表.xlsx
  837. */
  838. export class TbItem {
  839. private _dataMap: Map<number, Item>
  840. private _dataList: Item[]
  841. constructor(_buf_: ByteBuf) {
  842. this._dataMap = new Map<number, Item>()
  843. this._dataList = []
  844. for(let n = _buf_.ReadInt(); n > 0; n--) {
  845. let _v: Item
  846. _v = new Item(_buf_)
  847. this._dataList.push(_v)
  848. this._dataMap.set(_v.idx, _v)
  849. }
  850. }
  851. getDataMap(): Map<number, Item> { return this._dataMap; }
  852. getDataList(): Item[] { return this._dataList; }
  853. get(key: number): Item | undefined {
  854. return this._dataMap.get(key);
  855. }
  856. resolve(tables:Tables) {
  857. for(let data of this._dataList)
  858. {
  859. data.resolve(tables)
  860. }
  861. }
  862. }
  863. /**
  864. * 系统常量表.xlsx
  865. */
  866. export class TbSystem {
  867. private _dataMap: Map<string, System>
  868. private _dataList: System[]
  869. constructor(_buf_: ByteBuf) {
  870. this._dataMap = new Map<string, System>()
  871. this._dataList = []
  872. for(let n = _buf_.ReadInt(); n > 0; n--) {
  873. let _v: System
  874. _v = new System(_buf_)
  875. this._dataList.push(_v)
  876. this._dataMap.set(_v.mainKey, _v)
  877. }
  878. }
  879. getDataMap(): Map<string, System> { return this._dataMap; }
  880. getDataList(): System[] { return this._dataList; }
  881. get(key: string): System | undefined {
  882. return this._dataMap.get(key);
  883. }
  884. resolve(tables:Tables) {
  885. for(let data of this._dataList)
  886. {
  887. data.resolve(tables)
  888. }
  889. }
  890. }
  891. /**
  892. * 英雄品质价值表.xlsx
  893. */
  894. export class TbHeroQualityWorth {
  895. private _dataMap: Map<number, HeroQualityWorth>
  896. private _dataList: HeroQualityWorth[]
  897. constructor(_buf_: ByteBuf) {
  898. this._dataMap = new Map<number, HeroQualityWorth>()
  899. this._dataList = []
  900. for(let n = _buf_.ReadInt(); n > 0; n--) {
  901. let _v: HeroQualityWorth
  902. _v = new HeroQualityWorth(_buf_)
  903. this._dataList.push(_v)
  904. this._dataMap.set(_v.idx, _v)
  905. }
  906. }
  907. getDataMap(): Map<number, HeroQualityWorth> { return this._dataMap; }
  908. getDataList(): HeroQualityWorth[] { return this._dataList; }
  909. get(key: number): HeroQualityWorth | undefined {
  910. return this._dataMap.get(key);
  911. }
  912. resolve(tables:Tables) {
  913. for(let data of this._dataList)
  914. {
  915. data.resolve(tables)
  916. }
  917. }
  918. }
  919. /**
  920. * 战斗召唤权重表.xlsx
  921. */
  922. export class TbBattleSummonWeight {
  923. private _dataMap: Map<number, BattleSummonWeight>
  924. private _dataList: BattleSummonWeight[]
  925. constructor(_buf_: ByteBuf) {
  926. this._dataMap = new Map<number, BattleSummonWeight>()
  927. this._dataList = []
  928. for(let n = _buf_.ReadInt(); n > 0; n--) {
  929. let _v: BattleSummonWeight
  930. _v = new BattleSummonWeight(_buf_)
  931. this._dataList.push(_v)
  932. this._dataMap.set(_v.idx, _v)
  933. }
  934. }
  935. getDataMap(): Map<number, BattleSummonWeight> { return this._dataMap; }
  936. getDataList(): BattleSummonWeight[] { return this._dataList; }
  937. get(key: number): BattleSummonWeight | undefined {
  938. return this._dataMap.get(key);
  939. }
  940. resolve(tables:Tables) {
  941. for(let data of this._dataList)
  942. {
  943. data.resolve(tables)
  944. }
  945. }
  946. }
  947. /**
  948. * 赌博召唤表.xlsx
  949. */
  950. export class TbBattleSpacialSummon {
  951. private _dataMap: Map<number, BattleSpacialSummon>
  952. private _dataList: BattleSpacialSummon[]
  953. constructor(_buf_: ByteBuf) {
  954. this._dataMap = new Map<number, BattleSpacialSummon>()
  955. this._dataList = []
  956. for(let n = _buf_.ReadInt(); n > 0; n--) {
  957. let _v: BattleSpacialSummon
  958. _v = new BattleSpacialSummon(_buf_)
  959. this._dataList.push(_v)
  960. this._dataMap.set(_v.idx, _v)
  961. }
  962. }
  963. getDataMap(): Map<number, BattleSpacialSummon> { return this._dataMap; }
  964. getDataList(): BattleSpacialSummon[] { return this._dataList; }
  965. get(key: number): BattleSpacialSummon | undefined {
  966. return this._dataMap.get(key);
  967. }
  968. resolve(tables:Tables) {
  969. for(let data of this._dataList)
  970. {
  971. data.resolve(tables)
  972. }
  973. }
  974. }
  975. type ByteBufLoader = (file: string) => ByteBuf
  976. export class Tables {
  977. private _TbHero: TbHero
  978. /**
  979. * 英雄表.xlsx
  980. */
  981. get TbHero(): TbHero { return this._TbHero;}
  982. private _TbHeroLevel: TbHeroLevel
  983. /**
  984. * 英雄等级表.xlsx
  985. */
  986. get TbHeroLevel(): TbHeroLevel { return this._TbHeroLevel;}
  987. private _TbSkillBuff: TbSkillBuff
  988. /**
  989. * ZD技能Buff.xlsx
  990. */
  991. get TbSkillBuff(): TbSkillBuff { return this._TbSkillBuff;}
  992. private _TbSkill: TbSkill
  993. /**
  994. * ZD技能表.xlsx
  995. */
  996. get TbSkill(): TbSkill { return this._TbSkill;}
  997. private _TbWave: TbWave
  998. /**
  999. * 波数表.xlsx
  1000. */
  1001. get TbWave(): TbWave { return this._TbWave;}
  1002. private _TbWaveRewards: TbWaveRewards
  1003. /**
  1004. * 波数奖励表.xlsx
  1005. */
  1006. get TbWaveRewards(): TbWaveRewards { return this._TbWaveRewards;}
  1007. private _TbItem: TbItem
  1008. /**
  1009. * 道具表.xlsx
  1010. */
  1011. get TbItem(): TbItem { return this._TbItem;}
  1012. private _TbSystem: TbSystem
  1013. /**
  1014. * 系统常量表.xlsx
  1015. */
  1016. get TbSystem(): TbSystem { return this._TbSystem;}
  1017. private _TbHeroQualityWorth: TbHeroQualityWorth
  1018. /**
  1019. * 英雄品质价值表.xlsx
  1020. */
  1021. get TbHeroQualityWorth(): TbHeroQualityWorth { return this._TbHeroQualityWorth;}
  1022. private _TbBattleSummonWeight: TbBattleSummonWeight
  1023. /**
  1024. * 战斗召唤权重表.xlsx
  1025. */
  1026. get TbBattleSummonWeight(): TbBattleSummonWeight { return this._TbBattleSummonWeight;}
  1027. private _TbBattleSpacialSummon: TbBattleSpacialSummon
  1028. /**
  1029. * 赌博召唤表.xlsx
  1030. */
  1031. get TbBattleSpacialSummon(): TbBattleSpacialSummon { return this._TbBattleSpacialSummon;}
  1032. static getTableNames(): string[] {
  1033. let names: string[] = [];
  1034. names.push('tbhero');
  1035. names.push('tbherolevel');
  1036. names.push('tbskillbuff');
  1037. names.push('tbskill');
  1038. names.push('tbwave');
  1039. names.push('tbwaverewards');
  1040. names.push('tbitem');
  1041. names.push('tbsystem');
  1042. names.push('tbheroqualityworth');
  1043. names.push('tbbattlesummonweight');
  1044. names.push('tbbattlespacialsummon');
  1045. return names;
  1046. }
  1047. constructor(loader: ByteBufLoader) {
  1048. this._TbHero = new TbHero(loader('tbhero'))
  1049. this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
  1050. this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
  1051. this._TbSkill = new TbSkill(loader('tbskill'))
  1052. this._TbWave = new TbWave(loader('tbwave'))
  1053. this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
  1054. this._TbItem = new TbItem(loader('tbitem'))
  1055. this._TbSystem = new TbSystem(loader('tbsystem'))
  1056. this._TbHeroQualityWorth = new TbHeroQualityWorth(loader('tbheroqualityworth'))
  1057. this._TbBattleSummonWeight = new TbBattleSummonWeight(loader('tbbattlesummonweight'))
  1058. this._TbBattleSpacialSummon = new TbBattleSpacialSummon(loader('tbbattlespacialsummon'))
  1059. this._TbHero.resolve(this)
  1060. this._TbHeroLevel.resolve(this)
  1061. this._TbSkillBuff.resolve(this)
  1062. this._TbSkill.resolve(this)
  1063. this._TbWave.resolve(this)
  1064. this._TbWaveRewards.resolve(this)
  1065. this._TbItem.resolve(this)
  1066. this._TbSystem.resolve(this)
  1067. this._TbHeroQualityWorth.resolve(this)
  1068. this._TbBattleSummonWeight.resolve(this)
  1069. this._TbBattleSpacialSummon.resolve(this)
  1070. }
  1071. }