Browse Source

auto config export

Hua 1 year ago
parent
commit
00ba5aaf75
1 changed files with 223 additions and 212 deletions
  1. 223 212
      schema/schema.ts

+ 223 - 212
schema/schema.ts

@@ -263,85 +263,43 @@ export class Reward {
263
 
263
 
264
 
264
 
265
 
265
 
266
-export class Skill {
266
+export class WaveRewards {
267
 
267
 
268
     constructor(_buf_: ByteBuf) {
268
     constructor(_buf_: ByteBuf) {
269
         this.idx = _buf_.ReadInt()
269
         this.idx = _buf_.ReadInt()
270
-        this.remark = _buf_.ReadString()
271
-        this.skillId = _buf_.ReadInt()
270
+        this.waveMin = _buf_.ReadInt()
271
+        this.waveMax = _buf_.ReadInt()
272
         this.level = _buf_.ReadInt()
272
         this.level = _buf_.ReadInt()
273
-        this.skillType = _buf_.ReadInt()
274
-        this.cd = _buf_.ReadInt()
275
-        this.triggerCondition = _buf_.ReadString()
276
-        this.effects = _buf_.ReadString()
277
-        this.buffId = _buf_.ReadString()
278
-        this.skillName = _buf_.ReadString()
279
-        this.desc = _buf_.ReadString()
280
-        this.conflictSkillId = _buf_.ReadInt()
273
+        { 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);}}
281
     }
274
     }
282
 
275
 
283
     /**
276
     /**
284
-     * 主键id
277
+     * idx
285
      */
278
      */
286
     readonly idx: number
279
     readonly idx: number
287
     /**
280
     /**
288
-     * 备注
281
+     * 波数下限
289
      */
282
      */
290
-    readonly remark: string
283
+    readonly waveMin: number
291
     /**
284
     /**
292
-     * 技能ID
285
+     * 波数上限
293
      */
286
      */
294
-    readonly skillId: number
287
+    readonly waveMax: number
295
     /**
288
     /**
296
-     * 等级
289
+     * 难度
297
      */
290
      */
298
     readonly level: number
291
     readonly level: number
299
     /**
292
     /**
300
-     * 类型
301
-     */
302
-    readonly skillType: number
303
-    /**
304
-     * 冷却时间
305
-     */
306
-    readonly cd: number
307
-    /**
308
-     * 技能触发条件
309
-     */
310
-    readonly triggerCondition: string
311
-    /**
312
-     * 效果列表
313
-     */
314
-    readonly effects: string
315
-    /**
316
-     * buff
317
-     */
318
-    readonly buffId: string
319
-    /**
320
-     * 技能名字
321
-     */
322
-    readonly skillName: string
323
-    /**
324
-     * 技能描述
325
-     */
326
-    readonly desc: string
327
-    /**
328
-     * 冲突的技能id
293
+     * 奖励列表
329
      */
294
      */
330
-    readonly conflictSkillId: number
295
+    readonly rewards: Common.Reward[]
331
 
296
 
332
     resolve(tables:Tables) {
297
     resolve(tables:Tables) {
333
         
298
         
334
         
299
         
335
         
300
         
336
         
301
         
337
-        
338
-        
339
-        
340
-        
341
-        
342
-        
343
-        
344
-        
302
+        for (let _e of this.rewards) { _e?.resolve(tables); }
345
     }
303
     }
346
 }
304
 }
347
 
305
 
