Browse Source

auto config export

Hua 11 months ago
parent
commit
dcea9e2388
1 changed files with 321 additions and 97 deletions
  1. 321 97
      schema/schema.ts

+ 321 - 97
schema/schema.ts

@@ -41,6 +41,44 @@ export enum AccessFlag {
41 41
 }
42 42
 
43 43
 } 
44
+export namespace Hero { 
45
+export enum Quality {
46
+    /**
47
+     * 普通
48
+     */
49
+    Normal = 1,
50
+    /**
51
+     * 高级
52
+     */
53
+    Senior = 2,
54
+    /**
55
+     * 稀有
56
+     */
57
+    Rare = 3,
58
+    /**
59
+     * 传说
60
+     */
61
+    Legend = 4,
62
+    /**
63
+     * 神话
64
+     */
65
+    Myth = 5,
66
+}
67
+
68
+} 
69
+export namespace Hero { 
70
+export enum AttackType {
71
+    /**
72
+     * 近战
73
+     */
74
+    CloseCombat = 1,
75
+    /**
76
+     * 远程
77
+     */
78
+    Remote = 2,
79
+}
80
+
81
+} 
44 82
 
45 83
 
46 84
 
@@ -199,41 +237,130 @@ export class Rectangle extends test.Shape {
199 237
 
200 238
 
201 239
 
202
-export class Item4 {
240
+export class Hero {
203 241
 
204 242
     constructor(_buf_: ByteBuf) {
205 243
         this.id = _buf_.ReadInt()
244
+        this.quality = _buf_.ReadInt()
245
+        this.attacktype = _buf_.ReadInt()
206 246
         this.name = _buf_.ReadString()
207
-        this.maxPileNum = _buf_.ReadInt()
208
-        this.icon = _buf_.ReadString()
209
-        this.iconBackgroud = _buf_.ReadString()
210
-        this.desc = _buf_.ReadString()
247
+        { 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);}}
211 248
     }
212 249
 
213 250
     /**
214
-     * 道具编号
251
+     * 英雄ID
215 252
      */
216 253
     readonly id: number
217 254
     /**
218
-     * 道具名称
255
+     * 品质
256
+     */
257
+    readonly quality: Hero.Quality
258
+    /**
259
+     * 攻击类型
260
+     */
261
+    readonly attacktype: Hero.AttackType
262
+    /**
263
+     * 名字
219 264
      */
220 265
     readonly name: string
221 266
     /**
222
-     * 最大叠加数量
267
+     * 技能列表
223 268
      */
224
-    readonly maxPileNum: number
269
+    readonly skills: number[]
270
+
271
+    resolve(tables:Tables) {
272
+        
273
+        
274
+        
275
+        
276
+        
277
+    }
278
+}
279
+
280
+
281
+
282
+
283
+
284
+export class SkillBuff {
285
+
286
+    constructor(_buf_: ByteBuf) {
287
+        this.idx = _buf_.ReadInt()
288
+        this.remark = _buf_.ReadString()
289
+        this.type = _buf_.ReadInt()
290
+        this.parameters = _buf_.ReadString()
291
+        this.probability = _buf_.ReadInt()
292
+        this.triggerCondition = _buf_.ReadString()
293
+        this.effectType = _buf_.ReadInt()
294
+        this.duration = _buf_.ReadInt()
295
+        this.overlapTimes = _buf_.ReadInt()
296
+        this.uniqueGain = _buf_.ReadBool()
297
+        this.halo = _buf_.ReadBool()
298
+        this.attributes = _buf_.ReadString()
299
+        this.mixBufficon = _buf_.ReadInt()
300
+        this.skillShowId = _buf_.ReadInt()
301
+        this.floatingTextId = _buf_.ReadInt()
302
+    }
303
+
225 304
     /**
226
-     * 道具图标
305
+     * buffid
227 306
      */
228
-    readonly icon: string
307
+    readonly idx: number
229 308
     /**
230
-     * 道具图标底衬
309
+     * 备注
231 310
      */
232
-    readonly iconBackgroud: string
311
+    readonly remark: string
233 312
     /**
234
-     * 道具说明
313
+     * buff类型
235 314
      */
236
-    readonly desc: string
315
+    readonly type: number
316
+    /**
317
+     * buff参数
318
+     */
319
+    readonly parameters: string
320
+    /**
321
+     * 触发概率
322
+     */
323
+    readonly probability: number
324
+    /**
325
+     * 触发条件
326
+     */
327
+    readonly triggerCondition: string
328
+    /**
329
+     * 效果类型
330
+     */
331
+    readonly effectType: number
332
+    /**
333
+     * 持续时间
334
+     */
335
+    readonly duration: number
336
+    /**
337
+     * 叠加次数
338
+     */
339
+    readonly overlapTimes: number
340
+    /**
341
+     * 唯一增益
342
+     */
343
+    readonly uniqueGain: boolean
344
+    /**
345
+     * 是否是光环
346
+     */
347
+    readonly halo: boolean
348
+    /**
349
+     * buff增加的属性
350
+     */
351
+    readonly attributes: string
352
+    /**
353
+     * 是否合并
354
+     */
355
+    readonly mixBufficon: number
356
+    /**
357
+     * 效果id
358
+     */
359
+    readonly skillShowId: number
360
+    /**
361
+     * 飘字id
362
+     */
363
+    readonly floatingTextId: number
237 364
 
238 365
     resolve(tables:Tables) {
239 366
         
@@ -242,6 +369,15 @@ export class Item4 {
242 369
         
243 370
         
244 371
         
372
+        
373
+        
374
+        
375
+        
376
+        
377
+        
378
+        
379
+        
380
+        
245 381
     }
246 382
 }
247 383
 
@@ -249,41 +385,41 @@ export class Item4 {
249 385
 
250 386
 
251 387
 
252
-export class Item3 {
388
+export class HeroLevel {
253 389
 
254 390
     constructor(_buf_: ByteBuf) {
255 391
         this.id = _buf_.ReadInt()
256
-        this.name = _buf_.ReadString()
257
-        this.maxPileNum = _buf_.ReadInt()
258
-        this.icon = _buf_.ReadString()
259
-        this.iconBackgroud = _buf_.ReadString()
260
-        this.desc = _buf_.ReadString()
392
+        this.level = _buf_.ReadInt()
393
+        { 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);}}
394
+        this.unlockSkillDesc = _buf_.ReadString()
395
+        this.atk = _buf_.ReadInt()
396
+        this.atkSpeed = _buf_.ReadInt()
261 397
     }
262 398
 
263 399
     /**
264
-     * 道具编号
400
+     * 英雄ID
265 401
      */
266 402
     readonly id: number
267 403
     /**
268
-     * 道具名称
404
+     * 等级
269 405
      */
270
-    readonly name: string
406
+    readonly level: number
271 407
     /**
272
-     * 最大叠加数量
408
+     * 英雄解锁技能
273 409
      */
274
-    readonly maxPileNum: number
410
+    readonly unlockSkill: number[]
275 411
     /**
276
-     * 道具图标
412
+     * 解锁技能描述
277 413
      */
278
-    readonly icon: string
414
+    readonly unlockSkillDesc: string
279 415
     /**
280
-     * 道具图标底衬
416
+     * 攻击力
281 417
      */
282
-    readonly iconBackgroud: string
418
+    readonly atk: number
283 419
     /**
284
-     * 道具说明
420
+     * 攻击速度
285 421
      */
286
-    readonly desc: string
422
+    readonly atkSpeed: number
287 423
 
288 424
     resolve(tables:Tables) {
289 425
         
@@ -299,41 +435,71 @@ export class Item3 {
299 435
 
300 436
 
301 437
 
302
-export class Item {
438
+export class Skill {
303 439
 
304 440
     constructor(_buf_: ByteBuf) {
305
-        this.id = _buf_.ReadInt()
306
-        this.name = _buf_.ReadString()
307
-        this.maxPileNum = _buf_.ReadInt()
308
-        this.icon = _buf_.ReadString()
309
-        this.iconBackgroud = _buf_.ReadString()
441
+        this.idx = _buf_.ReadInt()
442
+        this.remark = _buf_.ReadString()
443
+        this.skillId = _buf_.ReadInt()
444
+        this.level = _buf_.ReadInt()
445
+        this.skillType = _buf_.ReadInt()
446
+        this.cd = _buf_.ReadInt()
447
+        this.triggerCondition = _buf_.ReadString()
448
+        this.effects = _buf_.ReadString()
449
+        this.buffId = _buf_.ReadString()
450
+        this.skillName = _buf_.ReadString()
310 451
         this.desc = _buf_.ReadString()
452
+        this.conflictSkillId = _buf_.ReadInt()
311 453
     }
312 454
 
313 455
     /**
314
-     * 道具编号
456
+     * 主键id
315 457
      */
316
-    readonly id: number
458
+    readonly idx: number
317 459
     /**
318
-     * 道具名称
460
+     * 备注
319 461
      */
320
-    readonly name: string
462
+    readonly remark: string
463
+    /**
464
+     * 技能ID
465
+     */
466
+    readonly skillId: number
467
+    /**
468
+     * 等级
469
+     */
470
+    readonly level: number
471
+    /**
472
+     * 类型
473
+     */
474
+    readonly skillType: number
321 475
     /**
322
-     * 最大叠加数量
476
+     * 冷却时间
323 477
      */
324
-    readonly maxPileNum: number
478
+    readonly cd: number
325 479
     /**
326
-     * 道具图标
480
+     * 技能触发条件
327 481
      */
328
-    readonly icon: string
482
+    readonly triggerCondition: string
329 483
     /**
330
-     * 道具图标底衬
484
+     * 效果列表
331 485
      */
332
-    readonly iconBackgroud: string
486
+    readonly effects: string
333 487
     /**
334
-     * 道具说明
488
+     * buff
489
+     */
490
+    readonly buffId: string
491
+    /**
492
+     * 技能名字
493
+     */
494
+    readonly skillName: string
495
+    /**
496
+     * 技能描述
335 497
      */
336 498
     readonly desc: string
499
+    /**
500
+     * 冲突的技能id
501
+     */
502
+    readonly conflictSkillId: number
337 503
 
338 504
     resolve(tables:Tables) {
339 505
         
@@ -342,6 +508,12 @@ export class Item {
342 508
         
343 509
         
344 510
         
511
+        
512
+        
513
+        
514
+        
515
+        
516
+        
345 517
     }
346 518
 }
347 519
 
@@ -350,24 +522,27 @@ export class Item {
350 522
 
351 523
 
352 524
 
353
-export class TbItem {
354
-    private _dataMap: Map<number, Item>
355
-    private _dataList: Item[]
525
+/**
526
+ * 英雄表.xlsx
527
+ */
528
+export class TbHero {
529
+    private _dataMap: Map<number, Hero>
530
+    private _dataList: Hero[]
356 531
     constructor(_buf_: ByteBuf) {
357
-        this._dataMap = new Map<number, Item>()
532
+        this._dataMap = new Map<number, Hero>()
358 533
         this._dataList = []
359 534
         for(let n = _buf_.ReadInt(); n > 0; n--) {
360
-            let _v: Item
361
-            _v = new Item(_buf_)
535
+            let _v: Hero
536
+            _v = new Hero(_buf_)
362 537
             this._dataList.push(_v)
363 538
             this._dataMap.set(_v.id, _v)
364 539
         }
365 540
     }
366 541
 
367
-    getDataMap(): Map<number, Item> { return this._dataMap; }
368
-    getDataList(): Item[] { return this._dataList; }
542
+    getDataMap(): Map<number, Hero> { return this._dataMap; }
543
+    getDataList(): Hero[] { return this._dataList; }
369 544
 
370
-    get(key: number): Item | undefined {
545
+    get(key: number): Hero | undefined {
371 546
         return this._dataMap.get(key); 
372 547
     }
373 548
 
@@ -383,27 +558,25 @@ export class TbItem {
383 558
 
384 559
 
385 560
 
386
-export class TbItem3 {
387
-    private _dataMap: Map<number, Item3>
388
-    private _dataList: Item3[]
561
+/**
562
+ * 英雄等级表.xlsx
563
+ */
564
+export class TbHeroLevel {
565
+    private _dataList: HeroLevel[]
566
+    
389 567
     constructor(_buf_: ByteBuf) {
390
-        this._dataMap = new Map<number, Item3>()
391 568
         this._dataList = []
392 569
         for(let n = _buf_.ReadInt(); n > 0; n--) {
393
-            let _v: Item3
394
-            _v = new Item3(_buf_)
570
+            let _v: HeroLevel
571
+            _v = new HeroLevel(_buf_)
395 572
             this._dataList.push(_v)
396
-            this._dataMap.set(_v.id, _v)
397 573
         }
398 574
     }
399 575
 
400
-    getDataMap(): Map<number, Item3> { return this._dataMap; }
401
-    getDataList(): Item3[] { return this._dataList; }
402
-
403
-    get(key: number): Item3 | undefined {
404
-        return this._dataMap.get(key); 
405
-    }
576
+    getDataList(): HeroLevel[] { return this._dataList }
406 577
 
578
+    get(index: number): HeroLevel | undefined { return this._dataList[index] }
579
+    
407 580
     resolve(tables:Tables) {
408 581
         for(let  data of this._dataList)
409 582
         {
@@ -416,24 +589,27 @@ export class TbItem3 {
416 589
 
417 590
 
418 591
 
419
-export class TbItem4 {
420
-    private _dataMap: Map<number, Item4>
421
-    private _dataList: Item4[]
592
+/**
593
+ * ZD技能Buff.xlsx
594
+ */
595
+export class TbSkillBuff {
596
+    private _dataMap: Map<number, SkillBuff>
597
+    private _dataList: SkillBuff[]
422 598
     constructor(_buf_: ByteBuf) {
423
-        this._dataMap = new Map<number, Item4>()
599
+        this._dataMap = new Map<number, SkillBuff>()
424 600
         this._dataList = []
425 601
         for(let n = _buf_.ReadInt(); n > 0; n--) {
426
-            let _v: Item4
427
-            _v = new Item4(_buf_)
602
+            let _v: SkillBuff
603
+            _v = new SkillBuff(_buf_)
428 604
             this._dataList.push(_v)
429
-            this._dataMap.set(_v.id, _v)
605
+            this._dataMap.set(_v.idx, _v)
430 606
         }
431 607
     }
432 608
 
433
-    getDataMap(): Map<number, Item4> { return this._dataMap; }
434
-    getDataList(): Item4[] { return this._dataList; }
609
+    getDataMap(): Map<number, SkillBuff> { return this._dataMap; }
610
+    getDataList(): SkillBuff[] { return this._dataList; }
435 611
 
436
-    get(key: number): Item4 | undefined {
612
+    get(key: number): SkillBuff | undefined {
437 613
         return this._dataMap.get(key); 
438 614
     }
439 615
 
@@ -449,32 +625,80 @@ export class TbItem4 {
449 625
 
450 626
 
451 627
 
628
+/**
629
+ * ZD技能表.xlsx
630
+ */
631
+export class TbSkill {
632
+    private _dataList: Skill[]
633
+    
634
+    constructor(_buf_: ByteBuf) {
635
+        this._dataList = []
636
+        for(let n = _buf_.ReadInt(); n > 0; n--) {
637
+            let _v: Skill
638
+            _v = new Skill(_buf_)
639
+            this._dataList.push(_v)
640
+        }
641
+    }
642
+
643
+    getDataList(): Skill[] { return this._dataList }
644
+
645
+    get(index: number): Skill | undefined { return this._dataList[index] }
646
+    
647
+    resolve(tables:Tables) {
648
+        for(let  data of this._dataList)
649
+        {
650
+            data.resolve(tables)
651
+        }
652
+    }
653
+
654
+}
655
+
656
+
657
+
658
+
452 659
 type ByteBufLoader = (file: string) => ByteBuf
453 660
 
454 661
 export class Tables {
455
-    private _TbItem: TbItem
456
-    get TbItem(): TbItem  { return this._TbItem;}
457
-    private _TbItem3: TbItem3
458
-    get TbItem3(): TbItem3  { return this._TbItem3;}
459
-    private _TbItem4: TbItem4
460
-    get TbItem4(): TbItem4  { return this._TbItem4;}
662
+    private _TbHero: TbHero
663
+    /**
664
+     * 英雄表.xlsx
665
+     */
666
+    get TbHero(): TbHero  { return this._TbHero;}
667
+    private _TbHeroLevel: TbHeroLevel
668
+    /**
669
+     * 英雄等级表.xlsx
670
+     */
671
+    get TbHeroLevel(): TbHeroLevel  { return this._TbHeroLevel;}
672
+    private _TbSkillBuff: TbSkillBuff
673
+    /**
674
+     * ZD技能Buff.xlsx
675
+     */
676
+    get TbSkillBuff(): TbSkillBuff  { return this._TbSkillBuff;}
677
+    private _TbSkill: TbSkill
678
+    /**
679
+     * ZD技能表.xlsx
680
+     */
681
+    get TbSkill(): TbSkill  { return this._TbSkill;}
461 682
 
462 683
     static getTableNames(): string[] {
463 684
         let names: string[] = [];
464
-        names.push('tbitem');
465
-        names.push('tbitem3');
466
-        names.push('tbitem4');
685
+        names.push('tbhero');
686
+        names.push('tbherolevel');
687
+        names.push('tbskillbuff');
688
+        names.push('tbskill');
467 689
         return names;
468 690
     }
469 691
 
470 692
     constructor(loader: ByteBufLoader) {
471
-        this._TbItem = new TbItem(loader('tbitem'))
472
-        this._TbItem3 = new TbItem3(loader('tbitem3'))
473
-        this._TbItem4 = new TbItem4(loader('tbitem4'))
474
-
475
-        this._TbItem.resolve(this)
476
-        this._TbItem3.resolve(this)
477
-        this._TbItem4.resolve(this)
693
+        this._TbHero = new TbHero(loader('tbhero'))
694
+        this._TbHeroLevel = new TbHeroLevel(loader('tbherolevel'))
695
+        this._TbSkillBuff = new TbSkillBuff(loader('tbskillbuff'))
696
+        this._TbSkill = new TbSkill(loader('tbskill'))
697
+
698
+        this._TbHero.resolve(this)
699
+        this._TbHeroLevel.resolve(this)
700
+        this._TbSkillBuff.resolve(this)
701
+        this._TbSkill.resolve(this)
478 702
     }
479 703
 }
480 704