瀏覽代碼

auto config export

Hua 11 月之前
父節點
當前提交
61018b8bd5
共有 1 個文件被更改,包括 240 次插入235 次删除
  1. 240 235
      schema/schema.ts

+ 240 - 235
schema/schema.ts

@@ -289,28 +289,75 @@ export class Cost {
289 289
 
290 290
 
291 291
 
292
-export class SkillBuff {
292
+export class Hero {
293
+
294
+    constructor(_buf_: ByteBuf) {
295
+        this.id = _buf_.ReadInt()
296
+        this.quality = _buf_.ReadInt()
297
+        this.attacktype = _buf_.ReadInt()
298
+        this.name = _buf_.ReadString()
299
+        { 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);}}
300
+        this.isShow = _buf_.ReadInt()
301
+    }
302
+
303
+    /**
304
+     * 英雄ID
305
+     */
306
+    readonly id: number
307
+    /**
308
+     * 品质
309
+     */
310
+    readonly quality: Quality
311
+    /**
312
+     * 攻击类型
313
+     */
314
+    readonly attacktype: AttackType
315
+    /**
316
+     * 名字
317
+     */
318
+    readonly name: string
319
+    /**
320
+     * 技能列表
321
+     */
322
+    readonly skills: number[]
323
+    /**
324
+     * 是否测试
325
+     */
326
+    readonly isShow: number
327
+
328
+    resolve(tables:Tables) {
329
+        
330
+        
331
+        
332
+        
333
+        
334
+        
335
+    }
336
+}
337
+
338
+
339
+
340
+
341
+
342
+export class Skill {
293 343
 
294 344
     constructor(_buf_: ByteBuf) {
295 345
         this.idx = _buf_.ReadInt()
296 346
         this.remark = _buf_.ReadString()
297
-        this.type = _buf_.ReadInt()
298
-        this.parameters = _buf_.ReadString()
299
-        this.probability = _buf_.ReadInt()
347
+        this.skillId = _buf_.ReadInt()
348
+        this.skillType = _buf_.ReadInt()
349
+        this.cd = _buf_.ReadInt()
350
+        this.range = _buf_.ReadInt()
300 351
         this.triggerCondition = _buf_.ReadString()
301
-        this.effectType = _buf_.ReadInt()
302
-        this.duration = _buf_.ReadInt()
303
-        this.overlapTimes = _buf_.ReadInt()
304
-        this.uniqueGain = _buf_.ReadBool()
305
-        this.halo = _buf_.ReadBool()
306
-        this.attributes = _buf_.ReadString()
307
-        this.mixBufficon = _buf_.ReadInt()
308
-        this.skillShowId = _buf_.ReadInt()
309
-        this.floatingTextId = _buf_.ReadInt()
352
+        this.effects = _buf_.ReadString()
353
+        this.buffId = _buf_.ReadString()
354
+        this.skillName = _buf_.ReadString()
355
+        this.desc = _buf_.ReadString()
356
+        this.conflictSkillId = _buf_.ReadInt()
310 357
     }
311 358
 
312 359
     /**
313
-     * buffid
360
+     * 主键id
314 361
      */
315 362
     readonly idx: number
316 363
     /**
@@ -318,57 +365,126 @@ export class SkillBuff {
318 365
      */
319 366
     readonly remark: string
320 367
     /**
321
-     * buff类型
368
+     * 技能ID
322 369
      */
323
-    readonly type: number
370
+    readonly skillId: number
324 371
     /**
325
-     * buff参数
372
+     * 类型
326 373
      */
327
-    readonly parameters: string
374
+    readonly skillType: number
328 375
     /**
329
-     * 触发概率
376
+     * 冷却时间
330 377
      */
331
-    readonly probability: number
378
+    readonly cd: number
332 379
     /**
333
-     * 触发条件
380
+     * 攻击距离
381
+     */
382
+    readonly range: number
383
+    /**
384
+     * 技能触发条件
334 385
      */
335 386
     readonly triggerCondition: string
336 387
     /**
337
-     * 效果类型
388
+     * 效果列表
338 389
      */
339
-    readonly effectType: number
390
+    readonly effects: string
340 391
     /**
341
-     * 持续时间
392
+     * buff
342 393
      */
343
-    readonly duration: number
394
+    readonly buffId: string
344 395
     /**
345
-     * 叠加次数
396
+     * 技能名字
346 397
      */
347
-    readonly overlapTimes: number
398
+    readonly skillName: string
348 399
     /**
349
-     * 唯一增益
400
+     * 技能描述
350 401
      */
351
-    readonly uniqueGain: boolean
402
+    readonly desc: string
352 403
     /**
353
-     * 是否是光环
404
+     * 冲突的技能id
354 405
      */
355
-    readonly halo: boolean
406
+    readonly conflictSkillId: number
407
+
408
+    resolve(tables:Tables) {
409
+        
410
+        
411
+        
412
+        
413
+        
414
+        
415
+        
416
+        
417
+        
418
+        
419
+        
420
+        
421
+    }
422
+}
423
+
424
+
425
+
426
+
427
+
428
+export class Wave {
429
+
430
+    constructor(_buf_: ByteBuf) {
431
+        this.idx = _buf_.ReadInt()
432
+        this.waveIndex = _buf_.ReadInt()
433
+        this.level = _buf_.ReadInt()
434
+        this.model = _buf_.ReadInt()
435
+        this.counter = _buf_.ReadInt()
436
+        this.hp = _buf_.ReadInt()
437
+        this.speed = _buf_.ReadInt()
438
+        this.gap = _buf_.ReadInt()
439
+        this.isboss = _buf_.ReadInt()
440
+        this.perAddCoid = _buf_.ReadInt()
441
+        this.perAddGem = _buf_.ReadInt()
442
+    }
443
+
356 444
     /**
357
-     * buff增加的属性
445
+     * 唯一id
358 446
      */
359
-    readonly attributes: string
447
+    readonly idx: number
360 448
     /**
361
-     * 是否合并
449
+     * 波数
362 450
      */
363
-    readonly mixBufficon: number
451
+    readonly waveIndex: number
364 452
     /**
365
-     * 效果id
453
+     * 难度
366 454
      */
367
-    readonly skillShowId: number
455
+    readonly level: number
368 456
     /**
369
-     * 飘字id
457
+     * 怪物模型
370 458
      */
371
-    readonly floatingTextId: number
459
+    readonly model: number
460
+    /**
461
+     * 数量
462
+     */
463
+    readonly counter: number
464
+    /**
465
+     * 血量
466
+     */
467
+    readonly hp: number
468
+    /**
469
+     * 速度
470
+     */
471
+    readonly speed: number
472
+    /**
473
+     * 间距
474
+     */
475
+    readonly gap: number
476
+    /**
477
+     * 是否是boss
478
+     */
479
+    readonly isboss: number
480
+    /**
481
+     * 每只怪增加局内金币
482
+     */
483
+    readonly perAddCoid: number
484
+    /**
485
+     * 每只怪增加局内宝石
486
+     */
487
+    readonly perAddGem: number
372 488
 
373 489
     resolve(tables:Tables) {
374 490
         
@@ -382,10 +498,6 @@ export class SkillBuff {
382 498
         
383 499
         
384 500
         
385
-        
386
-        
387
-        
388
-        
389 501
     }
390 502
 }
391 503
 
@@ -437,6 +549,38 @@ export class WaveRewards {
437 549
 
438 550
 
439 551
 
552
+export class Item {
553
+
554
+    constructor(_buf_: ByteBuf) {
555
+        this.idx = _buf_.ReadInt()
556
+        this.type = _buf_.ReadInt()
557
+        this.name = _buf_.ReadString()
558
+    }
559
+
560
+    /**
561
+     * 道具ID
562
+     */
563
+    readonly idx: number
564
+    /**
565
+     * 类型
566
+     */
567
+    readonly type: number
568
+    /**
569
+     * 道具名
570
+     */
571
+    readonly name: string
572
+
573
+    resolve(tables:Tables) {
574
+        
575
+        
576
+        
577
+    }
578
+}
579
+
580
+
581
+
582
+
583
+
440 584
 export class System {
441 585
 
442 586
     constructor(_buf_: ByteBuf) {
@@ -511,7 +655,7 @@ export class HeroLevel {
511 655
      */
512 656
     readonly atk: number
513 657
     /**
514
-     * 攻击速度
658
+     * 攻击间隔
515 659
      */
516 660
     readonly atkSpeed: number
517 661
 
@@ -531,188 +675,86 @@ export class HeroLevel {
531 675
 
532 676
 
533 677
 
534
-export class Item {
678
+export class SkillBuff {
535 679
 
536 680
     constructor(_buf_: ByteBuf) {
537 681
         this.idx = _buf_.ReadInt()
682
+        this.remark = _buf_.ReadString()
538 683
         this.type = _buf_.ReadInt()
539
-        this.name = _buf_.ReadString()
540
-    }
541
-
542
-    /**
543
-     * 道具ID
544
-     */
545
-    readonly idx: number
546
-    /**
547
-     * 类型
548
-     */
549
-    readonly type: number
550
-    /**
551
-     * 道具名
552
-     */
553
-    readonly name: string
554
-
555
-    resolve(tables:Tables) {
556
-        
557
-        
558
-        
559
-    }
560
-}
561
-
562
-
563
-
564
-
565
-
566
-export class Wave {
567
-
568
-    constructor(_buf_: ByteBuf) {
569
-        this.idx = _buf_.ReadInt()
570
-        this.waveIndex = _buf_.ReadInt()
571
-        this.level = _buf_.ReadInt()
572
-        this.model = _buf_.ReadInt()
573
-        this.counter = _buf_.ReadInt()
574
-        this.hp = _buf_.ReadInt()
575
-        this.speed = _buf_.ReadInt()
576
-        this.gap = _buf_.ReadInt()
577
-        this.isboss = _buf_.ReadInt()
578
-        this.perAddCoid = _buf_.ReadInt()
579
-        this.perAddGem = _buf_.ReadInt()
684
+        this.parameters = _buf_.ReadString()
685
+        this.probability = _buf_.ReadInt()
686
+        this.triggerCondition = _buf_.ReadString()
687
+        this.effectType = _buf_.ReadInt()
688
+        this.duration = _buf_.ReadInt()
689
+        this.overlapTimes = _buf_.ReadInt()
690
+        this.uniqueGain = _buf_.ReadBool()
691
+        this.halo = _buf_.ReadBool()
692
+        this.attributes = _buf_.ReadString()
693
+        this.mixBufficon = _buf_.ReadInt()
694
+        this.skillShowId = _buf_.ReadInt()
695
+        this.floatingTextId = _buf_.ReadInt()
580 696
     }
581 697
 
582 698
     /**
583
-     * 唯一id
699
+     * buffid
584 700
      */
585 701
     readonly idx: number
586 702
     /**
587
-     * 波数
588
-     */
589
-    readonly waveIndex: number
590
-    /**
591
-     * 难度
592
-     */
593
-    readonly level: number
594
-    /**
595
-     * 怪物模型
596
-     */
597
-    readonly model: number
598
-    /**
599
-     * 数量
600
-     */
601
-    readonly counter: number
602
-    /**
603
-     * 血量
604
-     */
605
-    readonly hp: number
606
-    /**
607
-     * 速度
608
-     */
609
-    readonly speed: number
610
-    /**
611
-     * 间距
612
-     */
613
-    readonly gap: number
614
-    /**
615
-     * 是否是boss
616
-     */
617
-    readonly isboss: number
618
-    /**
619
-     * 每只怪增加局内金币
620
-     */
621
-    readonly perAddCoid: number
622
-    /**
623
-     * 每只怪增加局内宝石
703
+     * 备注
624 704
      */
625
-    readonly perAddGem: number
626
-
627
-    resolve(tables:Tables) {
628
-        
629
-        
630
-        
631
-        
632
-        
633
-        
634
-        
635
-        
636
-        
637
-        
638
-        
639
-    }
640
-}
641
-
642
-
643
-
644
-
645
-
646
-export class Skill {
647
-
648
-    constructor(_buf_: ByteBuf) {
649
-        this.idx = _buf_.ReadInt()
650
-        this.remark = _buf_.ReadString()
651
-        this.skillId = _buf_.ReadInt()
652
-        this.level = _buf_.ReadInt()
653
-        this.skillType = _buf_.ReadInt()
654
-        this.cd = _buf_.ReadInt()
655
-        this.range = _buf_.ReadInt()
656
-        this.triggerCondition = _buf_.ReadString()
657
-        this.effects = _buf_.ReadString()
658
-        this.buffId = _buf_.ReadString()
659
-        this.skillName = _buf_.ReadString()
660
-        this.desc = _buf_.ReadString()
661
-        this.conflictSkillId = _buf_.ReadInt()
662
-    }
663
-
705
+    readonly remark: string
664 706
     /**
665
-     * 主键id
707
+     * buff类型
666 708
      */
667
-    readonly idx: number
709
+    readonly type: number
668 710
     /**
669
-     * 备注
711
+     * buff参数
670 712
      */
671
-    readonly remark: string
713
+    readonly parameters: string
672 714
     /**
673
-     * 技能ID
715
+     * 触发概率
674 716
      */
675
-    readonly skillId: number
717
+    readonly probability: number
676 718
     /**
677
-     * 等级
719
+     * 触发条件
678 720
      */
679
-    readonly level: number
721
+    readonly triggerCondition: string
680 722
     /**
681
-     * 类型
723
+     * 效果类型
682 724
      */
683
-    readonly skillType: number
725
+    readonly effectType: number
684 726
     /**
685
-     * 冷却时间
727
+     * 持续时间
686 728
      */
687
-    readonly cd: number
729
+    readonly duration: number
688 730
     /**
689
-     * 攻击距离
731
+     * 叠加次数
690 732
      */
691
-    readonly range: number
733
+    readonly overlapTimes: number
692 734
     /**
693
-     * 技能触发条件
735
+     * 唯一增益
694 736
      */
695
-    readonly triggerCondition: string
737
+    readonly uniqueGain: boolean
696 738
     /**
697
-     * 效果列表
739
+     * 是否是光环
698 740
      */
699
-    readonly effects: string
741
+    readonly halo: boolean
700 742
     /**
701
-     * buff
743
+     * buff增加的属性
702 744
      */
703
-    readonly buffId: string
745
+    readonly attributes: string
704 746
     /**
705
-     * 技能名字
747
+     * 是否合并
706 748
      */
707
-    readonly skillName: string
749
+    readonly mixBufficon: number
708 750
     /**
709
-     * 技能描述
751
+     * 效果id
710 752
      */
711
-    readonly desc: string
753
+    readonly skillShowId: number
712 754
     /**
713
-     * 冲突的技能id
755
+     * 飘字id
714 756
      */
715
-    readonly conflictSkillId: number
757
+    readonly floatingTextId: number
716 758
 
717 759
     resolve(tables:Tables) {
718 760
         
@@ -728,48 +770,6 @@ export class Skill {
728 770
         
729 771
         
730 772
         
731
-    }
732
-}
733
-
734
-
735
-
736
-
737
-
738
-export class Hero {
739
-
740
-    constructor(_buf_: ByteBuf) {
741
-        this.id = _buf_.ReadInt()
742
-        this.quality = _buf_.ReadInt()
743
-        this.attacktype = _buf_.ReadInt()
744
-        this.name = _buf_.ReadString()
745
-        { 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);}}
746
-    }
747
-
748
-    /**
749
-     * 英雄ID
750
-     */
751
-    readonly id: number
752
-    /**
753
-     * 品质
754
-     */
755
-    readonly quality: Quality
756
-    /**
757
-     * 攻击类型
758
-     */
759
-    readonly attacktype: AttackType
760
-    /**
761
-     * 名字
762
-     */
763
-    readonly name: string
764
-    /**
765
-     * 技能列表
766
-     */
767
-    readonly skills: number[]
768
-
769
-    resolve(tables:Tables) {
770
-        
771
-        
772
-        
773 773
         
774 774
         
775 775
     }
@@ -892,21 +892,26 @@ export class TbSkillBuff {
892 892
  * ZD技能表.xlsx
893 893
  */
894 894
 export class TbSkill {
895
+    private _dataMap: Map<number, Skill>
895 896
     private _dataList: Skill[]
896
-    
897 897
     constructor(_buf_: ByteBuf) {
898
+        this._dataMap = new Map<number, Skill>()
898 899
         this._dataList = []
899 900
         for(let n = _buf_.ReadInt(); n > 0; n--) {
900 901
             let _v: Skill
901 902
             _v = new Skill(_buf_)
902 903
             this._dataList.push(_v)
904
+            this._dataMap.set(_v.skillId, _v)
903 905
         }
904 906
     }
905 907
 
906
-    getDataList(): Skill[] { return this._dataList }
908
+    getDataMap(): Map<number, Skill> { return this._dataMap; }
909
+    getDataList(): Skill[] { return this._dataList; }
910
+
911
+    get(key: number): Skill | undefined {
912
+        return this._dataMap.get(key); 
913
+    }
907 914
 
908
-    get(index: number): Skill | undefined { return this._dataList[index] }
909
-    
910 915
     resolve(tables:Tables) {
911 916
         for(let  data of this._dataList)
912 917
         {