schema.ts 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407
  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 BattleSummonWeight {
  301. constructor(_buf_: ByteBuf) {
  302. this.idx = _buf_.ReadInt()
  303. this.quality = _buf_.ReadInt()
  304. this.weight = _buf_.ReadInt()
  305. }
  306. /**
  307. * 唯一id
  308. */
  309. readonly idx: number
  310. /**
  311. * 品质
  312. */
  313. readonly quality: Quality
  314. /**
  315. * 权重
  316. */
  317. readonly weight: number
  318. resolve(tables:Tables) {
  319. }
  320. }
  321. export class HeroQualityWorth {
  322. constructor(_buf_: ByteBuf) {
  323. this.idx = _buf_.ReadInt()
  324. this.quality = _buf_.ReadInt()
  325. this.gold = _buf_.ReadInt()
  326. this.gem = _buf_.ReadInt()
  327. }
  328. /**
  329. * 唯一id
  330. */
  331. readonly idx: number
  332. /**
  333. * 品质
  334. */
  335. readonly quality: Quality
  336. /**
  337. * 局内金币
  338. */
  339. readonly gold: number
  340. /**
  341. * 局内宝石
  342. */
  343. readonly gem: number
  344. resolve(tables:Tables) {
  345. }
  346. }
  347. export class Item {
  348. constructor(_buf_: ByteBuf) {
  349. this.idx = _buf_.ReadInt()
  350. this.type = _buf_.ReadInt()
  351. this.name = _buf_.ReadString()
  352. }
  353. /**
  354. * 道具ID
  355. */
  356. readonly idx: number
  357. /**
  358. * 类型
  359. */
  360. readonly type: number
  361. /**
  362. * 道具名
  363. */
  364. readonly name: string
  365. resolve(tables:Tables) {
  366. }
  367. }
  368. export class System {
  369. constructor(_buf_: ByteBuf) {
  370. this.idx = _buf_.ReadInt()
  371. this.mainKey = _buf_.ReadString()
  372. this.value = _buf_.ReadString()
  373. }
  374. /**
  375. * IDX
  376. */
  377. readonly idx: number
  378. /**
  379. * 常量主键
  380. */
  381. readonly mainKey: string
  382. /**
  383. * 常量值
  384. */
  385. readonly value: string
  386. resolve(tables:Tables) {
  387. }
  388. }
  389. export class Skill {
  390. constructor(_buf_: ByteBuf) {
  391. this.idx = _buf_.ReadInt()
  392. this.remark = _buf_.ReadString()
  393. this.skillId = _buf_.ReadInt()
  394. this.skillType = _buf_.ReadInt()
  395. this.cd = _buf_.ReadInt()
  396. this.gridRange = _buf_.ReadInt()
  397. this.range = _buf_.ReadInt()
  398. this.triggerCondition = _buf_.ReadString()
  399. this.effects = _buf_.ReadString()
  400. this.buffId = _buf_.ReadString()
  401. this.skillName = _buf_.ReadString()
  402. this.desc = _buf_.ReadString()
  403. this.conflictSkillId = _buf_.ReadInt()
  404. }
  405. /**
  406. * 主键id
  407. */
  408. readonly idx: number
  409. /**
  410. * 备注
  411. */
  412. readonly remark: string
  413. /**
  414. * 技能ID
  415. */
  416. readonly skillId: number
  417. /**
  418. * 类型
  419. */
  420. readonly skillType: number
  421. /**
  422. * 冷却时间
  423. */
  424. readonly cd: number
  425. /**
  426. * 格子范围
  427. */
  428. readonly gridRange: number
  429. /**
  430. * 攻击距离
  431. */
  432. readonly range: number
  433. /**
  434. * 技能触发条件
  435. */
  436. readonly triggerCondition: string
  437. /**
  438. * 效果列表
  439. */
  440. readonly effects: string
  441. /**
  442. * buff
  443. */
  444. readonly buffId: string
  445. /**
  446. * 技能名字
  447. */
  448. readonly skillName: string
  449. /**
  450. * 技能描述
  451. */
  452. readonly desc: string
  453. /**
  454. * 冲突的技能id
  455. */
  456. readonly conflictSkillId: number
  457. resolve(tables:Tables) {
  458. }
  459. }
  460. export class WaveRewards {
  461. constructor(_buf_: ByteBuf) {
  462. this.idx = _buf_.ReadInt()
  463. this.waveMin = _buf_.ReadInt()
  464. this.waveMax = _buf_.ReadInt()
  465. this.level = _buf_.ReadInt()
  466. { 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);}}
  467. }
  468. /**
  469. * idx
  470. */
  471. readonly idx: number
  472. /**
  473. * 波数下限
  474. */
  475. readonly waveMin: number
  476. /**
  477. * 波数上限
  478. */
  479. readonly waveMax: number
  480. /**
  481. * 难度
  482. */
  483. readonly level: number
  484. /**
  485. * 奖励列表
  486. */
  487. readonly rewards: Common.Reward[]
  488. resolve(tables:Tables) {
  489. for (let _e of this.rewards) { _e?.resolve(tables); }
  490. }
  491. }
  492. export class BattleSpacialSummon {
  493. constructor(_buf_: ByteBuf) {
  494. this.idx = _buf_.ReadInt()
  495. this.quality = _buf_.ReadInt()
  496. this.weight = _buf_.ReadInt()
  497. this.costgem = _buf_.ReadInt()
  498. }
  499. /**
  500. * 唯一id
  501. */
  502. readonly idx: number
  503. /**
  504. * 品质
  505. */
  506. readonly quality: Quality
  507. /**
  508. * 权重
  509. */
  510. readonly weight: number
  511. /**
  512. * 消耗宝石数量
  513. */
  514. readonly costgem: number
  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 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. this.atkRange = _buf_.ReadInt()
  631. }
  632. /**
  633. * 序號
  634. */
  635. readonly idx: number
  636. /**
  637. * 英雄ID
  638. */
  639. readonly id: number
  640. /**
  641. * 等级
  642. */
  643. readonly level: number
  644. /**
  645. * 英雄解锁技能
  646. */
  647. readonly unlockSkill: number[]
  648. /**
  649. * 解锁技能描述
  650. */
  651. readonly unlockSkillDesc: string
  652. /**
  653. * 升级消耗
  654. */
  655. readonly upgradeconsume: Common.Cost[]
  656. /**
  657. * 攻击力
  658. */
  659. readonly atk: number
  660. /**
  661. * 攻击间隔
  662. */
  663. readonly atkSpeed: number
  664. /**
  665. * 攻击间隔
  666. */
  667. readonly atkRange: number
  668. resolve(tables:Tables) {
  669. for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
  670. }
  671. }
  672. /**
  673. * 英雄表.xlsx
  674. */
  675. export class TbHero {
  676. private _dataMap: Map<number, Hero>
  677. private _dataList: Hero[]
  678. constructor(_buf_: ByteBuf) {
  679. this._dataMap = new Map<number, Hero>()
  680. this._dataList = []
  681. for(let n = _buf_.ReadInt(); n > 0; n--) {
  682. let _v: Hero
  683. _v = new Hero(_buf_)
  684. this._dataList.push(_v)
  685. this._dataMap.set(_v.id, _v)
  686. }
  687. }
  688. getDataMap(): Map<number, Hero> { return this._dataMap; }
  689. getDataList(): Hero[] { return this._dataList; }
  690. get(key: number): Hero | undefined {
  691. return this._dataMap.get(key);
  692. }
  693. resolve(tables:Tables) {
  694. for(let data of this._dataList)
  695. {
  696. data.resolve(tables)
  697. }
  698. }
  699. }
  700. /**
  701. * 英雄等级表.xlsx
  702. */
  703. export class TbHeroLevel {
  704. private _dataMap: Map<number, HeroLevel>
  705. private _dataList: HeroLevel[]
  706. constructor(_buf_: ByteBuf) {
  707. this._dataMap = new Map<number, HeroLevel>()
  708. this._dataList = []
  709. for(let n = _buf_.ReadInt(); n > 0; n--) {
  710. let _v: HeroLevel
  711. _v = new HeroLevel(_buf_)
  712. this._dataList.push(_v)
  713. this._dataMap.set(_v.idx, _v)
  714. }
  715. }
  716. getDataMap(): Map<number, HeroLevel> { return this._dataMap; }
  717. getDataList(): HeroLevel[] { return this._dataList; }
  718. get(key: number): HeroLevel | undefined {
  719. return this._dataMap.get(key);
  720. }
  721. resolve(tables:Tables) {
  722. for(let data of this._dataList)
  723. {
  724. data.resolve(tables)
  725. }
  726. }
  727. }
  728. /**
  729. * ZD技能Buff.xlsx
  730. */
  731. export class TbSkillBuff {
  732. private _dataMap: Map<number, SkillBuff>
  733. private _dataList: SkillBuff[]
  734. constructor(_buf_: ByteBuf) {
  735. this._dataMap = new Map<number, SkillBuff>()
  736. this._dataList = []
  737. for(let n = _buf_.ReadInt(); n > 0; n--) {
  738. let _v: SkillBuff
  739. _v = new SkillBuff(_buf_)
  740. this._dataList.push(_v)
  741. this._dataMap.set(_v.idx, _v)
  742. }
  743. }
  744. getDataMap(): Map<number, SkillBuff> { return this._dataMap; }
  745. getDataList(): SkillBuff[] { return this._dataList; }
  746. get(key: number): SkillBuff | undefined {
  747. return this._dataMap.get(key);
  748. }
  749. resolve(tables:Tables) {
  750. for(let data of this._dataList)
  751. {
  752. data.resolve(tables)
  753. }
  754. }
  755. }
  756. /**
  757. * ZD技能表.xlsx
  758. */
  759. export class TbSkill {
  760. private _dataMap: Map<number, Skill>
  761. private _dataList: Skill[]
  762. constructor(_buf_: ByteBuf) {
  763. this._dataMap = new Map<number, Skill>()
  764. this._dataList = []
  765. for(let n = _buf_.ReadInt(); n > 0; n--) {
  766. let _v: Skill
  767. _v = new Skill(_buf_)
  768. this._dataList.push(_v)
  769. this._dataMap.set(_v.skillId, _v)
  770. }
  771. }
  772. getDataMap(): Map<number, Skill> { return this._dataMap; }
  773. getDataList(): Skill[] { return this._dataList; }
  774. get(key: number): Skill | undefined {
  775. return this._dataMap.get(key);
  776. }
  777. resolve(tables:Tables) {
  778. for(let data of this._dataList)
  779. {
  780. data.resolve(tables)
  781. }
  782. }
  783. }
  784. /**
  785. * 波数表.xlsx
  786. */
  787. export class TbWave {
  788. private _dataMap: Map<number, Wave>
  789. private _dataList: Wave[]
  790. constructor(_buf_: ByteBuf) {
  791. this._dataMap = new Map<number, Wave>()
  792. this._dataList = []
  793. for(let n = _buf_.ReadInt(); n > 0; n--) {
  794. let _v: Wave
  795. _v = new Wave(_buf_)
  796. this._dataList.push(_v)
  797. this._dataMap.set(_v.idx, _v)
  798. }
  799. }
  800. getDataMap(): Map<number, Wave> { return this._dataMap; }
  801. getDataList(): Wave[] { return this._dataList; }
  802. get(key: number): Wave | undefined {
  803. return this._dataMap.get(key);
  804. }
  805. resolve(tables:Tables) {
  806. for(let data of this._dataList)
  807. {
  808. data.resolve(tables)
  809. }
  810. }
  811. }
  812. /**
  813. * 波数奖励表.xlsx
  814. */
  815. export class TbWaveRewards {
  816. private _dataMap: Map<number, WaveRewards>
  817. private _dataList: WaveRewards[]
  818. constructor(_buf_: ByteBuf) {
  819. this._dataMap = new Map<number, WaveRewards>()
  820. this._dataList = []
  821. for(let n = _buf_.ReadInt(); n > 0; n--) {
  822. let _v: WaveRewards
  823. _v = new WaveRewards(_buf_)
  824. this._dataList.push(_v)
  825. this._dataMap.set(_v.idx, _v)
  826. }
  827. }
  828. getDataMap(): Map<number, WaveRewards> { return this._dataMap; }
  829. getDataList(): WaveRewards[] { return this._dataList; }
  830. get(key: number): WaveRewards | undefined {
  831. return this._dataMap.get(key);
  832. }
  833. resolve(tables:Tables) {
  834. for(let data of this._dataList)
  835. {
  836. data.resolve(tables)
  837. }
  838. }
  839. }
  840. /**
  841. * 道具表.xlsx
  842. */
  843. export class TbItem {
  844. private _dataMap: Map<number, Item>
  845. private _dataList: Item[]
  846. constructor(_buf_: ByteBuf) {
  847. this._dataMap = new Map<number, Item>()
  848. this._dataList = []
  849. for(let n = _buf_.ReadInt(); n > 0; n--) {
  850. let _v: Item
  851. _v = new Item(_buf_)
  852. this._dataList.push(_v)
  853. this._dataMap.set(_v.idx, _v)
  854. }
  855. }
  856. getDataMap(): Map<number, Item> { return this._dataMap; }
  857. getDataList(): Item[] { return this._dataList; }
  858. get(key: number): Item | undefined {
  859. return this._dataMap.get(key);
  860. }
  861. resolve(tables:Tables) {
  862. for(let data of this._dataList)
  863. {
  864. data.resolve(tables)
  865. }
  866. }
  867. }
  868. /**
  869. * 系统常量表.xlsx
  870. */
  871. export class TbSystem {
  872. private _dataMap: Map<string, System>
  873. private _dataList: System[]
  874. constructor(_buf_: ByteBuf) {
  875. this._dataMap = new Map<string, System>()
  876. this._dataList = []
  877. for(let n = _buf_.ReadInt(); n > 0; n--) {
  878. let _v: System
  879. _v = new System(_buf_)
  880. this._dataList.push(_v)
  881. this._dataMap.set(_v.mainKey, _v)
  882. }
  883. }
  884. getDataMap(): Map<string, System> { return this._dataMap; }
  885. getDataList(): System[] { return this._dataList; }
  886. get(key: string): System | undefined {
  887. return this._dataMap.get(key);
  888. }
  889. resolve(tables:Tables) {
  890. for(let data of this._dataList)
  891. {
  892. data.resolve(tables)
  893. }
  894. }
  895. }
  896. /**
  897. * 英雄品质价值表.xlsx
  898. */
  899. export class TbHeroQualityWorth {
  900. private _dataMap: Map<number, HeroQualityWorth>
  901. private _dataList: HeroQualityWorth[]
  902. constructor(_buf_: ByteBuf) {
  903. this._dataMap = new Map<number, HeroQualityWorth>()
  904. this._dataList = []
  905. for(let n = _buf_.ReadInt(); n > 0; n--) {
  906. let _v: HeroQualityWorth
  907. _v = new HeroQualityWorth(_buf_)
  908. this._dataList.push(_v)
  909. this._dataMap.set(_v.idx, _v)
  910. }
  911. }
  912. getDataMap(): Map<number, HeroQualityWorth> { return this._dataMap; }
  913. getDataList(): HeroQualityWorth[] { return this._dataList; }
  914. get(key: number): HeroQualityWorth | undefined {
  915. return this._dataMap.get(key);
  916. }
  917. resolve(tables:Tables) {
  918. for(let data of this._dataList)
  919. {
  920. data.resolve(tables)
  921. }
  922. }
  923. }
  924. /**
  925. * 战斗召唤权重表.xlsx
  926. */
  927. export class TbBattleSummonWeight {
  928. private _dataMap: Map<number, BattleSummonWeight>
  929. private _dataList: BattleSummonWeight[]
  930. constructor(_buf_: ByteBuf) {
  931. this._dataMap = new Map<number, BattleSummonWeight>()
  932. this._dataList = []
  933. for(let n = _buf_.ReadInt(); n > 0; n--) {
  934. let _v: BattleSummonWeight
  935. _v = new BattleSummonWeight(_buf_)
  936. this._dataList.push(_v)
  937. this._dataMap.set(_v.idx, _v)
  938. }
  939. }
  940. getDataMap(): Map<number, BattleSummonWeight> { return this._dataMap; }
  941. getDataList(): BattleSummonWeight[] { return this._dataList; }
  942. get(key: number): BattleSummonWeight | undefined {
  943. return this._dataMap.get(key);
  944. }
  945. resolve(tables:Tables) {
  946. for(let data of this._dataList)
  947. {
  948. data.resolve(tables)
  949. }
  950. }
  951. }
  952. /**
  953. * 赌博召唤表.xlsx
  954. */
  955. export class TbBattleSpacialSummon {
  956. private _dataMap: Map<number, BattleSpacialSummon>
  957. private _dataList: BattleSpacialSummon[]
  958. constructor(_buf_: ByteBuf) {
  959. this._dataMap = new Map<number, BattleSpacialSummon>()
  960. this._dataList = []
  961. for(let n = _buf_.ReadInt(); n > 0; n--) {
  962. let _v: BattleSpacialSummon
  963. _v = new BattleSpacialSummon(_buf_)
  964. this._dataList.push(_v)
  965. this._dataMap.set(_v.idx, _v)
  966. }
  967. }
  968. getDataMap(): Map<number, BattleSpacialSummon> { return this._dataMap; }
  969. getDataList(): BattleSpacialSummon[] { return this._dataList; }
  970. get(key: number): BattleSpacialSummon | undefined {
  971. return this._dataMap.get(key);
  972. }
  973. resolve(tables:Tables) {
  974. for(let data of this._dataList)
  975. {
  976. data.resolve(tables)
  977. }
  978. }
  979. }
  980. type ByteBufLoader = (file: string) => ByteBuf
  981. export class Tables {
  982. private _TbHero: TbHero
  983. /**
  984. * 英雄表.xlsx
  985. */
  986. get TbHero(): TbHero { return this._TbHero;}
  987. private _TbHeroLevel: TbHeroLevel
  988. /**
  989. * 英雄等级表.xlsx
  990. */
  991. get TbHeroLevel(): TbHeroLevel { return this._TbHeroLevel;}
  992. private _TbSkillBuff: TbSkillBuff
  993. /**
  994. * ZD技能Buff.xlsx
  995. */
  996. get TbSkillBuff(): TbSkillBuff { return this._TbSkillBuff;}
  997. private _TbSkill: TbSkill
  998. /**
  999. * ZD技能表.xlsx
  1000. */
  1001. get TbSkill(): TbSkill { return this._TbSkill;}
  1002. private _TbWave: TbWave
  1003. /**
  1004. * 波数表.xlsx
  1005. */
  1006. get TbWave(): TbWave { return this._TbWave;}
  1007. private _TbWaveRewards: TbWaveRewards
  1008. /**
  1009. * 波数奖励表.xlsx
  1010. */
  1011. get TbWaveRewards(): TbWaveRewards { return this._TbWaveRewards;}
  1012. private _TbItem: TbItem
  1013. /**
  1014. * 道具表.xlsx
  1015. */
  1016. get TbItem(): TbItem { return this._TbItem;}
  1017. private _TbSystem: TbSystem
  1018. /**
  1019. * 系统常量表.xlsx
  1020. */
  1021. get TbSystem(): TbSystem { return this._TbSystem;}
  1022. private _TbHeroQualityWorth: TbHeroQualityWorth
  1023. /**
  1024. * 英雄品质价值表.xlsx
  1025. */
  1026. get TbHeroQualityWorth(): TbHeroQualityWorth { return this._TbHeroQualityWorth;}
  1027. private _TbBattleSummonWeight: TbBattleSummonWeight
  1028. /**
  1029. * 战斗召唤权重表.xlsx
  1030. */
  1031. get TbBattleSummonWeight(): TbBattleSummonWeight { return this._TbBattleSummonWeight;}
  1032. private _TbBattleSpacialSummon: TbBattleSpacialSummon
  1033. /**
  1034. * 赌博召唤表.xlsx
  1035. */
  1036. get TbBattleSpacialSummon(): TbBattleSpacialSummon { return this._TbBattleSpacialSummon;}
  1037. static getTableNames(): string[] {
  1038. let names: string[] = [];
  1039. names.push('tbhero');
  1040. names.push('tbherolevel');
  1041. names.push('tbskillbuff');
  1042. names.push('tbskill');
  1043. names.push('tbwave');
  1044. names.push('tbwaverewards');
  1045. names.push('tbitem');
  1046. names.push('tbsystem');
  1047. names.push('tbheroqualityworth');
  1048. names.push('tbbattlesummonweight');
  1049. names.push('tbbattlespacialsummon');
  1050. return names;
  1051. }
  1052. constructor(loader: ByteBufLoader) {
  1053. this._TbHero = new TbHero(loader('tbhero'))
  1054. this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
  1055. this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
  1056. this._TbSkill = new TbSkill(loader('tbskill'))
  1057. this._TbWave = new TbWave(loader('tbwave'))
  1058. this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
  1059. this._TbItem = new TbItem(loader('tbitem'))
  1060. this._TbSystem = new TbSystem(loader('tbsystem'))
  1061. this._TbHeroQualityWorth = new TbHeroQualityWorth(loader('tbheroqualityworth'))
  1062. this._TbBattleSummonWeight = new TbBattleSummonWeight(loader('tbbattlesummonweight'))
  1063. this._TbBattleSpacialSummon = new TbBattleSpacialSummon(loader('tbbattlespacialsummon'))
  1064. this._TbHero.resolve(this)
  1065. this._TbHeroLevel.resolve(this)
  1066. this._TbSkillBuff.resolve(this)
  1067. this._TbSkill.resolve(this)
  1068. this._TbWave.resolve(this)
  1069. this._TbWaveRewards.resolve(this)
  1070. this._TbItem.resolve(this)
  1071. this._TbSystem.resolve(this)
  1072. this._TbHeroQualityWorth.resolve(this)
  1073. this._TbBattleSummonWeight.resolve(this)
  1074. this._TbBattleSpacialSummon.resolve(this)
  1075. }
  1076. }