schema.ts 29 KB

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