@@ -349,93 +307,86 @@ export class Skill {
349
 
307
 
350
 
308
 
351
 
309
 
352
-export class System {
310
+export class SkillBuff {
353
 
311
 
354
     constructor(_buf_: ByteBuf) {
312
     constructor(_buf_: ByteBuf) {
355
         this.idx = _buf_.ReadInt()
313
         this.idx = _buf_.ReadInt()
356
-        this.mainKey = _buf_.ReadString()
357
-        this.value = _buf_.ReadString()
314
+        this.remark = _buf_.ReadString()
315
+        this.type = _buf_.ReadInt()
316
+        this.parameters = _buf_.ReadString()
317
+        this.probability = _buf_.ReadInt()
318
+        this.triggerCondition = _buf_.ReadString()
319
+        this.effectType = _buf_.ReadInt()
320
+        this.duration = _buf_.ReadInt()
321
+        this.overlapTimes = _buf_.ReadInt()
322
+        this.uniqueGain = _buf_.ReadBool()
323
+        this.halo = _buf_.ReadBool()
324
+        this.attributes = _buf_.ReadString()
325
+        this.mixBufficon = _buf_.ReadInt()
326
+        this.skillShowId = _buf_.ReadInt()
327
+        this.floatingTextId = _buf_.ReadInt()
358
     }
328
     }
359
 
329
 
360
     /**
330
     /**
361
-     * IDX
331
+     * buffid
362
      */
332
      */
363
     readonly idx: number
333
     readonly idx: number
364
     /**
334
     /**
365
-     * 常量主键
335
+     * 备注
366
      */
336
      */
367
-    readonly mainKey: string
337
+    readonly remark: string
368
     /**
338
     /**
369
-     * 常量值
339
+     * buff类型
370
      */
340
      */
371
-    readonly value: string
372
-
373
-    resolve(tables:Tables) {
374
-        
375
-        
376
-        
377
-    }
378
-}
379
-
380
-
381
-
382
-
383
-
384
-export class Wave {
385
-
386
-    constructor(_buf_: ByteBuf) {
387
-        this.waveIndex = _buf_.ReadInt()
388
-        this.level = _buf_.ReadInt()
389
-        this.model = _buf_.ReadInt()
390
-        this.counter = _buf_.ReadInt()
391
-        this.hp = _buf_.ReadInt()
392
-        this.speed = _buf_.ReadInt()
393
-        this.gap = _buf_.ReadInt()
394
-        this.isboss = _buf_.ReadInt()
395
-        this.perAddCoid = _buf_.ReadInt()
396
-        this.perAddGem = _buf_.ReadInt()
397
-    }
398
-
341
+    readonly type: number
399
     /**
342
     /**
400
-     * 
343
+     * buff参数
401
      */
344
      */
402
-    readonly waveIndex: number
345
+    readonly parameters: string
403
     /**
346
     /**
404
-     * 难度
347
+     * 触发概率
405
      */
348
      */
406
-    readonly level: number
349
+    readonly probability: number
407
     /**
350
     /**
408
-     * 怪物模型
351
+     * 触发条件
409
      */
352
      */
410
-    readonly model: number
353
+    readonly triggerCondition: string
411
     /**
354
     /**
412
-     * 数量
355
+     * 效果类型
413
      */
356
      */
414
-    readonly counter: number
357
+    readonly effectType: number
415
     /**
358
     /**
416
-     * 血量
359
+     * 持续时间
417
      */
360
      */
418
-    readonly hp: number
361
+    readonly duration: number
419
     /**
362
     /**
420
-     * 速度
363
+     * 叠加次数
421
      */
364
      */
422
-    readonly speed: number
365
+    readonly overlapTimes: number
423
     /**
366
     /**
424
-     * 间距
367
+     * 唯一增益
425
      */
368
      */
426
-    readonly gap: number
369
+    readonly uniqueGain: boolean
427
     /**
370
     /**
428
-     * 是否是boss
371
+     * 是否是光环
429
      */
372
      */
430
-    readonly isboss: number
373
+    readonly halo: boolean
431
     /**
374
     /**
432
-     * 每只怪增加局内金币
375
+     * buff增加的属性
433
      */
376
      */
434
-    readonly perAddCoid: number
377
+    readonly attributes: string
435
     /**
378
     /**
436
-     * 每只怪增加局内宝石
379
+     * 是否合并
437
      */
380
      */
438
-    readonly perAddGem: number
381
+    readonly mixBufficon: number
382
+    /**
383
+     * 效果id
384
+     */
385
+    readonly skillShowId: number
386
+    /**
387
+     * 飘字id
388
+     */
389
+    readonly floatingTextId: number
439
 
390
 
440
     resolve(tables:Tables) {
391
     resolve(tables:Tables) {
441
         
392
         
@@ -448,6 +399,11 @@ export class Wave {
448
         
399
         
449
         
400
         
450
         
401
         
402
+        
403
+        
404
+        
405
+        
406
+        
451
     }
407
     }
452
 }
408
 }
453
 
409
 
@@ -455,31 +411,85 @@ export class Wave {
455
 
411
 
456
 
412
 
457
 
413
 
458
-export class Item {
414
+export class Skill {
459
 
415
 
460
     constructor(_buf_: ByteBuf) {
416
     constructor(_buf_: ByteBuf) {
461
         this.idx = _buf_.ReadInt()
417
         this.idx = _buf_.ReadInt()
462
-        this.type = _buf_.ReadInt()
463
-        this.name = _buf_.ReadString()
418
+        this.remark = _buf_.ReadString()
419
+        this.skillId = _buf_.ReadInt()
420
+        this.level = _buf_.ReadInt()
421
+        this.skillType = _buf_.ReadInt()
422
+        this.cd = _buf_.ReadInt()
423
+        this.triggerCondition = _buf_.ReadString()
424
+        this.effects = _buf_.ReadString()
425
+        this.buffId = _buf_.ReadString()
426
+        this.skillName = _buf_.ReadString()
427
+        this.desc = _buf_.ReadString()
428
+        this.conflictSkillId = _buf_.ReadInt()
464
     }
429
     }
465
 
430
 
466
     /**
431
     /**
467
-     * 道具ID
432
+     * 主键id
468
      */
433
      */
469
     readonly idx: number
434
     readonly idx: number
470
     /**
435
     /**
436
+     * 备注
437
+     */
438
+    readonly remark: string
439
+    /**
440
+     * 技能ID
441
+     */
442
+    readonly skillId: number
443
+    /**
444
+     * 等级
445
+     */
446
+    readonly level: number
447
+    /**
471
      * 类型
448
      * 类型
472
      */
449
      */
473
-    readonly type: number
450
+    readonly skillType: number
474
     /**
451
     /**
475
-     * 道具名
452
+     * 冷却时间
476
      */
453
      */
477
-    readonly name: string
454
+    readonly cd: number
455
+    /**
456
+     * 技能触发条件
457
+     */
458
+    readonly triggerCondition: string
459
+    /**
460
+     * 效果列表
461
+     */
462
+    readonly effects: string
463
+    /**
464
+     * buff
465
+     */
466
+    readonly buffId: string
467
+    /**
468
+     * 技能名字
469
+     */
470
+    readonly skillName: string
471
+    /**
472
+     * 技能描述
473
+     */
474
+    readonly desc: string
475
+    /**
476
+     * 冲突的技能id
477
+     */
478
+    readonly conflictSkillId: number
478
 
479
 
479
     resolve(tables:Tables) {
480
     resolve(tables:Tables) {
480
         
481
         
481
         
482
         
482
         
483
         
484
+        
485
+        
486
+        
487
+        
488
+        
489
+        
490
+        
491
+        
492
+        
483
     }
493
     }
484
 }
494
 }
485
 
495
 
@@ -531,50 +541,6 @@ export class Hero {
531
 
541
 
532
 
542
 
533
 
543
 
534
-export class WaveRewards {
535
-
536
-    constructor(_buf_: ByteBuf) {
537
-        this.idx = _buf_.ReadInt()
538
-        this.waveMin = _buf_.ReadInt()
539
-        this.waveMax = _buf_.ReadInt()
540
-        this.level = _buf_.ReadInt()
541
-        { 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);}}
542
-    }
543
-
544
-    /**
545
-     * idx
546
-     */
547
-    readonly idx: number
548
-    /**
549
-     * 波数下限
550
-     */
551
-    readonly waveMin: number
552
-    /**
553
-     * 波数上限
554
-     */
555
-    readonly waveMax: number
556
-    /**
557
-     * 难度
558
-     */
559
-    readonly level: number
560
-    /**
561
-     * 奖励列表
562
-     */
563
-    readonly rewards: Common.Reward[]
564
-
565
-    resolve(tables:Tables) {
566
-        
567
-        
568
-        
569
-        
570
-        for (let _e of this.rewards) { _e?.resolve(tables); }
571
-    }
572
-}
573
-
574
-
575
-
576
-
577
-
578
 export class HeroLevel {
544
 export class HeroLevel {
579
 
545
 
580
     constructor(_buf_: ByteBuf) {
546
     constructor(_buf_: ByteBuf) {
@@ -625,86 +591,130 @@ export class HeroLevel {
625
 
591
 
626
 
592
 
627
 
593
 
628
-export class SkillBuff {
594
+export class System {
629
 
595
 
630
     constructor(_buf_: ByteBuf) {
596
     constructor(_buf_: ByteBuf) {
631
         this.idx = _buf_.ReadInt()
597
         this.idx = _buf_.ReadInt()
632
-        this.remark = _buf_.ReadString()
633
-        this.type = _buf_.ReadInt()
634
-        this.parameters = _buf_.ReadString()
635
-        this.probability = _buf_.ReadInt()
636
-        this.triggerCondition = _buf_.ReadString()
637
-        this.effectType = _buf_.ReadInt()
638
-        this.duration = _buf_.ReadInt()
639
-        this.overlapTimes = _buf_.ReadInt()
640
-        this.uniqueGain = _buf_.ReadBool()
641
-        this.halo = _buf_.ReadBool()
642
-        this.attributes = _buf_.ReadString()
643
-        this.mixBufficon = _buf_.ReadInt()
644
-        this.skillShowId = _buf_.ReadInt()
645
-        this.floatingTextId = _buf_.ReadInt()
598
+        this.mainKey = _buf_.ReadString()
599
+        this.value = _buf_.ReadString()
646
     }
600
     }
647
 
601
 
648
     /**
602
     /**
649
-     * buffid
603
+     * IDX
650
      */
604
      */
651
     readonly idx: number
605
     readonly idx: number
652
     /**
606
     /**
653
-     * 备注
607
+     * 常量主键
654
      */
608
      */
655
-    readonly remark: string
609
+    readonly mainKey: string
656
     /**
610
     /**
657
-     * buff类型
611
+     * 常量值
612
+     */
613
+    readonly value: string
614
+
615
+    resolve(tables:Tables) {
616
+        
617
+        
618
+        
619
+    }
620
+}
621
+
622
+
623
+
624
+
625
+
626
+export class Item {
627
+
628
+    constructor(_buf_: ByteBuf) {
629
+        this.idx = _buf_.ReadInt()
630
+        this.type = _buf_.ReadInt()
631
+        this.name = _buf_.ReadString()
632
+    }
633
+
634
+    /**
635
+     * 道具ID
636
+     */
637
+    readonly idx: number
638
+    /**
639
+     * 类型
658
      */
640
      */
659
     readonly type: number
641
     readonly type: number
660
     /**
642
     /**
661
-     * buff参数
643
+     * 道具名
662
      */
644
      */
663
-    readonly parameters: string
645
+    readonly name: string
646
+
647
+    resolve(tables:Tables) {
648
+        
649
+        
650
+        
651
+    }
652
+}
653
+
654
+
655
+
656
+
657
+
658
+export class Wave {
659
+
660
+    constructor(_buf_: ByteBuf) {
661
+        this.idx = _buf_.ReadInt()
662
+        this.waveIndex = _buf_.ReadInt()
663
+        this.level = _buf_.ReadInt()
664
+        this.model = _buf_.ReadInt()
665
+        this.counter = _buf_.ReadInt()
666
+        this.hp = _buf_.ReadInt()
667
+        this.speed = _buf_.ReadInt()
668
+        this.gap = _buf_.ReadInt()
669
+        this.isboss = _buf_.ReadInt()
670
+        this.perAddCoid = _buf_.ReadInt()
671
+        this.perAddGem = _buf_.ReadInt()
672
+    }
673
+
664
     /**
674
     /**
665
-     * 触发概率
675
+     * 唯一id
666
      */
676
      */
667
-    readonly probability: number
677
+    readonly idx: number
668
     /**
678
     /**
669
-     * 触发条件
679
+     * 波数
670
      */
680
      */
671
-    readonly triggerCondition: string
681
+    readonly waveIndex: number
672
     /**
682
     /**
673
-     * 效果类型
683
+     * 难度
674
      */
684
      */
675
-    readonly effectType: number
685
+    readonly level: number
676
     /**
686
     /**
677
-     * 持续时间
687
+     * 怪物模型
678
      */
688
      */
679
-    readonly duration: number
689
+    readonly model: number
680
     /**
690
     /**
681
-     * 叠加次数
691
+     * 数
682
      */
692
      */
683
-    readonly overlapTimes: number
693
+    readonly counter: number
684
     /**
694
     /**
685
-     * 唯一增益
695
+     * 血量
686
      */
696
      */
687
-    readonly uniqueGain: boolean
697
+    readonly hp: number
688
     /**
698
     /**
689
-     * 是否是光环
699
+     * 速度
690
      */
700
      */
691
-    readonly halo: boolean
701
+    readonly speed: number
692
     /**
702
     /**
693
-     * buff增加的属性
703
+     * 间距
694
      */
704
      */
695
-    readonly attributes: string
705
+    readonly gap: number
696
     /**
706
     /**
697
-     * 是否合并
707
+     * 是否是boss
698
      */
708
      */
699
-    readonly mixBufficon: number
709
+    readonly isboss: number
700
     /**
710
     /**
701
-     * 效果id
711
+     * 每只怪增加局内金币
702
      */
712
      */
703
-    readonly skillShowId: number
713
+    readonly perAddCoid: number
704
     /**
714
     /**
705
-     * 飘字id
715
+     * 每只怪增加局内宝石
706
      */
716
      */
707
-    readonly floatingTextId: number
717
+    readonly perAddGem: number
708
 
718
 
709
     resolve(tables:Tables) {
719
     resolve(tables:Tables) {
710
         
720
         
@@ -718,10 +728,6 @@ export class SkillBuff {
718
         
728
         
719
         
729
         
720
         
730
         
721
-        
722
-        
723
-        
724
-        
725
     }
731
     }
726
 }
732
 }
727
 
733
 
@@ -868,21 +874,26 @@ export class TbSkill {
868
  * 波数表.xlsx
874
  * 波数表.xlsx
869
  */
875
  */
870
 export class TbWave {
876
 export class TbWave {
877
+    private _dataMap: Map<number, Wave>
871
     private _dataList: Wave[]
878
     private _dataList: Wave[]
872
-    
873
     constructor(_buf_: ByteBuf) {
879
     constructor(_buf_: ByteBuf) {
880
+        this._dataMap = new Map<number, Wave>()
874
         this._dataList = []
881
         this._dataList = []
875
         for(let n = _buf_.ReadInt(); n > 0; n--) {
882
         for(let n = _buf_.ReadInt(); n > 0; n--) {
876
             let _v: Wave
883
             let _v: Wave
877
             _v = new Wave(_buf_)
884
             _v = new Wave(_buf_)
878
             this._dataList.push(_v)
885
             this._dataList.push(_v)
886
+            this._dataMap.set(_v.idx, _v)
879
         }
887
         }
880
     }
888
     }
881
 
889
 
882
-    getDataList(): Wave[] { return this._dataList }
890
+    getDataMap(): Map<number, Wave> { return this._dataMap; }
891
+    getDataList(): Wave[] { return this._dataList; }
892
+
893
+    get(key: number): Wave | undefined {
894
+        return this._dataMap.get(key); 
895
+    }
883
 
896
 
884
-    get(index: number): Wave | undefined { return this._dataList[index] }
885
-    
886
     resolve(tables:Tables) {
897
     resolve(tables:Tables) {
887
         for(let  data of this._dataList)
898
         for(let  data of this._dataList)
888
         {
899
         {