schema.ts 31 KB

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