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