yyl
6 小时以前 bcd1dcef07dc129d68539ca2d562c5df53007f36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using System.Linq;
using LitJson;
 
 
public partial class BeautyMMManager : GameSystemManager<BeautyMMManager>
{
 
    public List<int> beautyMMIDSortList = new List<int>();
    public Dictionary<int, BeautyMMData> beautyMMDataDict = new Dictionary<int, BeautyMMData>();    //MMID 对应 数据
    public Dictionary<int, BeautyMMSkinData> beautyMMSkinDataDict = new Dictionary<int, BeautyMMSkinData>();    //皮肤ID 对应 数据
    public event Action OnBeautyMMDataUpdate;
 
    public int selectLoveItemID = 0;
 
    int m_SelectSkinID;
    public event Action OnSelectSkinIDChange;
    public int selectSkinID
    {
        get { return m_SelectSkinID; }
        set
        {
            m_SelectSkinID = value;
            OnSelectSkinIDChange?.Invoke();
        }
    }
    //配置
 
    //道具ID 对应 好感度
    public Dictionary<int, int> giftIDToLoveDict = new Dictionary<int, int>();
    public int[] loveItemIDs;
    public int specialGiftLove = 0; // 数值3:专属信物道具好感度
    public int needLVForTalent = 0; // 数值4:每x级好感度提升一级天赋效果
    public int baseTravelEnergy = 0;    // 数值1:基础体力上限
    public int recoverTravelEnergyTime = 0;   // 数值2:恢复1点体力所需时间,分钟  
    public int[] travelRowCol = new int[2]; // 数值3:游历行列数  行|列
 
    public Dictionary<int, long> allMMTalentAttr = new Dictionary<int, long>();
    public Dictionary<int, int> allMMTalentEffect = new Dictionary<int, int>();
 
 
    public override void Init()
    {
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin += OnBeforePlayerDataInitialize;
        GlobalTimeEvent.Instance.fiveSecondEvent += UpdateRedpoint;
        ParseConfig();
    }
 
    public override void Release()
    {
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEventOnRelogin -= OnBeforePlayerDataInitialize;
        GlobalTimeEvent.Instance.fiveSecondEvent -= UpdateRedpoint;
    }
 
    void OnBeforePlayerDataInitialize()
    {
        beautyMMIDSortList.Clear();
        beautyMMDataDict.Clear();
        beautyMMSkinDataDict.Clear();
        m_GridDict.Clear();
        allMMTalentAttr.Clear();
        allMMTalentEffect.Clear();
    }
 
    void ParseConfig()
    {
        var config = FuncConfigConfig.Get("BeautyLVUP");
        loveItemIDs = JsonMapper.ToObject<int[]>(config.Numerical1);
        var _list2 = JsonMapper.ToObject<int[]>(config.Numerical2);
        for (int i = 0; i < loveItemIDs.Length; i++)
        {
            giftIDToLoveDict[loveItemIDs[i]] = _list2[i];
        }
        specialGiftLove = int.Parse(config.Numerical3);
        needLVForTalent = int.Parse(config.Numerical4);
 
        
        config = FuncConfigConfig.Get("TravelSet");
        baseTravelEnergy = int.Parse(config.Numerical1);
        recoverTravelEnergyTime = int.Parse(config.Numerical2);
        travelRowCol = ConfigParse.GetMultipleStr<int>(config.Numerical3);
        maxGirds = travelRowCol[0] * travelRowCol[1];
        addEnergyItemID = int.Parse(config.Numerical4);
        addEnergyValue = int.Parse(config.Numerical5);
        
    }
 
 
    public void UpdateBeautyMMData(HB130_tagSCBeautyInfo data)
    {
        int activeMMID = 0;
        int activeSkinID = 0;
        foreach (var beauty in data.BeautyList)
        {
            if (data.Count == 1)
            {
                //data.Count == 1 可以理解为解锁回报
                if (beautyMMDataDict.ContainsKey(beauty.BeautyID))
                {
                    if (beautyMMDataDict[beauty.BeautyID].State != beauty.State)
                    {
                       activeMMID = beauty.BeautyID;
                    }
                }
                else if (beauty.State != 0)
                {
                    activeMMID = beauty.BeautyID;
                }
 
            }
            beautyMMDataDict[beauty.BeautyID] = new BeautyMMData()
            {
                State = beauty.State,
                LV = beauty.LV,
                Exp = beauty.Exp,
                AwardLV = beauty.AwardLV,
            };
 
            foreach (var skin in beauty.SkinList)
            {
                if (data.Count == 1)
                {
                    //data.Count == 1 可以理解为解锁回报
                    if (beautyMMSkinDataDict.ContainsKey(skin.SkinID))
                    {
                        if (beautyMMSkinDataDict[skin.SkinID].State != skin.State)
                        {
                            activeSkinID = skin.SkinID;
                        }
                    }
                    else if (skin.State != 0)
                    {
                        activeSkinID = skin.SkinID;
                    }
                }
 
                beautyMMSkinDataDict[skin.SkinID] = new BeautyMMSkinData()
                {
                    State = skin.State,
                    Used = skin.Used,
                    Star = skin.Star,
                };
            }
        }
        UpdateRedpoint();
        RefreshAllTalen();
        OnBeautyMMDataUpdate?.Invoke();
 
        if (activeMMID > 0)
        {
            UIManager.Instance.OpenWindow<BeautyMMActiveWin>(activeMMID);
        }
        else if (activeSkinID > 0)
        {
            UIManager.Instance.OpenWindow<BeautyMMSkinActiveWin>(activeSkinID);
        }
    }
 
