schema.ts 20 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127
  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 namespace Hero {
  39. export enum Quality {
  40. /**
  41. * 普通
  42. */
  43. Normal = 1,
  44. /**
  45. * 高级
  46. */
  47. Senior = 2,
  48. /**
  49. * 稀有
  50. */
  51. Rare = 3,
  52. /**
  53. * 传说
  54. */
  55. Legend = 4,
  56. /**
  57. * 神话
  58. */
  59. Myth = 5,
  60. }
  61. }
  62. export namespace Hero {
  63. export enum AttackType {
  64. /**
  65. * 近战
  66. */
  67. CloseCombat = 1,
  68. /**
  69. * 远程
  70. */
  71. Remote = 2,
  72. }
  73. }
  74. export namespace test {
  75. /**
  76. * 这是个测试excel结构
  77. */
  78. export class TestExcelBean1 {
  79. constructor(_buf_: ByteBuf) {
  80. this.x1 = _buf_.ReadInt()
  81. this.x2 = _buf_.ReadString()
  82. this.x3 = _buf_.ReadInt()
  83. this.x4 = _buf_.ReadFloat()
  84. }
  85. /**
  86. * 最高品质
  87. */
  88. readonly x1: number
  89. /**
  90. * 黑色的
  91. */
  92. readonly x2: string
  93. /**
  94. * 蓝色的
  95. */
  96. readonly x3: number
  97. /**
  98. * 最差品质
  99. */
  100. readonly x4: number
  101. resolve(tables:Tables) {
  102. }
  103. }
  104. }
  105. export namespace test {
  106. /**
  107. * 这是个测试excel结构
  108. */
  109. export class TestExcelBean2 {
  110. constructor(_buf_: ByteBuf) {
  111. this.y1 = _buf_.ReadInt()
  112. this.y2 = _buf_.ReadString()
  113. this.y3 = _buf_.ReadFloat()
  114. }
  115. /**
  116. * 最高品质
  117. */
  118. readonly y1: number
  119. /**
  120. * 黑色的
  121. */
  122. readonly y2: string
  123. /**
  124. * 蓝色的
  125. */
  126. readonly y3: number
  127. resolve(tables:Tables) {
  128. }
  129. }
  130. }
  131. export namespace test {
  132. export abstract class Shape {
  133. static constructorFrom(_buf_: ByteBuf): Shape{
  134. switch (_buf_.ReadInt()) {
  135. case 2131829196: return new test.Circle(_buf_)
  136. case 694982337: return new test2.Rectangle(_buf_)
  137. default: throw new Error()
  138. }
  139. }
  140. constructor(_buf_: ByteBuf) {
  141. }
  142. resolve(tables:Tables) {
  143. }
  144. }
  145. }
  146. export namespace test {
  147. /**
  148. * 圆
  149. */
  150. export class Circle extends test.Shape {
  151. constructor(_buf_: ByteBuf) {
  152. super(_buf_)
  153. this.radius = _buf_.ReadFloat()
  154. }
  155. /**
  156. * 半径
  157. */
  158. readonly radius: number
  159. resolve(tables:Tables) {
  160. super.resolve(tables)
  161. }
  162. }
  163. }
  164. export namespace test2 {
  165. /**
  166. * 矩形
  167. */
  168. export class Rectangle extends test.Shape {
  169. constructor(_buf_: ByteBuf) {
  170. super(_buf_)
  171. this.width = _buf_.ReadFloat()
  172. this.height = _buf_.ReadFloat()
  173. }
  174. /**
  175. * 宽度
  176. */
  177. readonly width: number
  178. /**
  179. * 高度
  180. */
  181. readonly height: number
  182. resolve(tables:Tables) {
  183. super.resolve(tables)
  184. }
  185. }
  186. }
  187. export namespace Common {
  188. export class Reward {
  189. constructor(_buf_: ByteBuf) {
  190. this.itemid = _buf_.ReadInt()
  191. this.num = _buf_.ReadInt()
  192. }
  193. /**
  194. * 道具id
  195. */
  196. readonly itemid: number
  197. /**
  198. * 数量
  199. */
  200. readonly num: number
  201. resolve(tables:Tables) {
  202. }
  203. }
  204. }
  205. export namespace Common {
  206. export class Cost {
  207. constructor(_buf_: ByteBuf) {
  208. this.itemid = _buf_.ReadInt()
  209. this.num = _buf_.ReadInt()
  210. }
  211. /**
  212. * 道具id
  213. */
  214. readonly itemid: number
  215. /**
  216. * 数量
  217. */
  218. readonly num: number
  219. resolve(tables:Tables) {
  220. }
  221. }
  222. }
  223. export class SkillBuff {
  224. constructor(_buf_: ByteBuf) {
  225. this.idx = _buf_.ReadInt()
  226. this.remark = _buf_.ReadString()
  227. this.type = _buf_.ReadInt()
  228. this.parameters = _buf_.ReadString()
  229. this.probability = _buf_.ReadInt()
  230. this.triggerCondition = _buf_.ReadString()
  231. this.effectType = _buf_.ReadInt()
  232. this.duration = _buf_.ReadInt()
  233. this.overlapTimes = _buf_.ReadInt()
  234. this.uniqueGain = _buf_.ReadBool()
  235. this.halo = _buf_.ReadBool()
  236. this.attributes = _buf_.ReadString()
  237. this.mixBufficon = _buf_.ReadInt()
  238. this.skillShowId = _buf_.ReadInt()
  239. this.floatingTextId = _buf_.ReadInt()
  240. }
  241. /**
  242. * buffid
  243. */
  244. readonly idx: number
  245. /**
  246. * 备注
  247. */
  248. readonly remark: string
  249. /**
  250. * buff类型
  251. */
  252. readonly type: number
  253. /**
  254. * buff参数
  255. */
  256. readonly parameters: string
  257. /**
  258. * 触发概率
  259. */
  260. readonly probability: number
  261. /**
  262. * 触发条件
  263. */
  264. readonly triggerCondition: string
  265. /**
  266. * 效果类型
  267. */
  268. readonly effectType: number
  269. /**
  270. * 持续时间
  271. */
  272. readonly duration: number
  273. /**
  274. * 叠加次数
  275. */
  276. readonly overlapTimes: number
  277. /**
  278. * 唯一增益
  279. */
  280. readonly uniqueGain: boolean
  281. /**
  282. * 是否是光环
  283. */
  284. readonly halo: boolean
  285. /**
  286. * buff增加的属性
  287. */
  288. readonly attributes: string
  289. /**
  290. * 是否合并
  291. */
  292. readonly mixBufficon: number
  293. /**
  294. * 效果id
  295. */
  296. readonly skillShowId: number
  297. /**
  298. * 飘字id
  299. */
  300. readonly floatingTextId: number
  301. resolve(tables:Tables) {
  302. }
  303. }
  304. export class System {
  305. constructor(_buf_: ByteBuf) {
  306. this.idx = _buf_.ReadInt()
  307. this.mainKey = _buf_.ReadString()
  308. this.value = _buf_.ReadString()
  309. }
  310. /**
  311. * IDX
  312. */
  313. readonly idx: number
  314. /**
  315. * 常量主键
  316. */
  317. readonly mainKey: string
  318. /**
  319. * 常量值
  320. */
  321. readonly value: string
  322. resolve(tables:Tables) {
  323. }
  324. }
  325. export class Skill {
  326. constructor(_buf_: ByteBuf) {
  327. this.idx = _buf_.ReadInt()
  328. this.remark = _buf_.ReadString()
  329. this.skillId = _buf_.ReadInt()
  330. this.level = _buf_.ReadInt()
  331. this.skillType = _buf_.ReadInt()
  332. this.cd = _buf_.ReadInt()
  333. this.triggerCondition = _buf_.ReadString()
  334. this.effects = _buf_.ReadString()
  335. this.buffId = _buf_.ReadString()
  336. this.skillName = _buf_.ReadString()
  337. this.desc = _buf_.ReadString()
  338. this.conflictSkillId = _buf_.ReadInt()
  339. }
  340. /**
  341. * 主键id
  342. */
  343. readonly idx: number
  344. /**
  345. * 备注
  346. */
  347. readonly remark: string
  348. /**
  349. * 技能ID
  350. */
  351. readonly skillId: number
  352. /**
  353. * 等级
  354. */
  355. readonly level: number
  356. /**
  357. * 类型
  358. */
  359. readonly skillType: number
  360. /**
  361. * 冷却时间
  362. */
  363. readonly cd: number
  364. /**
  365. * 技能触发条件
  366. */
  367. readonly triggerCondition: string
  368. /**
  369. * 效果列表
  370. */
  371. readonly effects: string
  372. /**
  373. * buff
  374. */
  375. readonly buffId: string
  376. /**
  377. * 技能名字
  378. */
  379. readonly skillName: string
  380. /**
  381. * 技能描述
  382. */
  383. readonly desc: string
  384. /**
  385. * 冲突的技能id
  386. */
  387. readonly conflictSkillId: number
  388. resolve(tables:Tables) {
  389. }
  390. }
  391. export class Wave {
  392. constructor(_buf_: ByteBuf) {
  393. this.idx = _buf_.ReadInt()
  394. this.waveIndex = _buf_.ReadInt()
  395. this.level = _buf_.ReadInt()
  396. this.model = _buf_.ReadInt()
  397. this.counter = _buf_.ReadInt()
  398. this.hp = _buf_.ReadInt()
  399. this.speed = _buf_.ReadInt()
  400. this.gap = _buf_.ReadInt()
  401. this.isboss = _buf_.ReadInt()
  402. this.perAddCoid = _buf_.ReadInt()
  403. this.perAddGem = _buf_.ReadInt()
  404. }
  405. /**
  406. * 唯一id
  407. */
  408. readonly idx: number
  409. /**
  410. * 波数
  411. */
  412. readonly waveIndex: number
  413. /**
  414. * 难度
  415. */
  416. readonly level: number
  417. /**
  418. * 怪物模型
  419. */
  420. readonly model: number
  421. /**
  422. * 数量
  423. */
  424. readonly counter: number
  425. /**
  426. * 血量
  427. */
  428. readonly hp: number
  429. /**
  430. * 速度
  431. */
  432. readonly speed: number
  433. /**
  434. * 间距
  435. */
  436. readonly gap: number
  437. /**
  438. * 是否是boss
  439. */
  440. readonly isboss: number
  441. /**
  442. * 每只怪增加局内金币
  443. */
  444. readonly perAddCoid: number
  445. /**
  446. * 每只怪增加局内宝石
  447. */
  448. readonly perAddGem: number
  449. resolve(tables:Tables) {
  450. }
  451. }
  452. export class Item {
  453. constructor(_buf_: ByteBuf) {
  454. this.idx = _buf_.ReadInt()
  455. this.type = _buf_.ReadInt()
  456. this.name = _buf_.ReadString()
  457. }
  458. /**
  459. * 道具ID
  460. */
  461. readonly idx: number
  462. /**
  463. * 类型
  464. */
  465. readonly type: number
  466. /**
  467. * 道具名
  468. */
  469. readonly name: string
  470. resolve(tables:Tables) {
  471. }
  472. }
  473. export class Hero {
  474. constructor(_buf_: ByteBuf) {
  475. this.id = _buf_.ReadInt()
  476. this.quality = _buf_.ReadInt()
  477. this.attacktype = _buf_.ReadInt()
  478. this.name = _buf_.ReadString()
  479. { 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);}}
  480. }
  481. /**
  482. * 英雄ID
  483. */
  484. readonly id: number
  485. /**
  486. * 品质
  487. */
  488. readonly quality: Hero.Quality
  489. /**
  490. * 攻击类型
  491. */
  492. readonly attacktype: Hero.AttackType
  493. /**
  494. * 名字
  495. */
  496. readonly name: string
  497. /**
  498. * 技能列表
  499. */
  500. readonly skills: number[]
  501. resolve(tables:Tables) {
  502. }
  503. }
  504. export class WaveRewards {
  505. constructor(_buf_: ByteBuf) {
  506. this.idx = _buf_.ReadInt()
  507. this.waveMin = _buf_.ReadInt()
  508. this.waveMax = _buf_.ReadInt()
  509. this.level = _buf_.ReadInt()
  510. { 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);}}
  511. }
  512. /**
  513. * idx
  514. */
  515. readonly idx: number
  516. /**
  517. * 波数下限
  518. */
  519. readonly waveMin: number
  520. /**
  521. * 波数上限
  522. */
  523. readonly waveMax: number
  524. /**
  525. * 难度
  526. */
  527. readonly level: number
  528. /**
  529. * 奖励列表
  530. */
  531. readonly rewards: Common.Reward[]
  532. resolve(tables:Tables) {
  533. for (let _e of this.rewards) { _e?.resolve(tables); }
  534. }
  535. }
  536. export class HeroLevel {
  537. constructor(_buf_: ByteBuf) {
  538. this.id = _buf_.ReadInt()
  539. this.level = _buf_.ReadInt()
  540. { 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);}}
  541. this.unlockSkillDesc = _buf_.ReadString()
  542. { 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);}}
  543. this.atk = _buf_.ReadInt()
  544. this.atkSpeed = _buf_.ReadInt()
  545. }
  546. /**
  547. * 英雄ID
  548. */
  549. readonly id: number
  550. /**
  551. * 等级
  552. */
  553. readonly level: number
  554. /**
  555. * 英雄解锁技能
  556. */
  557. readonly unlockSkill: number[]
  558. /**
  559. * 解锁技能描述
  560. */
  561. readonly unlockSkillDesc: string
  562. /**
  563. * 升级消耗
  564. */
  565. readonly upgradeconsume: Common.Cost[]
  566. /**
  567. * 攻击力
  568. */
  569. readonly atk: number
  570. /**
  571. * 攻击速度
  572. */
  573. readonly atkSpeed: number
  574. resolve(tables:Tables) {
  575. for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
  576. }
  577. }
  578. /**
  579. * 英雄表.xlsx
  580. */
  581. export class TbHero {
  582. private _dataMap: Map<number, Hero>
  583. private _dataList: Hero[]
  584. constructor(_buf_: ByteBuf) {
  585. this._dataMap = new Map<number, Hero>()
  586. this._dataList = []
  587. for(let n = _buf_.ReadInt(); n > 0; n--) {
  588. let _v: Hero
  589. _v = new Hero(_buf_)
  590. this._dataList.push(_v)
  591. this._dataMap.set(_v.id, _v)
  592. }
  593. }
  594. getDataMap(): Map<number, Hero> { return this._dataMap; }
  595. getDataList(): Hero[] { return this._dataList; }
  596. get(key: number): Hero | undefined {
  597. return this._dataMap.get(key);
  598. }
  599. resolve(tables:Tables) {
  600. for(let data of this._dataList)
  601. {
  602. data.resolve(tables)
  603. }
  604. }
  605. }
  606. /**
  607. * 英雄等级表.xlsx
  608. */
  609. export class TbHeroLevel {
  610. private _dataList: HeroLevel[]
  611. constructor(_buf_: ByteBuf) {
  612. this._dataList = []
  613. for(let n = _buf_.ReadInt(); n > 0; n--) {
  614. let _v: HeroLevel
  615. _v = new HeroLevel(_buf_)
  616. this._dataList.push(_v)
  617. }
  618. }
  619. getDataList(): HeroLevel[] { return this._dataList }
  620. get(index: number): HeroLevel | undefined { return this._dataList[index] }
  621. resolve(tables:Tables) {
  622. for(let data of this._dataList)
  623. {
  624. data.resolve(tables)
  625. }
  626. }
  627. }
  628. /**
  629. * ZD技能Buff.xlsx
  630. */
  631. export class TbSkillBuff {
  632. private _dataMap: Map<number, SkillBuff>
  633. private _dataList: SkillBuff[]
  634. constructor(_buf_: ByteBuf) {
  635. this._dataMap = new Map<number, SkillBuff>()
  636. this._dataList = []
  637. for(let n = _buf_.ReadInt(); n > 0; n--) {
  638. let _v: SkillBuff
  639. _v = new SkillBuff(_buf_)
  640. this._dataList.push(_v)
  641. this._dataMap.set(_v.idx, _v)
  642. }
  643. }
  644. getDataMap(): Map<number, SkillBuff> { return this._dataMap; }
  645. getDataList(): SkillBuff[] { return this._dataList; }
  646. get(key: number): SkillBuff | undefined {
  647. return this._dataMap.get(key);
  648. }
  649. resolve(tables:Tables) {
  650. for(let data of this._dataList)
  651. {
  652. data.resolve(tables)
  653. }
  654. }
  655. }
  656. /**
  657. * ZD技能表.xlsx
  658. */
  659. export class TbSkill {
  660. private _dataList: Skill[]
  661. constructor(_buf_: ByteBuf) {
  662. this._dataList = []
  663. for(let n = _buf_.ReadInt(); n > 0; n--) {
  664. let _v: Skill
  665. _v = new Skill(_buf_)
  666. this._dataList.push(_v)
  667. }
  668. }
  669. getDataList(): Skill[] { return this._dataList }
  670. get(index: number): Skill | undefined { return this._dataList[index] }
  671. resolve(tables:Tables) {
  672. for(let data of this._dataList)
  673. {
  674. data.resolve(tables)
  675. }
  676. }
  677. }
  678. /**
  679. * 波数表.xlsx
  680. */
  681. export class TbWave {
  682. private _dataMap: Map<number, Wave>
  683. private _dataList: Wave[]
  684. constructor(_buf_: ByteBuf) {
  685. this._dataMap = new Map<number, Wave>()
  686. this._dataList = []
  687. for(let n = _buf_.ReadInt(); n > 0; n--) {
  688. let _v: Wave
  689. _v = new Wave(_buf_)
  690. this._dataList.push(_v)
  691. this._dataMap.set(_v.idx, _v)
  692. }
  693. }
  694. getDataMap(): Map<number, Wave> { return this._dataMap; }
  695. getDataList(): Wave[] { return this._dataList; }
  696. get(key: number): Wave | undefined {
  697. return this._dataMap.get(key);
  698. }
  699. resolve(tables:Tables) {
  700. for(let data of this._dataList)
  701. {
  702. data.resolve(tables)
  703. }
  704. }
  705. }
  706. /**
  707. * 波数奖励表.xlsx
  708. */
  709. export class TbWaveRewards {
  710. private _dataMap: Map<number, WaveRewards>
  711. private _dataList: WaveRewards[]
  712. constructor(_buf_: ByteBuf) {
  713. this._dataMap = new Map<number, WaveRewards>()
  714. this._dataList = []
  715. for(let n = _buf_.ReadInt(); n > 0; n--) {
  716. let _v: WaveRewards
  717. _v = new WaveRewards(_buf_)
  718. this._dataList.push(_v)
  719. this._dataMap.set(_v.idx, _v)
  720. }
  721. }
  722. getDataMap(): Map<number, WaveRewards> { return this._dataMap; }
  723. getDataList(): WaveRewards[] { return this._dataList; }
  724. get(key: number): WaveRewards | undefined {
  725. return this._dataMap.get(key);
  726. }
  727. resolve(tables:Tables) {
  728. for(let data of this._dataList)
  729. {
  730. data.resolve(tables)
  731. }
  732. }
  733. }
  734. /**
  735. * 道具表.xlsx
  736. */
  737. export class TbItem {
  738. private _dataMap: Map<number, Item>
  739. private _dataList: Item[]
  740. constructor(_buf_: ByteBuf) {
  741. this._dataMap = new Map<number, Item>()
  742. this._dataList = []
  743. for(let n = _buf_.ReadInt(); n > 0; n--) {
  744. let _v: Item
  745. _v = new Item(_buf_)
  746. this._dataList.push(_v)
  747. this._dataMap.set(_v.idx, _v)
  748. }
  749. }
  750. getDataMap(): Map<number, Item> { return this._dataMap; }
  751. getDataList(): Item[] { return this._dataList; }
  752. get(key: number): Item | undefined {
  753. return this._dataMap.get(key);
  754. }
  755. resolve(tables:Tables) {
  756. for(let data of this._dataList)
  757. {
  758. data.resolve(tables)
  759. }
  760. }
  761. }
  762. /**
  763. * 系统常量表.xlsx
  764. */
  765. export class TbSystem {
  766. private _dataMap: Map<string, System>
  767. private _dataList: System[]
  768. constructor(_buf_: ByteBuf) {
  769. this._dataMap = new Map<string, System>()
  770. this._dataList = []
  771. for(let n = _buf_.ReadInt(); n > 0; n--) {
  772. let _v: System
  773. _v = new System(_buf_)
  774. this._dataList.push(_v)
  775. this._dataMap.set(_v.mainKey, _v)
  776. }
  777. }
  778. getDataMap(): Map<string, System> { return this._dataMap; }
  779. getDataList(): System[] { return this._dataList; }
  780. get(key: string): System | undefined {
  781. return this._dataMap.get(key);
  782. }
  783. resolve(tables:Tables) {
  784. for(let data of this._dataList)
  785. {
  786. data.resolve(tables)
  787. }
  788. }
  789. }
  790. type ByteBufLoader = (file: string) => ByteBuf
  791. export class Tables {
  792. private _TbHero: TbHero
  793. /**
  794. * 英雄表.xlsx
  795. */
  796. get TbHero(): TbHero { return this._TbHero;}
  797. private _TbHeroLevel: TbHeroLevel
  798. /**
  799. * 英雄等级表.xlsx
  800. */
  801. get TbHeroLevel(): TbHeroLevel { return this._TbHeroLevel;}
  802. private _TbSkillBuff: TbSkillBuff
  803. /**
  804. * ZD技能Buff.xlsx
  805. */
  806. get TbSkillBuff(): TbSkillBuff { return this._TbSkillBuff;}
  807. private _TbSkill: TbSkill
  808. /**
  809. * ZD技能表.xlsx
  810. */
  811. get TbSkill(): TbSkill { return this._TbSkill;}
  812. private _TbWave: TbWave
  813. /**
  814. * 波数表.xlsx
  815. */
  816. get TbWave(): TbWave { return this._TbWave;}
  817. private _TbWaveRewards: TbWaveRewards
  818. /**
  819. * 波数奖励表.xlsx
  820. */
  821. get TbWaveRewards(): TbWaveRewards { return this._TbWaveRewards;}
  822. private _TbItem: TbItem
  823. /**
  824. * 道具表.xlsx
  825. */
  826. get TbItem(): TbItem { return this._TbItem;}
  827. private _TbSystem: TbSystem
  828. /**
  829. * 系统常量表.xlsx
  830. */
  831. get TbSystem(): TbSystem { return this._TbSystem;}
  832. static getTableNames(): string[] {
  833. let names: string[] = [];
  834. names.push('tbhero');
  835. names.push('tbherolevel');
  836. names.push('tbskillbuff');
  837. names.push('tbskill');
  838. names.push('tbwave');
  839. names.push('tbwaverewards');
  840. names.push('tbitem');
  841. names.push('tbsystem');
  842. return names;
  843. }
  844. constructor(loader: ByteBufLoader) {
  845. this._TbHero = new TbHero(loader('tbhero'))
  846. this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
  847. this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
  848. this._TbSkill = new TbSkill(loader('tbskill'))
  849. this._TbWave = new TbWave(loader('tbwave'))
  850. this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
  851. this._TbItem = new TbItem(loader('tbitem'))
  852. this._TbSystem = new TbSystem(loader('tbsystem'))
  853. this._TbHero.resolve(this)
  854. this._TbHeroLevel.resolve(this)
  855. this._TbSkillBuff.resolve(this)
  856. this._TbSkill.resolve(this)
  857. this._TbWave.resolve(this)
  858. this._TbWaveRewards.resolve(this)
  859. this._TbItem.resolve(this)
  860. this._TbSystem.resolve(this)
  861. }
  862. }