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 Item {
  220. constructor(_buf_: ByteBuf) {
  221. this.idx = _buf_.ReadInt()
  222. this.type = _buf_.ReadInt()
  223. this.name = _buf_.ReadString()
  224. }
  225. /**
  226. * 道具ID
  227. */
  228. readonly idx: number
  229. /**
  230. * 类型
  231. */
  232. readonly type: number
  233. /**
  234. * 道具名
  235. */
  236. readonly name: string
  237. resolve(tables:Tables) {
  238. }
  239. }
  240. export class System {
  241. constructor(_buf_: ByteBuf) {
  242. this.idx = _buf_.ReadInt()
  243. this.mainKey = _buf_.ReadString()
  244. this.value = _buf_.ReadString()
  245. }
  246. /**
  247. * IDX
  248. */
  249. readonly idx: number
  250. /**
  251. * 常量主键
  252. */
  253. readonly mainKey: string
  254. /**
  255. * 常量值
  256. */
  257. readonly value: string
  258. resolve(tables:Tables) {
  259. }
  260. }
  261. export class Skill {
  262. constructor(_buf_: ByteBuf) {
  263. this.idx = _buf_.ReadInt()
  264. this.remark = _buf_.ReadString()
  265. this.skillId = _buf_.ReadInt()
  266. this.level = _buf_.ReadInt()
  267. this.skillType = _buf_.ReadInt()
  268. this.cd = _buf_.ReadInt()
  269. this.gridRange = _buf_.ReadInt()
  270. this.range = _buf_.ReadInt()
  271. { 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);}}
  272. this.triggerCondition = _buf_.ReadString()
  273. this.effects = _buf_.ReadString()
  274. this.buffId = _buf_.ReadString()
  275. this.skillName = _buf_.ReadString()
  276. this.desc = _buf_.ReadString()
  277. this.conflictSkillId = _buf_.ReadInt()
  278. }
  279. /**
  280. * 主键id
  281. */
  282. readonly idx: number
  283. /**
  284. * 备注
  285. */
  286. readonly remark: string
  287. /**
  288. * 技能ID
  289. */
  290. readonly skillId: number
  291. /**
  292. * 技能等级
  293. */
  294. readonly level: number
  295. /**
  296. * 类型
  297. */
  298. readonly skillType: number
  299. /**
  300. * 冷却时间
  301. */
  302. readonly cd: number
  303. /**
  304. * 格子范围
  305. */
  306. readonly gridRange: number
  307. /**
  308. * 攻击距离
  309. */
  310. readonly range: number
  311. /**
  312. * 攻击距离
  313. */
  314. readonly damage: number[]
  315. /**
  316. * 技能触发条件
  317. */
  318. readonly triggerCondition: string
  319. /**
  320. * 效果列表
  321. */
  322. readonly effects: string
  323. /**
  324. * buff
  325. */
  326. readonly buffId: string
  327. /**
  328. * 技能名字
  329. */
  330. readonly skillName: string
  331. /**
  332. * 技能描述
  333. */
  334. readonly desc: string
  335. /**
  336. * 冲突的技能id
  337. */
  338. readonly conflictSkillId: number
  339. resolve(tables:Tables) {
  340. }
  341. }
  342. export class Hero {
  343. constructor(_buf_: ByteBuf) {
  344. this.id = _buf_.ReadInt()
  345. this.quality = _buf_.ReadInt()
  346. this.attacktype = _buf_.ReadInt()
  347. this.name = _buf_.ReadString()
  348. { 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);}}
  349. { 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);}}
  350. this.isShow = _buf_.ReadInt()
  351. }
  352. /**
  353. * 英雄ID
  354. */
  355. readonly id: number
  356. /**
  357. * 品质
  358. */
  359. readonly quality: Quality
  360. /**
  361. * 攻击类型
  362. */
  363. readonly attacktype: AttackType
  364. /**
  365. * 名字
  366. */
  367. readonly name: string
  368. /**
  369. * 技能列表
  370. */
  371. readonly skills: number[]
  372. /**
  373. * 合成英雄公式
  374. */
  375. readonly composeheros: number[]
  376. /**
  377. * 是否测试
  378. */
  379. readonly isShow: number
  380. resolve(tables:Tables) {
  381. }
  382. }
  383. export class BattleSummonWeight {
  384. constructor(_buf_: ByteBuf) {
  385. this.idx = _buf_.ReadInt()
  386. this.quality = _buf_.ReadInt()
  387. this.weight = _buf_.ReadInt()
  388. }
  389. /**
  390. * 唯一id
  391. */
  392. readonly idx: number
  393. /**
  394. * 品质
  395. */
  396. readonly quality: Quality
  397. /**
  398. * 权重
  399. */
  400. readonly weight: number
  401. resolve(tables:Tables) {
  402. }
  403. }
  404. export class HeroQualityWorth {
  405. constructor(_buf_: ByteBuf) {
  406. this.idx = _buf_.ReadInt()
  407. this.quality = _buf_.ReadInt()
  408. this.gold = _buf_.ReadInt()
  409. this.gem = _buf_.ReadInt()
  410. }
  411. /**
  412. * 唯一id
  413. */
  414. readonly idx: number
  415. /**
  416. * 品质
  417. */
  418. readonly quality: Quality
  419. /**
  420. * 局内金币
  421. */
  422. readonly gold: number
  423. /**
  424. * 局内宝石
  425. */
  426. readonly gem: number
  427. resolve(tables:Tables) {
  428. }
  429. }
  430. export class BattleSpacialSummon {
  431. constructor(_buf_: ByteBuf) {
  432. this.idx = _buf_.ReadInt()
  433. this.quality = _buf_.ReadInt()
  434. this.weight = _buf_.ReadInt()
  435. this.costgem = _buf_.ReadInt()
  436. }
  437. /**
  438. * 唯一id
  439. */
  440. readonly idx: number
  441. /**
  442. * 品质
  443. */
  444. readonly quality: Quality
  445. /**
  446. * 权重
  447. */
  448. readonly weight: number
  449. /**
  450. * 消耗宝石数量
  451. */
  452. readonly costgem: number
  453. resolve(tables:Tables) {
  454. }
  455. }
  456. export class StrengthenLevel {
  457. constructor(_buf_: ByteBuf) {
  458. this.idx = _buf_.ReadInt()
  459. this.quality = _buf_.ReadInt()
  460. this.level = _buf_.ReadInt()
  461. { 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);}}
  462. this.attributes = _buf_.ReadString()
  463. }
  464. /**
  465. * 唯一id
  466. */
  467. readonly idx: number
  468. /**
  469. * 品质
  470. */
  471. readonly quality: Quality
  472. /**
  473. * 等级
  474. */
  475. readonly level: number
  476. /**
  477. * 消耗
  478. */
  479. readonly rewards: Common.Reward[]
  480. /**
  481. * buff增加的属性
  482. */
  483. readonly attributes: string
  484. resolve(tables:Tables) {
  485. for (let _e of this.rewards) { _e?.resolve(tables); }
  486. }
  487. }
  488. export class WaveRewards {
  489. constructor(_buf_: ByteBuf) {
  490. this.idx = _buf_.ReadInt()
  491. this.waveMin = _buf_.ReadInt()
  492. this.waveMax = _buf_.ReadInt()
  493. this.level = _buf_.ReadInt()
  494. { 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);}}
  495. }
  496. /**
  497. * idx
  498. */
  499. readonly idx: number
  500. /**
  501. * 波数下限
  502. */
  503. readonly waveMin: number
  504. /**
  505. * 波数上限
  506. */
  507. readonly waveMax: number
  508. /**
  509. * 难度
  510. */
  511. readonly level: number
  512. /**
  513. * 奖励列表
  514. */
  515. readonly rewards: Common.Reward[]
  516. resolve(tables:Tables) {
  517. for (let _e of this.rewards) { _e?.resolve(tables); }
  518. }
  519. }
  520. export class Wave {
  521. constructor(_buf_: ByteBuf) {
  522. this.idx = _buf_.ReadInt()
  523. this.waveIndex = _buf_.ReadInt()
  524. this.level = _buf_.ReadInt()
  525. this.model = _buf_.ReadInt()
  526. this.counter = _buf_.ReadInt()
  527. this.hp = _buf_.ReadInt()
  528. this.speed = _buf_.ReadInt()
  529. this.gap = _buf_.ReadInt()
  530. this.isboss = _buf_.ReadInt()
  531. this.perAddCoid = _buf_.ReadInt()
  532. this.perAddGem = _buf_.ReadInt()
  533. }
  534. /**
  535. * 唯一id
  536. */
  537. readonly idx: number
  538. /**
  539. * 波数
  540. */
  541. readonly waveIndex: number
  542. /**
  543. * 难度
  544. */
  545. readonly level: number
  546. /**
  547. * 怪物模型
  548. */
  549. readonly model: number
  550. /**
  551. * 数量
  552. */
  553. readonly counter: number
  554. /**
  555. * 血量
  556. */
  557. readonly hp: number
  558. /**
  559. * 速度
  560. */
  561. readonly speed: number
  562. /**
  563. * 间距
  564. */
  565. readonly gap: number
  566. /**
  567. * 是否是boss
  568. */
  569. readonly isboss: number
  570. /**
  571. * 每只怪增加局内金币
  572. */
  573. readonly perAddCoid: number
  574. /**
  575. * 每只怪增加局内宝石
  576. */
  577. readonly perAddGem: number
  578. resolve(tables:Tables) {
  579. }
  580. }
  581. export class SkillBuff {
  582. constructor(_buf_: ByteBuf) {
  583. this.idx = _buf_.ReadInt()
  584. this.remark = _buf_.ReadString()
  585. this.type = _buf_.ReadInt()
  586. this.parameters = _buf_.ReadString()
  587. this.probability = _buf_.ReadInt()
  588. this.triggerCondition = _buf_.ReadString()
  589. this.effectType = _buf_.ReadInt()
  590. this.duration = _buf_.ReadInt()
  591. this.overlapTimes = _buf_.ReadInt()
  592. this.uniqueGain = _buf_.ReadBool()
  593. this.halo = _buf_.ReadBool()
  594. this.attributes = _buf_.ReadString()
  595. this.mixBufficon = _buf_.ReadInt()
  596. this.skillShowId = _buf_.ReadInt()
  597. this.floatingTextId = _buf_.ReadInt()
  598. }
  599. /**
  600. * buffid
  601. */
  602. readonly idx: number
  603. /**
  604. * 备注
  605. */
  606. readonly remark: string
  607. /**
  608. * buff类型
  609. */
  610. readonly type: number
  611. /**
  612. * buff参数
  613. */
  614. readonly parameters: string
  615. /**
  616. * 触发概率
  617. */
  618. readonly probability: number
  619. /**
  620. * 触发条件
  621. */
  622. readonly triggerCondition: string
  623. /**
  624. * 效果类型
  625. */
  626. readonly effectType: number
  627. /**
  628. * 持续时间
  629. */
  630. readonly duration: number
  631. /**
  632. * 叠加次数
  633. */
  634. readonly overlapTimes: number
  635. /**
  636. * 唯一增益
  637. */
  638. readonly uniqueGain: boolean
  639. /**
  640. * 是否是光环
  641. */
  642. readonly halo: boolean
  643. /**
  644. * buff增加的属性
  645. */
  646. readonly attributes: string
  647. /**
  648. * 是否合并
  649. */
  650. readonly mixBufficon: number
  651. /**
  652. * 效果id
  653. */
  654. readonly skillShowId: number
  655. /**
  656. * 飘字id
  657. */
  658. readonly floatingTextId: number
  659. resolve(tables:Tables) {
  660. }
  661. }
  662. export class Attr {
  663. constructor(_buf_: ByteBuf) {
  664. this.idx = _buf_.ReadInt()
  665. this.type = _buf_.ReadString()
  666. this.showLogic = _buf_.ReadInt()
  667. this.sort = _buf_.ReadInt()
  668. this.icon = _buf_.ReadString()
  669. this.fightFactor = _buf_.ReadFloat()
  670. this.scoreFactor = _buf_.ReadFloat()
  671. this.showType = _buf_.ReadInt()
  672. this.baseValue = _buf_.ReadLongAsNumber()
  673. }
  674. /**
  675. * 序列
  676. */
  677. readonly idx: number
  678. /**
  679. * 属性ID
  680. */
  681. readonly type: string
  682. /**
  683. * 显示逻辑
  684. */
  685. readonly showLogic: number
  686. /**
  687. * 排序
  688. */
  689. readonly sort: number
  690. /**
  691. * 图标
  692. */
  693. readonly icon: string
  694. /**
  695. * 战力系数
  696. */
  697. readonly fightFactor: number
  698. /**
  699. * 评分系数
  700. */
  701. readonly scoreFactor: number
  702. /**
  703. * 显示类型
  704. */
  705. readonly showType: number
  706. /**
  707. * 基础值
  708. */
  709. readonly baseValue: 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. }