Browse Source

auto config export

Hua 11 months ago
parent
commit
d6045c74da
1 changed files with 286 additions and 128 deletions
  1. 286 128
      schema/schema.ts

+ 286 - 128
schema/schema.ts

@@ -339,82 +339,6 @@ export class Hero {
339 339
 
340 340
 
341 341
 
342
-export class Item {
343
-
344
-    constructor(_buf_: ByteBuf) {
345
-        this.idx = _buf_.ReadInt()
346
-        this.type = _buf_.ReadInt()
347
-        this.name = _buf_.ReadString()
348
-    }
349
-
350
-    /**
351
-     * 道具ID
352
-     */
353
-    readonly idx: number
354
-    /**
355
-     * 类型
356
-     */
357
-    readonly type: number
358
-    /**
359
-     * 道具名
360
-     */
361
-    readonly name: string
362
-
363
-    resolve(tables:Tables) {
364
-        
365
-        
366
-        
367
-    }
368
-}
369
-
370
-
371
-
372
-
373
-
374
-export class WaveRewards {
375
-
376
-    constructor(_buf_: ByteBuf) {
377
-        this.idx = _buf_.ReadInt()
378
-        this.waveMin = _buf_.ReadInt()
379
-        this.waveMax = _buf_.ReadInt()
380
-        this.level = _buf_.ReadInt()
381
-        { 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);}}
382
-    }
383
-
384
-    /**
385
-     * idx
386
-     */
387
-    readonly idx: number
388
-    /**
389
-     * 波数下限
390
-     */
391
-    readonly waveMin: number
392
-    /**
393
-     * 波数上限
394
-     */
395
-    readonly waveMax: number
396
-    /**
397
-     * 难度
398
-     */
399
-    readonly level: number
400
-    /**
401
-     * 奖励列表
402
-     */
403
-    readonly rewards: Common.Reward[]
404
-
405
-    resolve(tables:Tables) {
406
-        
407
-        
408
-        
409
-        
410
-        for (let _e of this.rewards) { _e?.resolve(tables); }
411
-    }
412
-}
413
-
414
-
415
-
416
-
417
-
418 342
 export class SkillBuff {
419 343
 
420 344
     constructor(_buf_: ByteBuf) {
@@ -519,31 +443,91 @@ export class SkillBuff {
519 443
 
520 444
 
521 445
 
522
-export class System {
446
+export class Skill {
523 447
 
524 448
     constructor(_buf_: ByteBuf) {
525 449
         this.idx = _buf_.ReadInt()
526
-        this.mainKey = _buf_.ReadString()
527
-        this.value = _buf_.ReadString()
450
+        this.remark = _buf_.ReadString()
451
+        this.skillId = _buf_.ReadInt()
452
+        this.skillType = _buf_.ReadInt()
453
+        this.cd = _buf_.ReadInt()
454
+        this.gridRange = _buf_.ReadInt()
455
+        this.range = _buf_.ReadInt()
456
+        this.triggerCondition = _buf_.ReadString()
457
+        this.effects = _buf_.ReadString()
458
+        this.buffId = _buf_.ReadString()
459
+        this.skillName = _buf_.ReadString()
460
+        this.desc = _buf_.ReadString()
461
+        this.conflictSkillId = _buf_.ReadInt()
528 462
     }
529 463
 
530 464
     /**
531
-     * IDX
465
+     * 主键id
532 466
      */
533 467
     readonly idx: number
534 468
     /**
535
-     * 常量主键
469
+     * 备注
536 470
      */
537
-    readonly mainKey: string
471
+    readonly remark: string
538 472
     /**
539
-     * 常量值
473
+     * 技能ID
540 474
      */
541
-    readonly value: string
475
+    readonly skillId: number
476
+    /**
477
+     * 类型
478
+     */
479
+    readonly skillType: number
480
+    /**
481
+     * 冷却时间
482
+     */
483
+    readonly cd: number
484
+    /**
485
+     * 格子范围
486
+     */
487
+    readonly gridRange: number
488
+    /**
489
+     * 攻击距离
490
+     */
491
+    readonly range: number
492
+    /**
493
+     * 技能触发条件
494
+     */
495
+    readonly triggerCondition: string
496
+    /**
497
+     * 效果列表
498
+     */
499
+    readonly effects: string
500
+    /**
501
+     * buff
502
+     */
503
+    readonly buffId: string
504
+    /**
505
+     * 技能名字
506
+     */
507
+    readonly skillName: string
508
+    /**
509
+     * 技能描述
510
+     */
511
+    readonly desc: string
512
+    /**
513
+     * 冲突的技能id
514
+     */
515
+    readonly conflictSkillId: number
542 516
 
543 517
     resolve(tables:Tables) {
544 518
         
545 519
         
546 520
         
521
+        
522
+        
523
+        
524
+        
525
+        
526
+        
527
+        
528
+        
529
+        
530
+        
547 531
     }
548 532
 }
549 533
 
@@ -631,87 +615,173 @@ export class Wave {
631 615
 
632 616
 
633 617
 
634
-export class Skill {
618
+export class WaveRewards {
635 619
 
636 620
     constructor(_buf_: ByteBuf) {
637 621
         this.idx = _buf_.ReadInt()
638
-        this.remark = _buf_.ReadString()
639
-        this.skillId = _buf_.ReadInt()
640
-        this.skillType = _buf_.ReadInt()
641
-        this.cd = _buf_.ReadInt()
642
-        this.gridRange = _buf_.ReadInt()
643
-        this.range = _buf_.ReadInt()
644
-        this.triggerCondition = _buf_.ReadString()
645
-        this.effects = _buf_.ReadString()
646
-        this.buffId = _buf_.ReadString()
647
-        this.skillName = _buf_.ReadString()
648
-        this.desc = _buf_.ReadString()
649
-        this.conflictSkillId = _buf_.ReadInt()
622
+        this.waveMin = _buf_.ReadInt()
623
+        this.waveMax = _buf_.ReadInt()
624
+        this.level = _buf_.ReadInt()
625
+        { 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);}}
650 626
     }
651 627
 
652 628
     /**
653
-     * 主键id
629
+     * idx
654 630
      */
655 631
     readonly idx: number
656 632
     /**
657
-     * 备注
633
+     * 波数下限
658 634
      */
659
-    readonly remark: string
635
+    readonly waveMin: number
660 636
     /**
661
-     * 技能ID
637
+     * 波数上限
662 638
      */
663
-    readonly skillId: number
639
+    readonly waveMax: number
664 640
     /**
665
-     * 类型
641
+     * 难度
666 642
      */
667
-    readonly skillType: number
643
+    readonly level: number
668 644
     /**
669
-     * 冷却时间
645
+     * 奖励列表
670 646
      */
671
-    readonly cd: number
647
+    readonly rewards: Common.Reward[]
648
+
649
+    resolve(tables:Tables) {
650
+        
651
+        
652
+        
653
+        
654
+        for (let _e of this.rewards) { _e?.resolve(tables); }
655
+    }
656
+}
657
+
658
+
659
+
660
+
661
+
662
+export class Item {
663
+
664
+    constructor(_buf_: ByteBuf) {
665
+        this.idx = _buf_.ReadInt()
666
+        this.type = _buf_.ReadInt()
667
+        this.name = _buf_.ReadString()
668
+    }
669
+
672 670
     /**
673
-     * 格子范围
671
+     * 道具ID
674 672
      */
675
-    readonly gridRange: number
673
+    readonly idx: number
676 674
     /**
677
-     * 攻击距离
675
+     * 类型
678 676
      */
679
-    readonly range: number
677
+    readonly type: number
680 678
     /**
681
-     * 技能触发条件
679
+     * 道具名
682 680
      */
683
-    readonly triggerCondition: string
681
+    readonly name: string
682
+
683
+    resolve(tables:Tables) {
684
+        
685
+        
686
+        
687
+    }
688
+}
689
+
690
+
691
+
692
+
693
+
694
+export class System {
695
+
696
+    constructor(_buf_: ByteBuf) {
697
+        this.idx = _buf_.ReadInt()
698
+        this.mainKey = _buf_.ReadString()
699
+        this.value = _buf_.ReadString()
700
+    }
701
+
684 702
     /**
685
-     * 效果列表
703
+     * IDX
686 704
      */
687
-    readonly effects: string
705
+    readonly idx: number
688 706
     /**
689
-     * buff
707
+     * 常量主键
690 708
      */
691
-    readonly buffId: string
709
+    readonly mainKey: string
692 710
     /**
693
-     * 技能名字
711
+     * 常量值
694 712
      */
695
-    readonly skillName: string
713
+    readonly value: string
714
+
715
+    resolve(tables:Tables) {
716
+        
717
+        
718
+        
719
+    }
720
+}
721
+
722
+
723
+
724
+
725
+
726
+export class BattleSummonWeight {
727
+
728
+    constructor(_buf_: ByteBuf) {
729
+        this.idx = _buf_.ReadInt()
730
+        this.quality = _buf_.ReadInt()
731
+        this.weight = _buf_.ReadInt()
732
+    }
733
+
696 734
     /**
697
-     * 技能描述
735
+     * 唯一id
698 736
      */
699
-    readonly desc: string
737
+    readonly idx: number
700 738
     /**
701
-     * 冲突的技能id
739
+     * 品质
702 740
      */
703
-    readonly conflictSkillId: number
741
+    readonly quality: Quality
742
+    /**
743
+     * 权重
744
+     */
745
+    readonly weight: number
704 746
 
705 747
     resolve(tables:Tables) {
706 748
         
707 749
         
708 750
         
709
-        
710
-        
711
-        
712
-        
713
-        
714
-        
751
+    }
752
+}
753
+
754
+
755
+
756
+
757
+
758
+export class HeroQualityWorth {
759
+
760
+    constructor(_buf_: ByteBuf) {
761
+        this.idx = _buf_.ReadInt()
762
+        this.quality = _buf_.ReadInt()
763
+        this.gold = _buf_.ReadInt()
764
+        this.gem = _buf_.ReadInt()
765
+    }
766
+
767
+    /**
768
+     * 唯一id
769
+     */
770
+    readonly idx: number
771
+    /**
772
+     * 品质
773
+     */
774
+    readonly quality: Quality
775
+    /**
776
+     * 局内金币
777
+     */
778
+    readonly gold: number
779
+    /**
780
+     * 局内宝石
781
+     */
782
+    readonly gem: number
783
+
784
+    resolve(tables:Tables) {
715 785
         
716 786
         
717 787
         
@@ -1074,6 +1144,78 @@ export class TbSystem {
1074 1144
 
1075 1145
 
1076 1146
 
1147
+/**
1148
+ * 英雄品质价值表.xlsx
1149
+ */
1150
+export class TbHeroQualityWorth {
1151
+    private _dataMap: Map<number, HeroQualityWorth>
1152
+    private _dataList: HeroQualityWorth[]
1153
+    constructor(_buf_: ByteBuf) {
1154
+        this._dataMap = new Map<number, HeroQualityWorth>()
1155
+        this._dataList = []
1156
+        for(let n = _buf_.ReadInt(); n > 0; n--) {
1157
+            let _v: HeroQualityWorth
1158
+            _v = new HeroQualityWorth(_buf_)
1159
+            this._dataList.push(_v)
1160
+            this._dataMap.set(_v.idx, _v)
1161
+        }
1162
+    }
1163
+
1164
+    getDataMap(): Map<number, HeroQualityWorth> { return this._dataMap; }
1165
+    getDataList(): HeroQualityWorth[] { return this._dataList; }
1166
+
1167
+    get(key: number): HeroQualityWorth | undefined {
1168
+        return this._dataMap.get(key); 
1169
+    }
1170
+
1171
+    resolve(tables:Tables) {
1172
+        for(let  data of this._dataList)
1173
+        {
1174
+            data.resolve(tables)
1175
+        }
1176
+    }
1177
+
1178
+}
1179
+
1180
+
1181
+
1182
+
1183
+/**
1184
+ * 战斗召唤权重表.xlsx
1185
+ */
1186
+export class TbBattleSummonWeight {
1187
+    private _dataMap: Map<number, BattleSummonWeight>
1188
+    private _dataList: BattleSummonWeight[]
1189
+    constructor(_buf_: ByteBuf) {
1190
+        this._dataMap = new Map<number, BattleSummonWeight>()
1191
+        this._dataList = []
1192
+        for(let n = _buf_.ReadInt(); n > 0; n--) {
1193
+            let _v: BattleSummonWeight
1194
+            _v = new BattleSummonWeight(_buf_)
1195
+            this._dataList.push(_v)
1196
+            this._dataMap.set(_v.idx, _v)
1197
+        }
1198
+    }
1199
+
1200
+    getDataMap(): Map<number, BattleSummonWeight> { return this._dataMap; }
1201
+    getDataList(): BattleSummonWeight[] { return this._dataList; }
1202
+
1203
+    get(key: number): BattleSummonWeight | undefined {
1204
+        return this._dataMap.get(key); 
1205
+    }
1206
+
1207
+    resolve(tables:Tables) {
1208
+        for(let  data of this._dataList)
1209
+        {
1210
+            data.resolve(tables)
1211
+        }
1212
+    }
1213
+
1214
+}
1215
+
1216
+
1217
+
1218
+
1077 1219
 type ByteBufLoader = (file: string) => ByteBuf
1078 1220
 
1079 1221
 export class Tables {
@@ -1117,6 +1259,16 @@ export class Tables {
1117 1259
      * 系统常量表.xlsx
1118 1260
      */
1119 1261
     get TbSystem(): TbSystem  { return this._TbSystem;}
1262
+    private _TbHeroQualityWorth: TbHeroQualityWorth
1263
+    /**
1264
+     * 英雄品质价值表.xlsx
1265
+     */
1266
+    get TbHeroQualityWorth(): TbHeroQualityWorth  { return this._TbHeroQualityWorth;}
1267
+    private _TbBattleSummonWeight: TbBattleSummonWeight
1268
+    /**
1269
+     * 战斗召唤权重表.xlsx
1270
+     */
1271
+    get TbBattleSummonWeight(): TbBattleSummonWeight  { return this._TbBattleSummonWeight;}
1120 1272
 
1121 1273
     static getTableNames(): string[] {
1122 1274
         let names: string[] = [];
@@ -1128,6 +1280,8 @@ export class Tables {
1128 1280
         names.push('tbwaverewards');
1129 1281
         names.push('tbitem');
1130 1282
         names.push('tbsystem');
1283
+        names.push('tbheroqualityworth');
1284
+        names.push('tbbattlesummonweight');
1131 1285
         return names;
1132 1286
     }
1133 1287
 
@@ -1140,6 +1294,8 @@ export class Tables {
1140 1294
         this._TbWaveRewards = new TbWaveRewards(loader('tbwaverewards'))
1141 1295
         this._TbItem = new TbItem(loader('tbitem'))
1142 1296
         this._TbSystem = new TbSystem(loader('tbsystem'))
1297
+        this._TbHeroQualityWorth = new TbHeroQualityWorth(loader('tbheroqualityworth'))
1298
+        this._TbBattleSummonWeight = new TbBattleSummonWeight(loader('tbbattlesummonweight'))
1143 1299
 
1144 1300
         this._TbHero.resolve(this)
1145 1301
         this._TbHeroLevel.resolve(this)
@@ -1149,6 +1305,8 @@ export class Tables {
1149 1305
         this._TbWaveRewards.resolve(this)
1150 1306
         this._TbItem.resolve(this)
1151 1307
         this._TbSystem.resolve(this)
1308
+        this._TbHeroQualityWorth.resolve(this)
1309
+        this._TbBattleSummonWeight.resolve(this)
1152 1310
     }
1153 1311
 }
1154 1312