schema.ts 24 KB

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