    //0 全部 1 已激活 2 未激活
    public void SortMMList(int type)
    {
        var _list = BeautyConfig.GetKeys();
        beautyMMIDSortList.Clear();
        if (type == 0)
        {
            beautyMMIDSortList = _list;
        }
        else if (type == 1)
        {
            foreach (var mmID in _list)
            {
                if (beautyMMDataDict.ContainsKey(mmID) && beautyMMDataDict[mmID].State == 1)
                {
                    beautyMMIDSortList.Add(mmID);
                }
            }
        }
        else if (type == 2)
        {
            foreach (var mmID in _list)
            {
                if (!beautyMMDataDict.ContainsKey(mmID) || beautyMMDataDict[mmID].State == 0)
                {
                    beautyMMIDSortList.Add(mmID);
                }
            }
        }
        beautyMMIDSortList.Sort(CmpMM);
    }
 
    int CmpMM(int mmIDA, int mmIDB)
    {
        bool isActiveA = false;
        if (beautyMMDataDict.ContainsKey(mmIDA))
        {
            isActiveA = beautyMMDataDict[mmIDA].State == 1;
        }
        bool isActiveB = false;
        if (beautyMMDataDict.ContainsKey(mmIDB))
        {
            isActiveB = beautyMMDataDict[mmIDB].State == 1;
        }
        if (isActiveA != isActiveB)
        {
            return isActiveA ? -1 : 1;
        }
        var qualityA = BeautyConfig.Get(mmIDA).BeautyQuality;
        var qualityB = BeautyConfig.Get(mmIDB).BeautyQuality;
        if (qualityA != qualityB)
        {
            return qualityB - qualityA;
        }
        return mmIDA - mmIDB;
    }
 
 
    public BeautyMMData GetBeautyMMData(int mmID)
    {
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            return beautyMMDataDict[mmID];
        }
        return null;
    }
 
    public int GetMMLV(int mmID)
    {
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            return beautyMMDataDict[mmID].LV;
        }
        return 0;
    }
 
    public int GetUsedSkinID(int mmID)
    {
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            var _beauty = beautyMMDataDict[mmID];
            if (_beauty.State == 1)
            {
                foreach (var skin in beautyMMSkinDataDict)
                {
                    if (skin.Value.Used == 1)
                    {
                        return skin.Key;
                    }
                }
            }
        }
        //默认第一个
        var _list = BeautySkinConfig.GetSkinListByMMID(mmID);
        if (_list.Count > 0)
        {
            return _list[0].SkinID;
        }
 
        return 0;
    }
 
    public bool isActiveMM(int mmID)
    {
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            return beautyMMDataDict[mmID].State == 1;
        }
        return false;
    }
 
    // 获取MM天赋属性属性, defaultAttr 是否使用默认属性
    public Dictionary<int, long> GetMMTalentAttrForUI(int mmID, bool defaultAttr = false)
    {
        var _dict = new Dictionary<int, long>();
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            var _beauty = beautyMMDataDict[mmID];
            if (_beauty.State == 1)
            {
                var config = BeautyConfig.Get(mmID);
                if (config != null)
                {
                    //初始天赋属性
                    for (int i = 0; i < config.TalentAttrIDList.Length; i++)
                    {
                        _dict[config.TalentAttrIDList[i]] = config.TalentAttrValueList[i];
                    }
 
                    //按x级好感度提升一级天赋效果
                    var _lv = _beauty.LV;
                    var _addLV = _lv / needLVForTalent;
                    if (_addLV > 0)
                    {
                        for (int i = 0; i < config.TalentAttrIDList.Length; i++)
                        {
                            _dict[config.TalentAttrIDList[i]] += _addLV * config.TalentPerLVAddList[i];
                        }
                    }
                }
                return _dict;
            }
        }
 
        if (defaultAttr)
        {
            var config = BeautyConfig.Get(mmID);
            if (config != null)
            {
                //初始天赋属性
                for (int i = 0; i < config.TalentAttrIDList.Length; i++)
                {
                    _dict[config.TalentAttrIDList[i]] = config.TalentAttrValueList[i];
                }
            }
        }
        return _dict;
    }
 
 
    public int GetTalentEffectByType(TalentEffectType type)
    {
        var value = allMMTalentEffect.ContainsKey((int)type) ? allMMTalentEffect[(int)type] : 0;
        return value;
    }
 
 
    // 真实天赋属性
    public Dictionary<int, long> GetMMTalentAttr(int mmID)
    {
        var _dict = new Dictionary<int, long>();
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            var _beauty = beautyMMDataDict[mmID];
            if (_beauty.State == 1)
            {
                var config = BeautyConfig.Get(mmID);
                if (config != null)
                {
                    //初始天赋属性
                    for (int i = 0; i < config.TalentAttrIDList.Length; i++)
                    {
                        _dict[config.TalentAttrIDList[i]] = config.TalentAttrValueList[i];
                    }
 
                    //按x级好感度提升一级天赋效果
                    var _lv = _beauty.LV;
                    var _addLV = _lv / needLVForTalent;
                    if (_addLV > 0)
                    {
                        for (int i = 0; i < config.TalentAttrIDList.Length; i++)
                        {
                            _dict[config.TalentAttrIDList[i]] += _addLV * config.TalentPerLVAddList[i];
                        }
                    }
                }
                return _dict;
            }
        }
 
        return _dict;
    }
 
 
    public int GetMMTalentEffectForUI(int mmID, bool defaultAttr = true)
    {
        int _effect = 0;
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            var _beauty = beautyMMDataDict[mmID];
            if (_beauty.State == 1)
            {
                var config = BeautyConfig.Get(mmID);
                if (config != null)
                {
                    //初始天赋效果
                    _effect = config.EffValue;
                    //按x级好感度提升一级天赋效果
                    var _lv = _beauty.LV;
                    var _addLV = _lv / needLVForTalent;
                    if (_addLV > 0)
                    {
                        _effect += _addLV * config.EffPerLVAdd;
                    }
                }
                return _effect;
            }
        }
 
        if (defaultAttr)
        {
            var config = BeautyConfig.Get(mmID);
            if (config != null)
            {
                //初始天赋效果
                _effect = config.EffValue;
            }
        }
        return _effect;
    }
 
    // 获取MM天赋效果
    public Dictionary<int, int> GetMMTalentEffect(int mmID)
    {
        int _effect = 0;
        if (beautyMMDataDict.ContainsKey(mmID))
        {
            var _beauty = beautyMMDataDict[mmID];
            if (_beauty.State == 1)
            {
                var config = BeautyConfig.Get(mmID);
                if (config != null)
                {
                    //初始天赋效果
                    _effect = config.EffValue;
                    //按x级好感度提升一级天赋效果
                    var _lv = _beauty.LV;
                    var _addLV = _lv / needLVForTalent;
                    if (_addLV > 0)
                    {
                        _effect += _addLV * config.EffPerLVAdd;
                    }
                }
                return new Dictionary<int, int>()
                {
                    {config.EffType, _effect}
                } ;
            }
        }
        return new Dictionary<int, int>();
    }
 
    Dictionary<int, long> GetMMLVUPAttr(int mmID)
    {
        var mmConfig = BeautyConfig.Get(mmID);
        //升级获得的属性
        var _dict = new Dictionary<int, long>();
        var lv = GetMMLV(mmID);
        BeautyQualityLVConfig config;
        for (int i = 1; i <= lv; i++)
        {
            BeautyQualityLVConfig.TryGetBeautyQualityLVConfig(mmConfig.BeautyQuality, i, out config);
            if (config != null)
            {
                for (int j = 0; j < config.AttrIDList.Length; j++)
                {
                    if (_dict.ContainsKey(config.AttrIDList[j]))
                    {
                        _dict[config.AttrIDList[j]] += config.AttrValueList[j];
                    }
                    else
                    {
                        _dict.Add(config.AttrIDList[j], config.AttrValueList[j]);
                    }
                }
            }
        }
 
 
        return _dict;
 
    }
 
    void RefreshAllTalen()
    {
        allMMTalentAttr.Clear();
        allMMTalentEffect.Clear();
        foreach (var key in beautyMMDataDict.Keys)
        {
            var _dict = GetMMTalentAttr(key);
            //加到allMMTalentAttr
            foreach (var _key in _dict.Keys)
            {
                if (allMMTalentAttr.ContainsKey(_key))
                {
                    allMMTalentAttr[_key] += _dict[_key];
                }
                else
                {
                    allMMTalentAttr.Add(_key, _dict[_key]);
                }
            }
 
            //升级属性
            var _dict1 = GetMMLVUPAttr(key);
            //加到allMMTalentAttr
            foreach (var _key in _dict1.Keys)
            {
                if (allMMTalentAttr.ContainsKey(_key))
                {
                    allMMTalentAttr[_key] += _dict1[_key];
                }
                else
                {
                    allMMTalentAttr.Add(_key, _dict1[_key]);
                }
            }
 
 
            var _dict2 = GetMMTalentEffect(key);
            //加到allMMTalentEffect
            foreach (var _key in _dict2.Keys)
            {
                if (allMMTalentEffect.ContainsKey(_key))
                {
                    allMMTalentEffect[_key] += _dict2[_key];
                }
                else
                {
                    allMMTalentEffect.Add(_key, _dict2[_key]);
                }
            }
        }
 
 
    }
 
    public long GetAttrValue(int attrID)
    {
        allMMTalentAttr.TryGetValue(attrID, out long value);
        return value;
    }
 
    public int GetAttrPer(int attrID)
    {
        if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrID))
        {
            var pertype = PlayerPropertyConfig.baseAttr2perDict[attrID];
            allMMTalentAttr.TryGetValue(pertype, out long value);
            return (int)(value);
        }
 
        return 0;
    }
 
 
    //操作 1-激活;2-佩戴;3-升星
    public void SendSkinOP(int mmID, int skinID, int opType)
    {
        var pack = new CB221_tagCSBeautySkinOP();
        pack.BeautyID = (ushort)mmID;
        pack.SkinID = (ushort)skinID;
        pack.OPType = (byte)opType;
        GameNetSystem.Instance.SendInfo(pack);
    }
 
 
    #region 红点
    Redpoint redpoint = new Redpoint(MainRedDot.MainAffairsRedpoint, MainRedDot.Redpoint_BeautyMM);
    Redpoint redpointMM = new Redpoint(MainRedDot.Redpoint_BeautyMM, MainRedDot.Redpoint_BeautyMM * 10 + 1);
    Redpoint redpointMMTotal = new Redpoint(MainRedDot.Redpoint_BeautyMM * 10 + 1, (MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10);
    Redpoint redpointMMKnown = new Redpoint((MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10, (MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10 + 1);
    Redpoint redpointMMUnKnown = new Redpoint((MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10, (MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10 + 2);
    
 
 
 
 
 
 
    void UpdateRedpoint()
    {
        redpointMMKnown.state = RedPointState.None;
        redpointMMUnKnown.state = RedPointState.None;
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BeautyMM))
        {
            return;
        }
        var _list = BeautyConfig.GetValues();
        foreach (var beauty in _list)
        {
            var state = GetMMBaseState(beauty);
            if (state == 1)
            {
                redpointMMKnown.state = RedPointState.Simple;
            }
            else if (state >= 2)
            {
                redpointMMUnKnown.state = RedPointState.Simple;
            }
        }
 
        // 时装MM 红点
        if (redpointMMKnown.state == RedPointState.None)
        {
            foreach (var beauty in _list)
            {
                if (IsMMSkinRed(beauty.BeautyID))
                {
                    redpointMMKnown.state = RedPointState.Simple;
                    break;
                }
            }
        }
    }
 
    //MM基础状态 0 无 1 有奖励 2 可物品激活 3 可功能激活
    public int GetMMBaseState(BeautyConfig beauty)
    {
        //是否可激活,是否有奖励可领取
        if (beautyMMDataDict.ContainsKey(beauty.BeautyID))
        {
            var _beauty = beautyMMDataDict[beauty.BeautyID];
            if (_beauty.State == 1)
            {
                if (_beauty.LV > _beauty.AwardLV)
                {
                    //有奖励可领取
                    return 1;
                }
                return 0;
            }
 
        }
 
 
        //功能性激活
        switch (beauty.UnlockWay)
        {
            case 1:
                if (PackManager.Instance.GetItemCountByID(PackType.Item, beauty.UnlockValue) >= beauty.UnlockNeedCnt)
                {
                    //可激活
                    return 2;
                }
                break;
            case 2:
                if (TaskManager.Instance.mainTask.TaskID > beauty.UnlockValue)
                {
                    //任务
                    return 3;
                }
                break;
            case 3:
                if (ArenaManager.Instance.totalWinCnt >= beauty.UnlockNeedCnt)
                {
                    return 3;
                }
                break;
            case 4:
                if (GoldRushManager.Instance.maxWorkerCount >= beauty.UnlockNeedCnt)
                {
                    //可激活
                    return 3;
                }
                break;
            case 5:
                int dataMapID = BoneFieldManager.Instance.DataMapID;
                if (DungeonManager.Instance.TryGetFBInfoByMapID(dataMapID, out var fbInfo))
                {
                    if (BoneFieldManager.Instance.GetNowPassLineID(fbInfo) > beauty.UnlockValue)
                    {
                        return 3;
                    }
                }
                break;
            case 6:
                if (PlayerDatas.Instance.baseData.realmLevel >= beauty.UnlockValue)
                {
                    return 3;
                }
                break;
            case 7:
                if (m_TravelCnt >= beauty.UnlockNeedCnt)
                {
                    return 3;
                }
                break;
        }
 
        
 
        return 0;
    }
 
    // 时装MM 状态 (前提是已激活本体的情况) 0 无 1 可激活 2 可升星;
    public int GetMMSkinStateBySkinID(BeautySkinConfig skin)
    {
        if (beautyMMSkinDataDict.ContainsKey(skin.SkinID))
        {
            //升星判断
            var _skin = beautyMMSkinDataDict[skin.SkinID];
            if (_skin.State == 1)
            {
                if (_skin.Star < skin.StarMax && PackManager.Instance.GetItemCountByID(PackType.Item, skin.UnlockValue) >= skin.UpNeedCnt)
                {
                    return 2;
                }
                return 0;
            }
        }
 
        //激活
        if (skin.UnlockWay == 2 && PackManager.Instance.GetItemCountByID(PackType.Item, skin.UnlockValue) >= skin.UnlockNeedCnt)
        {
            return 1;
        }
        return 0;
    }
 
    public BeautyMMSkinData GetSkinData(int skinID)
    {
        if (beautyMMSkinDataDict.ContainsKey(skinID))
        {
            return beautyMMSkinDataDict[skinID];
        }
        return new BeautyMMSkinData();
    }
 
    public bool IsMMSkinRed(int mmID)
    {
        var _list = BeautySkinConfig.GetSkinListByMMID(mmID);
        if (_list == null || _list.Count == 0)
        {
            return false;
        }
        if (!beautyMMDataDict.ContainsKey(mmID))
        {
            return false;
        }
 
        var _beauty = beautyMMDataDict[mmID];
        if (_beauty.State == 0)
        {
            return false;
        }
        foreach (var skin in _list)
        {
            if (GetMMSkinStateBySkinID(skin) > 0)
            {
                return true;
            }
        }
        return false;
 
    }
 
    // 判断基础的养成 和 时装
    public bool IsMMRed(int mmID)
    {
        var config = BeautyConfig.Get(mmID);
        if (GetMMBaseState(config) > 0)
        {
            return true;
        }
 
        return IsMMSkinRed(mmID);
    }
    
    #endregion
    
 
 
}
 
 
public class BeautyMMData
{
    public byte State;        //是否已激活
    public ushort LV;        //红颜好感等级,激活时为0级
    public ushort Exp;        //当前等级经验
    public ushort AwardLV;        //已经领取到的奖励等级记录
}
public class BeautyMMSkinData
{
    public byte State;        //是否已激活
    public byte Used;        //是否已穿戴该时装,某个红颜的所有时装穿戴可能都为0,则前端取默认时装进行展示,如果有同步已穿戴的则以后端为准
    public byte Star;        //时装星级,激活时为0星
}
 
// 1.主线战利品上限提高百分比        无    百分比
// 2.演武场挑战胜利,概率额外获得1个物品的概率    物品ID    概率
// 3.游历体力上限增加        无    增加上限
// 4.白骨盈野扫荡额外物品奖励        物品ID    个数
 
public enum TalentEffectType
{
    MainLine = 1,
    Arena = 2,
    Travel = 3,
    BoneField = 4,
}