Ver código fonte

auto config export

Hua 11 meses atrás
pai
commit
5379fe9071
1 arquivos alterados com 158 adições e 126 exclusões
  1. 158 126
      schema/schema.ts

+ 158 - 126
schema/schema.ts

@@ -262,101 +262,33 @@ export class Reward {
262 262
 }
263 263
 
264 264
 
265
-
266
-export class WaveRewards {
265
+export namespace Common {
266
+export class Cost {
267 267
 
268 268
     constructor(_buf_: ByteBuf) {
269
-        this.idx = _buf_.ReadInt()
270
-        this.waveMin = _buf_.ReadInt()
271
-        this.waveMax = _buf_.ReadInt()
272
-        this.level = _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);}}
269
+        this.itemid = _buf_.ReadInt()
270
+        this.num = _buf_.ReadInt()
274 271
     }
275 272
 
276 273
     /**
277
-     * idx
278
-     */
279
-    readonly idx: number
280
-    /**
281
-     * 波数下限
282
-     */
283
-    readonly waveMin: number
284
-    /**
285
-     * 波数上限
286
-     */
287
-    readonly waveMax: number
288
-    /**
289
-     * 难度
274
+     * 道具id
290 275
      */
291
-    readonly level: number
276
+    readonly itemid: number
292 277
     /**
293
-     * 奖励列表
278
+     * 数量
294 279
      */
295
-    readonly rewards: Common.Reward[]
280
+    readonly num: number
296 281
 
297 282
     resolve(tables:Tables) {
298 283
         
299 284
         
300
-        
301
-        
302
-        for (let _e of this.rewards) { _e?.resolve(tables); }
303 285
     }
304 286
 }
305 287
 
306
-
307
-
308
-
309
-
310
-export class HeroLevel {
311
-
312
-    constructor(_buf_: ByteBuf) {
313
-        this.id = _buf_.ReadInt()
314
-        this.level = _buf_.ReadInt()
315
-        { 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);}}
316
-        this.unlockSkillDesc = _buf_.ReadString()
317
-        this.atk = _buf_.ReadInt()
318
-        this.atkSpeed = _buf_.ReadInt()
319
-    }
320
-
321
-    /**
322
-     * 英雄ID
323
-     */
324
-    readonly id: number
325
-    /**
326
-     * 等级
327
-     */
328
-    readonly level: number
329
-    /**
330
-     * 英雄解锁技能
331
-     */
332
-    readonly unlockSkill: number[]
333
-    /**
334
-     * 解锁技能描述
335
-     */
336
-    readonly unlockSkillDesc: string
337
-    /**
338
-     * 攻击力
339
-     */
340
-    readonly atk: number
341
-    /**
342
-     * 攻击速度
343
-     */
344
-    readonly atkSpeed: number
345
-
346
-    resolve(tables:Tables) {
347
-        
348
-        
349
-        
350
-        
351
-        
352
-        
353
-    }
354 288
 }
355 289
 
356 290
 
357 291
 
358
-
359
-
360 292
 export class SkillBuff {
361 293
 
362 294
     constructor(_buf_: ByteBuf) {
@@ -579,36 +511,66 @@ export class Skill {
579 511
 
580 512
 
581 513
 
582
-export class Hero {
514
+export class Wave {
583 515
 
584 516
     constructor(_buf_: ByteBuf) {
585
-        this.id = _buf_.ReadInt()
586
-        this.quality = _buf_.ReadInt()
587
-        this.attacktype = _buf_.ReadInt()
588
-        this.name = _buf_.ReadString()
589
-        { 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);}}
517
+        this.idx = _buf_.ReadInt()
518
+        this.waveIndex = _buf_.ReadInt()
519
+        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()
590 528
     }
591 529
 
592 530
     /**
593
-     * 英雄ID
531
+     * 唯一id
594 532
      */
595
-    readonly id: number
533
+    readonly idx: number
596 534
     /**
597
-     * 品质
535
+     * 波数
598 536
      */
599
-    readonly quality: Hero.Quality
537
+    readonly waveIndex: number
600 538
     /**
601
-     * 攻击类型
539
+     * 难度
602 540
      */
603
-    readonly attacktype: Hero.AttackType
541
+    readonly level: number
604 542
     /**
605
-     * 名字
543
+     * 怪物模型
606 544
      */
607
-    readonly name: string
545
+    readonly model: number
608 546
     /**
609
-     * 技能列表
547
+     * 数量
610 548
      */
611
-    readonly skills: number[]
549
+    readonly counter: number
550
+    /**
551
+     * 血量
552
+     */
553
+    readonly hp: number
554
+    /**
555
+     * 速度
556
+     */
557
+    readonly speed: number
558
+    /**
559
+     * 间距
560
+     */
561
+    readonly gap: number
562
+    /**
563
+     * 是否是boss
564
+     */
565
+    readonly isboss: number
566
+    /**
567
+     * 每只怪增加局内金币
568
+     */
569
+    readonly perAddCoid: number
570
+    /**
571
+     * 每只怪增加局内宝石
572
+     */
573
+    readonly perAddGem: number
612 574
 
613 575
     resolve(tables:Tables) {
614 576
         
@@ -616,6 +578,12 @@ export class Hero {
616 578
         
617 579
         
618 580
         
581
+        
582
+        
583
+        
584
+        
585
+        
586
+        
619 587
     }
620 588
 }
621 589
 
@@ -655,77 +623,141 @@ export class Item {
655 623
 
656 624
 
657 625
 
658
-export class Wave {
626
+export class Hero {
627
+
628
+    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);}}
634
+    }
635
+
636
+    /**
637
+     * 英雄ID
638
+     */
639
+    readonly id: number
640
+    /**
641
+     * 品质
642
+     */
643
+    readonly quality: Hero.Quality
644
+    /**
645
+     * 攻击类型
646
+     */
647
+    readonly attacktype: Hero.AttackType
648
+    /**
649
+     * 名字
650
+     */
651
+    readonly name: string
652
+    /**
653
+     * 技能列表
654
+     */
655
+    readonly skills: number[]
656
+
657
+    resolve(tables:Tables) {
658
+        
659
+        
660
+        
661
+        
662
+        
663
+    }
664
+}
665
+
666
+
667
+
668
+
669
+
670
+export class WaveRewards {
659 671
 
660 672
     constructor(_buf_: ByteBuf) {
661 673
         this.idx = _buf_.ReadInt()
662
-        this.waveIndex = _buf_.ReadInt()
674
+        this.waveMin = _buf_.ReadInt()
675
+        this.waveMax = _buf_.ReadInt()
663 676
         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()
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);}}
672 678
     }
