schema.ts 21 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138
  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 Hero {
  220. constructor(_buf_: ByteBuf) {
  221. this.id = _buf_.ReadInt()
  222. this.quality = _buf_.ReadInt()
  223. this.attacktype = _buf_.ReadInt()
  224. this.name = _buf_.ReadString()
  225. { 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);}}
  226. }
  227. /**
  228. * 英雄ID
  229. */
  230. readonly id: number
  231. /**
  232. * 品质
  233. */
  234. readonly quality: Quality
  235. /**
  236. * 攻击类型
  237. */
  238. readonly attacktype: AttackType
  239. /**
  240. * 名字
  241. */
  242. readonly name: string
  243. /**
  244. * 技能列表
  245. */
  246. readonly skills: number[]
  247. resolve(tables:Tables) {
  248. }
  249. }
  250. export class SkillBuff {
  251. constructor(_buf_: ByteBuf) {
  252. this.idx = _buf_.ReadInt()
  253. this.remark = _buf_.ReadString()
  254. this.type = _buf_.ReadInt()
  255. this.parameters = _buf_.ReadString()
  256. this.probability = _buf_.ReadInt()
  257. this.triggerCondition = _buf_.ReadString()
  258. this.effectType = _buf_.ReadInt()
  259. this.duration = _buf_.ReadInt()
  260. this.overlapTimes = _buf_.ReadInt()
  261. this.uniqueGain = _buf_.ReadBool()
  262. this.halo = _buf_.ReadBool()
  263. this.attributes = _buf_.ReadString()
  264. this.mixBufficon = _buf_.ReadInt()
  265. this.skillShowId = _buf_.ReadInt()
  266. this.floatingTextId = _buf_.ReadInt()
  267. }
  268. /**
  269. * buffid
  270. */
  271. readonly idx: number
  272. /**
  273. * 备注
  274. */
  275. readonly remark: string
  276. /**
  277. * buff类型
  278. */
  279. readonly type: number
  280. /**
  281. * buff参数
  282. */
  283. readonly parameters: string
  284. /**
  285. * 触发概率
  286. */
  287. readonly probability: number
  288. /**
  289. * 触发条件
  290. */
  291. readonly triggerCondition: string
  292. /**
  293. * 效果类型
  294. */
  295. readonly effectType: number
  296. /**
  297. * 持续时间
  298. */
  299. readonly duration: number
  300. /**
  301. * 叠加次数
  302. */
  303. readonly overlapTimes: number
  304. /**
  305. * 唯一增益
  306. */
  307. readonly uniqueGain: boolean
  308. /**
  309. * 是否是光环
  310. */
  311. readonly halo: boolean
  312. /**
  313. * buff增加的属性
  314. */
  315. readonly attributes: string
  316. /**
  317. * 是否合并
  318. */
  319. readonly mixBufficon: number
  320. /**
  321. * 效果id
  322. */
  323. readonly skillShowId: number
  324. /**
  325. * 飘字id
  326. */
  327. readonly floatingTextId: number
  328. resolve(tables:Tables) {
  329. }
  330. }
  331. export class HeroLevel {
  332. constructor(_buf_: ByteBuf) {
  333. this.idx = _buf_.ReadInt()
  334. this.id = _buf_.ReadInt()
  335. this.level = _buf_.ReadInt()
  336. { 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);}}
  337. this.unlockSkillDesc = _buf_.ReadString()
  338. { 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);}}
  339. this.atk = _buf_.ReadInt()
  340. this.atkSpeed = _buf_.ReadInt()
  341. }
  342. /**
  343. * 序號
  344. */
  345. readonly idx: number
  346. /**
  347. * 英雄ID
  348. */
  349. readonly id: number
  350. /**
  351. * 等级
  352. */
  353. readonly level: number
  354. /**
  355. * 英雄解锁技能
  356. */
  357. readonly unlockSkill: number[]
  358. /**
  359. * 解锁技能描述
  360. */
  361. readonly unlockSkillDesc: string
  362. /**
  363. * 升级消耗
  364. */
  365. readonly upgradeconsume: Common.Cost[]
  366. /**
  367. * 攻击力
  368. */
  369. readonly atk: number
  370. /**
  371. * 攻击速度
  372. */
  373. readonly atkSpeed: number
  374. resolve(tables:Tables) {
  375. for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
  376. }
  377. }
  378. export class Skill {
  379. constructor(_buf_: ByteBuf) {
  380. this.idx = _buf_.ReadInt()
  381. this.remark = _buf_.ReadString()
  382. this.skillId = _buf_.ReadInt()
  383. this.level = _buf_.ReadInt()
  384. this.skillType = _buf_.ReadInt()
  385. this.cd = _buf_.ReadInt()
  386. this.triggerCondition = _buf_.ReadString()
  387. this.effects = _buf_.ReadString()
  388. this.buffId = _buf_.ReadString()
  389. this.skillName = _buf_.ReadString()
  390. this.desc = _buf_.ReadString()
  391. this.conflictSkillId = _buf_.ReadInt()
  392. }
  393. /**
  394. * 主键id
  395. */
  396. readonly idx: number
  397. /**
  398. * 备注
  399. */
  400. readonly remark: string
  401. /**
  402. * 技能ID
  403. */
  404. readonly skillId: number
  405. /**
  406. * 等级
  407. */
  408. readonly level: number
  409. /**
  410. * 类型
  411. */
  412. readonly skillType: number
  413. /**
  414. * 冷却时间
  415. */
  416. readonly cd: number
  417. /**
  418. * 技能触发条件
  419. */
  420. readonly triggerCondition: string
  421. /**
  422. * 效果列表
  423. */
  424. readonly effects: string
  425. /**
  426. * buff
  427. */
  428. readonly buffId: string
  429. /**
  430. * 技能名字
  431. */
  432. readonly skillName: string
  433. /**
  434. * 技能描述
  435. */
  436. readonly desc: string
  437. /**
  438. * 冲突的技能id
  439. */
  440. readonly conflictSkillId: number
  441. resolve(tables:Tables) {
  442. }
  443. }
  444. export class WaveRewards {
  445. constructor(_buf_: ByteBuf) {
  446. this.idx = _buf_.ReadInt()
  447. this.waveMin = _buf_.ReadInt()
  448. this.waveMax = _buf_.ReadInt()
  449. this.level = _buf_.ReadInt()
  450. { 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);}}
  451. }
  452. /**
  453. * idx
  454. */
  455. readonly idx: number
  456. /**
  457. * 波数下限
  458. */
  459. readonly waveMin: number
  460. /**
  461. * 波数上限
  462. */
  463. readonly waveMax: number
  464. /**
  465. * 难度
  466. */
  467. readonly level: number
  468. /**
  469. * 奖励列表
  470. */
  471. readonly rewards: Common.Reward[]
  472. resolve(tables:Tables) {
  473. for (let _e of this.rewards) { _e?.resolve(tables); }
  474. }
  475. }
  476. export class System {
  477. constructor(_buf_: ByteBuf) {
  478. this.idx = _buf_.ReadInt()
  479. this.mainKey = _buf_.ReadString()
  480. this.value = _buf_.ReadString()
  481. }
  482. /**
  483. * IDX
  484. */
  485. readonly idx: number
  486. /**
  487. * 常量主键
  488. */
  489. readonly mainKey: string
  490. /**
  491. * 常量值
  492. */
  493. readonly value: string
  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 Wave {
  519. constructor(_buf_: ByteBuf) {
  520. this.idx = _buf_.ReadInt()
  521. this.waveIndex = _buf_.ReadInt()
  522. this.level = _buf_.ReadInt()
  523. this.model = _buf_.ReadInt()
  524. this.counter = _buf_.ReadInt()
  525. this.hp = _buf_.ReadInt()
  526. this.speed = _buf_.ReadInt()
  527. this.gap = _buf_.ReadInt()
  528. this.isboss = _buf_.ReadInt()
  529. this.perAddCoid = _buf_.ReadInt()
  530. this.perAddGem = _buf_.ReadInt()
  531. }
  532. /**
  533. * 唯一id
  534. */
  535. readonly idx: number
  536. /**
  537. * 波数
  538. */
  539. readonly waveIndex: number
  540. /**
  541. * 难度
  542. */
  543. readonly level: number
  544. /**
  545. * 怪物模型
  546. */
  547. readonly model: number
  548. /**
  549. * 数量
  550. */
  551. readonly counter: number
  552. /**
  553. * 血量
  554. */
  555. readonly hp: number
  556. /**
  557. * 速度
  558. */
  559. readonly speed: number
  560. /**
  561. * 间距
  562. */
  563. readonly gap: number
  564. /**
  565. * 是否是boss
  566. */
  567. readonly isboss: number
  568. /**
  569. * 每只怪增加局内金币
  570. */
  571. readonly perAddCoid: number
  572. /**
  573. * 每只怪增加局内宝石
  574. */
  575. readonly perAddGem: number
  576. resolve(tables:Tables) {
  577. }
  578. }
  579. /**
  580. * 英雄表.xlsx
  581. */
  582. export class TbHero {
  583. private _dataMap: Map<number, Hero>
  584. private _dataList: Hero[]
  585. constructor(_buf_: ByteBuf) {
  586. this._dataMap = new Map<number, Hero>()
  587. this._dataList = []
  588. for(let n = _buf_.ReadInt(); n > 0; n--) {
  589. let _v: Hero
  590. _v = new Hero(_buf_)
  591. this._dataList.push(_v)
  592. this._dataMap.set(_v.id, _v)
  593. }
  594. }
  595. getDataMap(): Map<number, Hero> { return this._dataMap; }
  596. getDataList(): Hero[] { return this._dataList; }
  597. get(key: number): Hero | undefined {
  598. return this._dataMap.get(key);
  599. }
  600. resolve(tables:Tables) {
  601. for(let data of this._dataList)
  602. {
  603. data.resolve(tables)
  604. }
  605. }
  606. }
  607. /**
  608. * 英雄等级表.xlsx
  609. */
  610. export class TbHeroLevel {
  611. private _dataMap: Map<number, HeroLevel>
  612. private _dataList: HeroLevel[]
  613. constructor(_buf_: ByteBuf) {
  614. this._dataMap = new Map<number, HeroLevel>()
  615. this._dataList = []
  616. for(let n = _buf_.ReadInt(); n > 0; n--) {
  617. let _v: HeroLevel
  618. _v = new HeroLevel(_buf_)
  619. this._dataList.push(_v)
  620. this._dataMap.set(_v.idx, _v)
  621. }
  622. }
  623. getDataMap(): Map<number, HeroLevel> { return this._dataMap; }
  624. getDataList(): HeroLevel[] { return this._dataList; }
  625. get(key: number): HeroLevel | undefined {
  626. return this._dataMap.get(key);
  627. }
  628. resolve(tables:Tables) {
  629. for(let data of this._dataList)
  630. {
  631. data.resolve(tables)
  632. }
  633. }
  634. }
  635. /**
  636. * ZD技能Buff.xlsx
  637. */
  638. export class TbSkillBuff {
  639. private _dataMap: Map<number, SkillBuff>
  640. private _dataList: SkillBuff[]
  641. constructor(_buf_: ByteBuf) {
  642. this._dataMap = new Map<number, SkillBuff>()
  643. this._dataList = []
  644. for(let n = _buf_.ReadInt(); n > 0; n--) {
  645. let _v: SkillBuff
  646. _v = new SkillBuff(_buf_)
  647. this._dataList.push(_v)
  648. this._dataMap.set(_v.idx, _v)
  649. }
  650. }
  651. getDataMap(): Map<number, SkillBuff> { return this._dataMap; }
  652. getDataList(): SkillBuff[] { return this._dataList; }
  653. get(key: number): SkillBuff | undefined {
  654. return this._dataMap.get(key);
  655. }
  656. resolve(tables:Tables) {
  657. for(let data of this._dataList)
  658. {
  659. data.resolve(tables)
  660. }
  661. }
  662. }
  663. /**
  664. * ZD技能表.xlsx
  665. */
  666. export class TbSkill {
  667. private _dataList: Skill[]
  668. constructor(_buf_: ByteBuf) {
  669. this._dataList = []
  670. for(let n = _buf_.ReadInt(); n > 0; n--) {
  671. let _v: Skill
  672. _v = new Skill(_buf_)
  673. this._dataList.push(_v)
  674. }
  675. }
  676. getDataList(): Skill[] { return this._dataList }
  677. get(index: number): Skill | undefined { return this._dataList[index] }
  678. resolve(tables:Tables) {
  679. for(let data of this._dataList)
  680. {
  681. data.resolve(tables)
  682. }
  683. }
  684. }
  685. /**
  686. * 波数表.xlsx
  687. */
  688. export class TbWave {
  689. private _dataMap: Map<number, Wave>
  690. private _dataList: Wave[]
  691. constructor(_buf_: ByteBuf) {
  692. this._dataMap = new Map<number, Wave>()
  693. this._dataList = []
  694. for(let n = _buf_.ReadInt(); n > 0; n--) {
  695. let _v: Wave
  696. _v = new Wave(_buf_)
  697. this._dataList.push(_v)
  698. this._dataMap.set(_v.idx, _v)
  699. }
  700. }
  701. getDataMap(): Map<number, Wave> { return this._dataMap; }
  702. getDataList(): Wave[] { return this._dataList; }
  703. get(key: number): Wave | undefined {
  704. return this._dataMap.get(key);
  705. }
  706. resolve(tables:Tables) {
  707. for(let data of this._dataList)
  708. {
  709. data.resolve(tables)
  710. }
  711. }
  712. }
  713. /**
  714. * 波数奖励表.xlsx
  715. */
  716. export class TbWaveRewards {
  717. private _dataMap: Map<number, WaveRewards>
  718. private _dataList: WaveRewards[]
  719. constructor(_buf_: ByteBuf) {
  720. this._dataMap = new Map<number, WaveRewards>()
  721. this._dataList = []
  722. for(let n = _buf_.ReadInt(); n > 0; n--) {
  723. let _v: WaveRewards
  724. _v = new WaveRewards(_buf_)
  725. this._dataList.push(_v)
  726. this._dataMap.set(_v.idx, _v)
  727. }
  728. }
  729. getDataMap(): Map<number, WaveRewards> { return this._dataMap; }
  730. getDataList(): WaveRewards[] { return this._dataList; }
  731. get(key: number): WaveRewards | undefined {
  732. return this._dataMap.get(key);
  733. }
  734. resolve(tables:Tables) {
  735. for(let data of this._dataList)
  736. {
  737. data.resolve(tables)
  738. }
  739. }
  740. }
  741. /**
  742. * 道具表.xlsx
  743. */
  744. export class TbItem {
  745. private _dataMap: Map<number, Item>
  746. private _dataList: Item[]
  747. constructor(_buf_: ByteBuf) {
  748. this._dataMap = new Map<number, Item>()
  749. this._dataList = []
  750. for(let n = _buf_.ReadInt(); n > 0; n--) {
  751. let _v: Item
  752. _v = new Item(_buf_)
  753. this._dataList.push(_v)
  754. this._dataMap.set(_v.idx, _v)
  755. }
  756. }
  757. getDataMap(): Map<number, Item> { return this._dataMap; }
  758. getDataList(): Item[] { return this._dataList; }
  759. get(key: number): Item | undefined {
  760. return this._dataMap.get(key);
  761. }
  762. resolve(tables:Tables) {
  763. for(let data of this._dataList)
  764. {
  765. data.resolve(tables)
  766. }
  767. }
  768. }
  769. /**
  770. * 系统常量表.xlsx
  771. */
  772. export class TbSystem {
  773. private _dataMap: Map<string, System>
  774. private _dataList: System[]
  775. constructor(_buf_: ByteBuf) {
  776. this._dataMap = new Map<string, System>()
  777. this._dataList = []
  778. for(let n = _buf_.ReadInt(); n > 0; n--) {
  779. let _v: System
  780. _v = new System(_buf_)
  781. this._dataList.push(_v)
  782. this._dataMap.set(_v.mainKey, _v)
  783. }
  784. }
  785. getDataMap(): Map<string, System> { return this._dataMap; }
  786. getDataList(): System[] { return this._dataList; }
  787. get(key: string): System | undefined {
  788. return this._dataMap.get(key);
  789. }
  790. resolve(tables:Tables) {
  791. for(let data of this._dataList)
  792. {
  793. data.resolve(tables)
  794. }
  795. }
  796. }
  797. type ByteBufLoader = (file: string) => ByteBuf
  798. export class Tables {
  799. private _TbHero: TbHero
  800. /**
  801. * 英雄表.xlsx
  802. */
  803. get TbHero(): TbHero { return this._TbHero;}
  804. private _TbHeroLevel: TbHeroLevel
  805. /**
  806. * 英雄等级表.xlsx
  807. */
  808. get TbHeroLevel(): TbHeroLevel { return this._TbHeroLevel;}
  809. private _TbSkillBuff: TbSkillBuff
  810. /**
  811. * ZD技能Buff.xlsx
  812. */
  813. get TbSkillBuff(): TbSkillBuff { return this._TbSkillBuff;}
  814. private _TbSkill: TbSkill
  815. /**
  816. * ZD技能表.xlsx
  817. */
  818. get TbSkill(): TbSkill { return this._TbSkill;}
  819. private _TbWave: TbWave
  820. /**
  821. * 波数表.xlsx
  822. */
  823. get TbWave(): TbWave { return this._TbWave;}
  824. private _TbWaveRewards: TbWaveRewards
  825. /**
  826. * 波数奖励表.xlsx
  827. */
  828. get TbWaveRewards(): TbWaveRewards { return this._TbWaveRewards;}
  829. private _TbItem: TbItem
  830. /**
  831. * 道具表.xlsx
  832. */
  833. get TbItem(): TbItem { return this._TbItem;}
  834. private _TbSystem: TbSystem
  835. /**
  836. * 系统常量表.xlsx
  837. */
  838. get TbSystem(): TbSystem { return this._TbSystem;}
  839. static getTableNames(): string[] {
  840. let names: string[] = [];
  841. names.push('tbhero');
  842. names.push('tbherolevel');
  843. names.push('tbskillbuff');
  844. names.push('tbskill');
  845. names.push('tbwave');
  846. names.push('tbwaverewards');
  847. names.push('tbitem');
  848. names.push('tbsystem');
  849. return names;
  850. }
  851. constructor(loader: ByteBufLoader) {
  852. this._TbHero = new TbHero(loader('tbhero'))
  853. this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
  854. this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
  855. this._TbSkill = new TbSkill(loader('tbskill'))
  856. this._TbWave = new TbWave(loader('tbwave'))
  857. this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
  858. this._TbItem = new TbItem(loader('tbitem'))
  859. this._TbSystem = new TbSystem(loader('tbsystem'))
  860. this._TbHero.resolve(this)
  861. this._TbHeroLevel.resolve(this)
  862. this._TbSkillBuff.resolve(this)
  863. this._TbSkill.resolve(this)
  864. this._TbWave.resolve(this)
  865. this._TbWaveRewards.resolve(this)
  866. this._TbItem.resolve(this)
  867. this._TbSystem.resolve(this)
  868. }
  869. }