浏览代码

auto config export

Hua 11 月之前
父节点
当前提交
0d4f243856
共有 1 个文件被更改,包括 117 次插入106 次删除
  1. 117 106
      schema/schema.ts

+ 117 - 106
schema/schema.ts

@@ -393,26 +393,26 @@ export class SkillBuff {
393
 
393
 
394
 
394
 
395
 
395
 
396
-export class System {
396
+export class Item {
397
 
397
 
398
     constructor(_buf_: ByteBuf) {
398
     constructor(_buf_: ByteBuf) {
399
         this.idx = _buf_.ReadInt()
399
         this.idx = _buf_.ReadInt()
400
-        this.mainKey = _buf_.ReadString()
401
-        this.value = _buf_.ReadString()
400
+        this.type = _buf_.ReadInt()
401
+        this.name = _buf_.ReadString()
402
     }
402
     }
403
 
403
 
404
     /**
404
     /**
405
-     * IDX
405
+     * 道具ID
406
      */
406
      */
407
     readonly idx: number
407
     readonly idx: number
408
     /**
408
     /**
409
-     * 常量主键
409
+     * 类型
410
      */
410
      */
411
-    readonly mainKey: string
411
+    readonly type: number
412
     /**
412
     /**
413
-     * 常量值
413
+     * 道具名
414
      */
414
      */
415
-    readonly value: string
415
+    readonly name: string
416
 
416
 
417
     resolve(tables:Tables) {
417
     resolve(tables:Tables) {
418
         
418
         
@@ -511,79 +511,43 @@ export class Skill {
511
 
511
 
512
 
512
 
513
 
513
 
514
-export class Wave {
514
+export class WaveRewards {
515
 
515
 
516
     constructor(_buf_: ByteBuf) {
516
     constructor(_buf_: ByteBuf) {
517
         this.idx = _buf_.ReadInt()
517
         this.idx = _buf_.ReadInt()
518
-        this.waveIndex = _buf_.ReadInt()
518
+        this.waveMin = _buf_.ReadInt()
519
+        this.waveMax = _buf_.ReadInt()
519
         this.level = _buf_.ReadInt()
520
         this.level = _buf_.ReadInt()
520
-        this.model = _buf_.ReadInt()
521
-        this.counter = _buf_.ReadInt()
522
-        this.hp = _buf_.ReadInt()
523
-        this.speed = _buf_.ReadInt()
524
-        this.gap = _buf_.ReadInt()
525
-        this.isboss = _buf_.ReadInt()
526
-        this.perAddCoid = _buf_.ReadInt()
527
-        this.perAddGem = _buf_.ReadInt()
521
+        { 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);}}
528
     }
522
     }
529
 
523
 
530
     /**
524
     /**
531
-     * 唯一id
525
+     * idx
532
      */
526
      */
533
     readonly idx: number
527
     readonly idx: number
534
     /**
528
     /**
535
-     * 波数
536
-     */
537
-    readonly waveIndex: number
538
-    /**
539
-     * 难度
540
-     */
541
-    readonly level: number
542
-    /**
543
-     * 怪物模型
544
-     */
545
-    readonly model: number
546
-    /**
547
-     * 数量
548
-     */
549
-    readonly counter: number
550
-    /**
551
-     * 血量
552
-     */
553
-    readonly hp: number
554
-    /**
555
-     * 速度
556
-     */
557
-    readonly speed: number
558
-    /**
559
-     * 间距
529
+     * 波数下限
560
      */
530
      */
561
-    readonly gap: number
531
+    readonly waveMin: number
562
     /**
532
     /**
563
-     * 是否是boss
533
+     * 波数上限
564
      */
534
      */
565
-    readonly isboss: number
535
+    readonly waveMax: number
566
     /**
536
     /**
567
-     * 每只怪增加局内金币
537
+     * 难度
568
      */
538
      */
569
-    readonly perAddCoid: number
539
+    readonly level: number
570
     /**
540
     /**
571
-     * 每只怪增加局内宝石
541
+     * 奖励列表
572
      */
542
      */
573
-    readonly perAddGem: number
543
+    readonly rewards: Common.Reward[]
574
 
544
 
575
     resolve(tables:Tables) {
545
     resolve(tables:Tables) {
576
         
546
         
577
         
547
         
578
         
548
         
579
         
549
         
580
-        
581
-        
582
-        
583
-        
584
-        
585
-        
586
-        
550
+        for (let _e of this.rewards) { _e?.resolve(tables); }
587
     }
551
     }
588
 }
552
 }
589
 
553
 
@@ -591,31 +555,43 @@ export class Wave {
591
 
555
 
592
 
556
 
593
 
557
 
594
-export class Item {
558
+export class Hero {
595
 
559
 
596
     constructor(_buf_: ByteBuf) {
560
     constructor(_buf_: ByteBuf) {
597
-        this.idx = _buf_.ReadInt()
598
-        this.type = _buf_.ReadInt()
561
+        this.id = _buf_.ReadInt()
562
+        this.quality = _buf_.ReadInt()
563
+        this.attacktype = _buf_.ReadInt()
599
         this.name = _buf_.ReadString()
564
         this.name = _buf_.ReadString()
565
+        { 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);}}
600
     }
566
     }
601
 
567
 
602
     /**
568
     /**
603
-     * 道具ID
569
+     * 英雄ID
604
      */
570
      */
605
-    readonly idx: number
571
+    readonly id: number
606
     /**
572
     /**
607
-     * 类型
573
+     * 品质
608
      */
574
      */
609
-    readonly type: number
575
+    readonly quality: Hero.Quality
610
     /**
576
     /**
611
-     * 道具名
577
+     * 攻击类型
578
+     */
579
+    readonly attacktype: Hero.AttackType
580
+    /**
581
+     * 名字
612
      */
582
      */
613
     readonly name: string
583
     readonly name: string
584
+    /**
585
+     * 技能列表
586
+     */
587
+    readonly skills: number[]
614
 
588
 
615
     resolve(tables:Tables) {
589
     resolve(tables:Tables) {
616
         
590
         
617
         
591
         
618
         
592
         
593
+        
594
+        
619
     }
595
     }
620
 }
596
 }
621
 
597
 
@@ -623,43 +599,31 @@ export class Item {
623
 
599
 
624
 
600
 
625
 
601
 
626
-export class Hero {
602
+export class System {
627
 
603
 
628
     constructor(_buf_: ByteBuf) {
604
     constructor(_buf_: ByteBuf) {
629
-        this.id = _buf_.ReadInt()
630
-        this.quality = _buf_.ReadInt()
631
-        this.attacktype = _buf_.ReadInt()
632
-        this.name = _buf_.ReadString()
633
-        { 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);}}
605
+        this.idx = _buf_.ReadInt()
606
+        this.mainKey = _buf_.ReadString()
607
+        this.value = _buf_.ReadString()
634
     }
608
     }
635
 
609
 
636
     /**
610
     /**
637
-     * 英雄ID
638
-     */
639
-    readonly id: number
640
-    /**
641
-     * 品质
642
-     */
643
-    readonly quality: Hero.Quality
644
-    /**
645
-     * 攻击类型
611
+     * IDX
646
      */
612
      */
647
-    readonly attacktype: Hero.AttackType
613
+    readonly idx: number
648
     /**
614
     /**
649
-     * 名字
615
+     * 常量主键
650
      */
616
      */
651
-    readonly name: string
617
+    readonly mainKey: string
652
     /**
618
     /**
653
-     * 技能列表
619
+     * 常量值
654
      */
620
      */
655
-    readonly skills: number[]
621
+    readonly value: string
656
 
622
 
657
     resolve(tables:Tables) {
623
     resolve(tables:Tables) {
658
         
624
         
659
         
625
         
660
         
626
         
661
-        
662
-        
663
     }
627
     }
664
 }
628
 }
665
 
629
 
@@ -667,43 +631,79 @@ export class Hero {
667
 
631
 
668
 
632
 
669
 
633
 
670
-export class WaveRewards {
634
+export class Wave {
671
 
635
 
672
     constructor(_buf_: ByteBuf) {
636
     constructor(_buf_: ByteBuf) {
673
         this.idx = _buf_.ReadInt()
637
         this.idx = _buf_.ReadInt()
674
-        this.waveMin = _buf_.ReadInt()
675
-        this.waveMax = _buf_.ReadInt()
638
+        this.waveIndex = _buf_.ReadInt()
676
         this.level = _buf_.ReadInt()
639
         this.level = _buf_.ReadInt()
677
-        { 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);}}
640
+        this.model = _buf_.ReadInt()
641
+        this.counter = _buf_.ReadInt()
642
+        this.hp = _buf_.ReadInt()
643
+        this.speed = _buf_.ReadInt()
644
+        this.gap = _buf_.ReadInt()
645
+        this.isboss = _buf_.ReadInt()
646
+        this.perAddCoid = _buf_.ReadInt()
647
+        this.perAddGem = _buf_.ReadInt()
678
     }
648
     }
679
 
649
 
680
     /**
650
     /**
681
-     * idx
651
+     * 唯一id
682
      */
652
      */
683
     readonly idx: number
653
     readonly idx: number
684
     /**
654
     /**
685
-     * 波数下限
686
-     */
687
-    readonly waveMin: number
688
-    /**
689
-     * 波数上限
655
+     * 波数
690
      */
656
      */
691
-    readonly waveMax: number
657
+    readonly waveIndex: number
692
     /**
658
     /**
693
      * 难度
659
      * 难度
694
      */
660
      */
695
     readonly level: number
661
     readonly level: number
696
     /**
662
     /**
697
-     * 奖励列表
663
+     * 怪物模型
698
      */
664
      */
699
-    readonly rewards: Common.Reward[]
665
+    readonly model: number
666
+    /**
667
+     * 数量
668
+     */
669
+    readonly counter: number
670
+    /**
671
+     * 血量
672
+     */
673
+    readonly hp: number
674
+    /**
675
+     * 速度
676
+     */
677
+    readonly speed: number
678
+    /**
679
+     * 间距
680
+     */
681
+    readonly gap: number
682
+    /**
683
+     * 是否是boss
684
+     */
685
+    readonly isboss: number
686
+    /**
687
+     * 每只怪增加局内金币
688
+     */
689
+    readonly perAddCoid: number
690
+    /**
691
+     * 每只怪增加局内宝石
692
+     */
693
+    readonly perAddGem: number
700
 
694
 
701
     resolve(tables:Tables) {
695
     resolve(tables:Tables) {
702
         
696
         
703
         
697
         
704
         
698
         
705
         
699
         
706
-        for (let _e of this.rewards) { _e?.resolve(tables); }
700
+        
701
+        
702
+        
703
+        
704
+        
705
+        
706
+        
707
     }
707
     }
708
 }
708
 }
709
 
709
 
@@ -714,6 +714,7 @@ export class WaveRewards {
714
 export class HeroLevel {
714
 export class HeroLevel {
715
 
715
 
716
     constructor(_buf_: ByteBuf) {
716
     constructor(_buf_: ByteBuf) {
717
+        this.idx = _buf_.ReadInt()
717
         this.id = _buf_.ReadInt()
718
         this.id = _buf_.ReadInt()
718
         this.level = _buf_.ReadInt()
719
         this.level = _buf_.ReadInt()
719
         { 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);}}
720
         { 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);}}
@@ -724,6 +725,10 @@ export class HeroLevel {
724
     }
725
     }
725
 
726
 
726
     /**
727
     /**
728
+     * 序號
729
+     */
730
+    readonly idx: number
731
+    /**
727
      * 英雄ID
732
      * 英雄ID
728
      */
733
      */
729
     readonly id: number
734
     readonly id: number
@@ -757,6 +762,7 @@ export class HeroLevel {
757
         
762
         
758
         
763
         
759
         
764
         
765
+        
760
         for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
766
         for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
761
         
767
         
762
         
768
         
@@ -808,21 +814,26 @@ export class TbHero {
808
  * 英雄等级表.xlsx
814
  * 英雄等级表.xlsx
809
  */
815
  */
810
 export class TbHeroLevel {
816
 export class TbHeroLevel {
817
+    private _dataMap: Map<number, HeroLevel>
811
     private _dataList: HeroLevel[]
818
     private _dataList: HeroLevel[]
812
-    
813
     constructor(_buf_: ByteBuf) {
819
     constructor(_buf_: ByteBuf) {
820
+        this._dataMap = new Map<number, HeroLevel>()
814
         this._dataList = []
821
         this._dataList = []
815
         for(let n = _buf_.ReadInt(); n > 0; n--) {
822
         for(let n = _buf_.ReadInt(); n > 0; n--) {
816
             let _v: HeroLevel
823
             let _v: HeroLevel
817
             _v = new HeroLevel(_buf_)
824
             _v = new HeroLevel(_buf_)
818
             this._dataList.push(_v)
825
             this._dataList.push(_v)
826
+            this._dataMap.set(_v.idx, _v)
819
         }
827
         }
820
     }
828
     }
821
 
829
 
822
-    getDataList(): HeroLevel[] { return this._dataList }
830
+    getDataMap(): Map<number, HeroLevel> { return this._dataMap; }
831
+    getDataList(): HeroLevel[] { return this._dataList; }
832
+
833
+    get(key: number): HeroLevel | undefined {
834
+        return this._dataMap.get(key); 
835
+    }
823
 
836
 
824
-    get(index: number): HeroLevel | undefined { return this._dataList[index] }
825
-    
826
     resolve(tables:Tables) {
837
     resolve(tables:Tables) {
827
         for(let  data of this._dataList)
838
         for(let  data of this._dataList)
828
         {
839
         {