673 679
 
674 680
     /**
675
-     * 唯一id
681
+     * idx
676 682
      */
677 683
     readonly idx: number
678 684
     /**
679
-     * 波数
685
+     * 波数下限
680 686
      */
681
-    readonly waveIndex: number
687
+    readonly waveMin: number
688
+    /**
689
+     * 波数上限
690
+     */
691
+    readonly waveMax: number
682 692
     /**
683 693
      * 难度
684 694
      */
685 695
     readonly level: number
686 696
     /**
687
-     * 怪物模型
697
+     * 奖励列表
688 698
      */
689
-    readonly model: number
699
+    readonly rewards: Common.Reward[]
700
+
701
+    resolve(tables:Tables) {
702
+        
703
+        
704
+        
705
+        
706
+        for (let _e of this.rewards) { _e?.resolve(tables); }
707
+    }
708
+}
709
+
710
+
711
+
712
+
713
+
714
+export class HeroLevel {
715
+
716
+    constructor(_buf_: ByteBuf) {
717
+        this.id = _buf_.ReadInt()
718
+        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
+        this.unlockSkillDesc = _buf_.ReadString()
721
+        { let n = Math.min(_buf_.ReadSize(), _buf_.Size); this.upgradeconsume = []; for(let i = 0 ; i < n ; i++) { let _e0; _e0 = new Common.Cost(_buf_); this.upgradeconsume.push(_e0);}}
722
+        this.atk = _buf_.ReadInt()
723
+        this.atkSpeed = _buf_.ReadInt()
724
+    }
725
+
690 726
     /**
691
-     * 数量
727
+     * 英雄ID
692 728
      */
693
-    readonly counter: number
729
+    readonly id: number
694 730
     /**
695
-     * 血量
731
+     * 等级
696 732
      */
697
-    readonly hp: number
733
+    readonly level: number
698 734
     /**
699
-     * 速度
735
+     * 英雄解锁技能
700 736
      */
701
-    readonly speed: number
737
+    readonly unlockSkill: number[]
702 738
     /**
703
-     * 间距
739
+     * 解锁技能描述
704 740
      */
705
-    readonly gap: number
741
+    readonly unlockSkillDesc: string
706 742
     /**
707
-     * 是否是boss
743
+     * 升级消耗
708 744
      */
709
-    readonly isboss: number
745
+    readonly upgradeconsume: Common.Cost[]
710 746
     /**
711
-     * 每只怪增加局内金币
747
+     * 攻击力
712 748
      */
713
-    readonly perAddCoid: number
749
+    readonly atk: number
714 750
     /**
715
-     * 每只怪增加局内宝石
751
+     * 攻击速度
716 752
      */
717
-    readonly perAddGem: number
753
+    readonly atkSpeed: number
718 754
 
719 755
     resolve(tables:Tables) {
720 756
         
721 757
         
722 758
         
723 759
         
724
-        
725
-        
726
-        
727
-        
728
-        
760
+        for (let _e of this.upgradeconsume) { _e?.resolve(tables); }
729 761
         
730 762
         
731 763
     }