少年修仙传客户端代码仓库
client_Hale
2019-04-13 d4b5806a57e4e88a1fc57dd95f17e185f33e4e43
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, April 26, 2018
//--------------------------------------------------------
using System;
using System.Collections.Generic;
 
using Snxxz.UI;
using System.Linq;
//仙玉投资
public class BinningClass
{
    public int Money;//金额
    public int Binning;//
 
}
public class FairyJadeInvestmentClass
{
    public int ID;//ID
    public int Type;//类型
    public int NeedDay;//需要天数
    public int NeedLv;//需要等级
    public MonthlyInvestmentModel.MonthlyInvestmentItem FairyJadeInvestmentItem;//奖励
}
[XLua.LuaCallCSharp]
public class FairyJadeInvestmentModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk, IOpenServerActivity
{
    public Dictionary<int, Dictionary<int, FairyJadeInvestmentClass>> FairyJadeInvestmentTypeDic = new Dictionary<int, Dictionary<int, FairyJadeInvestmentClass>>();//根据投资类型来存储奖励类型和金额(类型3,4,5);
    public Dictionary<int, Dictionary<int, int>> InfoSeriorsTypeDic = new Dictionary<int, Dictionary<int, int>>();//根据类型存储奖励信息
    public Dictionary<int, Dictionary<int, int>> InvestmentAmountTypeDic = new Dictionary<int, Dictionary<int, int>>();//根据类型获得投资金额
    public Dictionary<int, BinningClass> BinningDic = new Dictionary<int, BinningClass>();//根据类型获取各个类型投资的档位金额和分档
    public static Action FairyJadeInfoSeriorsUpdate;
    public int SelectNumber = 0;//记录想要投资的钱数
    public int RecordSelectNumberMax = 0;//用来标记最大可投资额度
    public List<int> MultipleList = new List<int>();
    VipInvestModel m_VipInvestModel;
    VipInvestModel VipInvestModel { get { return m_VipInvestModel ?? (m_VipInvestModel = ModelCenter.Instance.GetModel<VipInvestModel>()); } }
    public int BinningType = 3;
    public event Action<int> onStateUpate;
    public bool IsOpen
    {
        get
        {
            return IsOpenFeatures();
        }
    }
 
    public bool priorityOpen
    {
        get
        {
            return IsRedPoint();
        }
    }
 
    public bool IsAdvance
    {
        get
        {
            return false;
        }
    }
 
    private bool IsRedPoint()//红点
    {
 
        if (redPointStre1.state == RedPointState.None)
        {
            return false;
        }
        else
        {
            return true;
        }
    }
    private bool IsOpenFeatures()//功能是否开启
    {
        bool isOpen = false;
        int InvestmentGrade = GetInvestmentGrade();
        if (InvestmentGrade > 0 && InvestmentGrade < 4)
        {
            isOpen = true;
        }
        else
        {
            if (InvestmentGrade == 4)
            {
                var dit = GetInfoSeriors();
                foreach (int key in dit.Keys)
                {
                    if (dit[key] != 4)
                    {
                        isOpen = true;
                    }
                }
            }
        }
        if (PlayerDatas.Instance.baseData.LV >= 500 && !isOpen)
        {
            return false;
        }
        else
        {
            return true;
        }
    }
 
    private bool IsOk = false;
    public bool IsRedpoint = false;
 
    private int DisplayLevel = 0;//显示等级
    private int DisplayDays = 0;//显示天数
    private bool IsUpdateBool = true;
    public override void Init()
    {
        OpenServerActivityCenter.Instance.Register(10, this);
        var InvestRedPoint = FuncConfigConfig.Get("InvestRedPoint");
        DisplayLevel = int.Parse(InvestRedPoint.Numerical2);
        DisplayDays = int.Parse(InvestRedPoint.Numerical3);
 
        int[] MultipleIntList = ConfigParse.GetMultipleStr<int>(FuncConfigConfig.Get("JadeInvest").Numerical1);
        MultipleList.Clear();
        for (int i = 0; i < MultipleIntList.Length; i++)
        {
            MultipleList.Add(MultipleIntList[i]);
        }
        Assignment();
    }
 
    public void OnBeforePlayerDataInitialize()
    {
        IsUpdateBool = true;
        IsOk = false;
        IsRedpoint = false;
        SelectNumber = 0;
        RecordSelectNumberMax = 0;
        BinningDic.Clear();
        InfoSeriorsTypeDic.Clear();
        InvestmentAmountTypeDic.Clear();    
        FairyJadeInvestmentTypeDic.Clear();
        Assignment();
 
    }
 
    public void OnPlayerLoginOk()
    {
        IsUpdateBool = true;
        IsOk = true;
        InvestmentAmount();
        BinningType = GetFairyJadeType();
        InvestmentRedPoint();
        IsShowRedPointSimple();      
        PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting;
        PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting;
        FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent -= FairyJadeInvestmentRedPoint;
        FairyJadeInvestmentWin.FairyJadeInvestmentRedPointEvent += FairyJadeInvestmentRedPoint;
        GlobalTimeEvent.Instance.secondEvent -= secondEvent;
        GlobalTimeEvent.Instance.secondEvent += secondEvent;
    }
 
    private void secondEvent()
    {
        if (IsUpdateBool)
        {
            int InvestGold = GetInvestGold();
            if (InvestGold > 0)
            {
                InvestmentRedPoint();
            }
            IsShowRedPointSimple();
            IsUpdateBool = false;
        }
    }
 
    private void FairyJadeInvestmentRedPoint()
    {
        RedPointSate();
    }
 
    private void Updatefighting(PlayerDataType _tCDBPlayerRefresh)
    {
        if (_tCDBPlayerRefresh == PlayerDataType.LV)
        {
            IsUpdateBool = true; 
        }
    }
 
    public override void UnInit()
    {
 
    }
 
    private void AssignmentType()
    {
        //根据投资类型来存储奖励信息(类型3,4,5)
        if (FairyJadeInvestmentTypeDic.Count >= 3)
        {
            return;
        }
        var investConfig = InvestConfig.GetValues();
        foreach (var value in investConfig)
        {
            if ((value.type == 3 || value.type == 4 || value.type == 5))
            {
                if (!FairyJadeInvestmentTypeDic.ContainsKey(value.type))
                {
                    Dictionary<int, FairyJadeInvestmentClass> Dic = new Dictionary<int, FairyJadeInvestmentClass>();
                    FairyJadeInvestmentClass fairyJadeInvestment = new FairyJadeInvestmentClass();
                    fairyJadeInvestment.ID = value.id % 100;
                    fairyJadeInvestment.Type = value.type;
                    fairyJadeInvestment.NeedDay = value.needDay;
                    fairyJadeInvestment.NeedLv = value.needLV;
                    SetInfoSeriors(value.type, fairyJadeInvestment.ID);
                    MonthlyInvestmentModel.MonthlyInvestmentItem FairyJadeItem = new MonthlyInvestmentModel.MonthlyInvestmentItem();
                    var _jsonData = LitJson.JsonMapper.ToObject(value.award);
                    foreach (string key in _jsonData.Keys)
                    {
                        var _job = int.Parse(key);
                        var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
                        for (int j = 0; j < _itemArray.Length; j++)
                        {
                            FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
                        }
                    }
                    fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem;
                    Dic.Add(value.needLV, fairyJadeInvestment);
                    FairyJadeInvestmentTypeDic.Add(value.type, Dic);
                }
                else
                {
                    var dict = FairyJadeInvestmentTypeDic[value.type];
                    FairyJadeInvestmentClass fairyJadeInvestment = new FairyJadeInvestmentClass();
                    fairyJadeInvestment.ID = fairyJadeInvestment.ID = value.id % 100;
                    SetInfoSeriors(value.type, fairyJadeInvestment.ID);
                    fairyJadeInvestment.Type = value.type;
                    fairyJadeInvestment.NeedDay = value.needDay;
                    fairyJadeInvestment.NeedLv = value.needLV;
                    MonthlyInvestmentModel.MonthlyInvestmentItem FairyJadeItem = new MonthlyInvestmentModel.MonthlyInvestmentItem();
                    var _jsonData = LitJson.JsonMapper.ToObject(value.award);
                    foreach (string key in _jsonData.Keys)
                    {
                        var _job = int.Parse(key);
                        var _itemArray = LitJson.JsonMapper.ToObject<int[][]>(_jsonData[key].ToJson());
                        for (int j = 0; j < _itemArray.Length; j++)
                        {
                            FairyJadeItem.Add(_job, new Item(_itemArray[j][0], _itemArray[j][1]));
                        }
                    }
                    fairyJadeInvestment.FairyJadeInvestmentItem = FairyJadeItem;
                    if (!dict.ContainsKey(value.needLV))
                    {
                        dict.Add(value.needLV, fairyJadeInvestment);
 
                    }
                    else
                    {
                        dict[value.needLV] = fairyJadeInvestment;
                    }
                }
            }
        }
    }
 
    private void SetInfoSeriors(int type, int id)
    {
        if (!InfoSeriorsTypeDic.ContainsKey(type))
        {
            Dictionary<int, int> dic = new Dictionary<int, int>();
            dic.Add(id, 0);
            InfoSeriorsTypeDic.Add(type, dic);
        }
        else
        {
            var dict = InfoSeriorsTypeDic[type];
            if (dict.ContainsKey(id))
            {
                dict.Add(id, 0);
            }
            else
            {
                dict[id] = 0;
            }
            InfoSeriorsTypeDic[type] = dict;
        }
 
    }
    public void Assignment()
    {
        AssignmentType();
    }
 
    public void GetInfoSeriors(HA337_tagMCGoldInvestInfo vNetData)//接受信息
    {
        if (vNetData.InvestType == 3 || vNetData.InvestType == 4 || vNetData.InvestType == 5)
        {
            InvestmentAmount();
            if (BinningDic.ContainsKey(vNetData.InvestType) && InvestmentAmountTypeDic.ContainsKey(vNetData.InvestType))
            {
                var dit = InvestmentAmountTypeDic[vNetData.InvestType];
                if (dit.ContainsKey((int)vNetData.InvestGold))
                {
                    BinningClass binningClass = new BinningClass();
                    binningClass.Money= (int)vNetData.InvestGold;
                    binningClass.Binning= dit[(int)vNetData.InvestGold];
                    BinningDic[vNetData.InvestType] = binningClass;
                }
 
            }
            if (InfoSeriorsTypeDic.ContainsKey(vNetData.InvestType))//奖励刷新赋值
            {
                var Dit = InfoSeriorsTypeDic[vNetData.InvestType];
                for (int i = 0; i < vNetData.RewardRecordCnt; i++)
                {
                    if (Dit.ContainsKey((int)vNetData.InvestRewardList[i].RewardIndex))
                    {
                        Dit[(int)vNetData.InvestRewardList[i].RewardIndex] = (int)vNetData.InvestRewardList[i].RewardValue;
                    }
                }
                InfoSeriorsTypeDic[vNetData.InvestType] = Dit;
            }
            InvestmentRedPoint();
            if (FairyJadeInfoSeriorsUpdate != null)
            {
                FairyJadeInfoSeriorsUpdate();
            }
        }
    }
 
    public void SendInvestment(int InvestType, int RewardIndex)//领取奖励
    {
        CA541_tagCMGetInvestReward CA541 = new CA541_tagCMGetInvestReward();
        CA541.InvestType = (byte)InvestType;
        CA541.RewardIndex = (byte)RewardIndex;
        GameNetSystem.Instance.SendInfo(CA541);
    }
 
    public void InvestmentMonthlyInvestment(int InvestType, int InvestGold)//仙玉投资
    {
        CA540_tagCMGoldInvest C540 = new CA540_tagCMGoldInvest();
        C540.InvestType = (byte)InvestType;
        C540.InvestGold = (uint)InvestGold;
        GameNetSystem.Instance.SendInfo(C540);
    }
 
    public void InvestmentAmount()
    {
        InvestmentAmountType();
        SetBinning();
    }
 
    private void SetBinning()
    {
        if (BinningDic.Count > 0)
        {
            return;
        }
        BinningClass binning1 = new BinningClass();
        BinningClass binning2 = new BinningClass();
        BinningClass binning3 = new BinningClass();
        BinningDic.Add(3, binning1);
        BinningDic.Add(4, binning2);
        BinningDic.Add(5, binning3);
    }
    private void InvestmentAmountType()
    {
        if (InvestmentAmountTypeDic.Count > 0)
        {
            return;
        }
        Dictionary<int, int> Dic = new Dictionary<int, int>();
        Dic.Add(VipInvestModel.GetInvestGold(3, 0), 1);
        Dic.Add(VipInvestModel.GetInvestGold(3, 1), 2);
        Dic.Add(VipInvestModel.GetInvestGold(3, 2), 3);
        Dic.Add(VipInvestModel.GetInvestGold(3, 3), 4);
        RecordSelectNumberMax = VipInvestModel.GetInvestGold(3, 3);
        InvestmentAmountTypeDic.Add(3, Dic);
        InvestmentAmountTypeDic.Add(4, Dic);
        InvestmentAmountTypeDic.Add(5, Dic);
    }
    private const int Redpoint_key1 = 20910;
    public Redpoint redPointStre1 = new Redpoint(209, Redpoint_key1);//仙玉投资红点
    public int JumpInedx = 0;
 
 
 
    private void InvestmentRedPoint()//红点
    {
        JumpInedx = 0;
        int type = -1;
        redPointStre1.state = RedPointState.None;
        int PlayerLV = PlayerDatas.Instance.baseData.LV;
        int InvestmentGrade = GetInvestmentGrade();
        int _type = BinningType;
 
        if (!FairyJadeInvestmentTypeDic.ContainsKey(_type))
        {
            return;
        }
        var Dit = FairyJadeInvestmentTypeDic[_type];
        foreach (var key in Dit.Keys)
        {
            type += 1;
            if (PlayerLV >= key)
            {
                int indexID = Dit[key].ID;
                if (InvestmentGrade != 0)
                {
                    var dit = GetInfoSeriors();
                    int IsReceive = 0;
                    if (dit.ContainsKey(indexID))
                    {
                        IsReceive = dit[indexID];
                    }
                    if (IsReceive == 0)
                    {
                        redPointStre1.state = RedPointState.GetReward;
                        JumpInedx = type;
                        return;
                    }
                    else
                    {
                        List<Item> fairyJadeInvestmentItem = Dit[key].FairyJadeInvestmentItem.GetAwardItem(InvestmentGrade);
                        int AtPresentNumber = 0;
                        if (IsReceive != 0)
                        {
                            List<Item> fairyJadeInvestmentItemAdd = Dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive);
                            Item itemAdd = fairyJadeInvestmentItemAdd[0];
                            AtPresentNumber = itemAdd.count;
                        }
                        if (fairyJadeInvestmentItem[0].count > AtPresentNumber)
                        {
                            redPointStre1.state = RedPointState.GetReward;
                            JumpInedx = type;
                            return;
                        }
                    }
                }
            }
        }
        int type1 = -1;
        if (JumpInedx == 0 && InvestmentGrade != 0)
        {
            foreach (var key in Dit.Keys)
            {
                type1 += 1;
                if (key > PlayerLV)
                {
                    JumpInedx = type1;
                    return;
                }
            }
        }
    }
    private void RedPointSate()//月卡投资创角前三天红点
    {
        int InvestGold = GetInvestGold();
        if (InvestGold > 0)
        {
            return;
        }
        if (IsRedpoint)
        {
            if (IsOpenFeatures())
            {
                redPointStre1.state = RedPointState.Simple;
            }
 
        }
        else
        {
            InvestmentRedPoint();
        }
    }
 
    private void IsShowRedPointSimple()
    {
        int GetDayOfYear = DateTime.Now.DayOfYear;
        string strKey = "IsOpenFiaryJadeRedPoint" + PlayerDatas.Instance.baseData.PlayerID;
        int day = LocalSave.GetInt(strKey);
        if (day != GetDayOfYear)
        {
            if (TimeUtility.CreateDays <= DisplayDays && redPointStre1.state == RedPointState.None
                && PlayerDatas.Instance.baseData.LV >= DisplayLevel)
            {
                LocalSave.SetInt(strKey, GetDayOfYear);
                IsRedpoint = true;
                RedPointSate();
                return;
            }
 
        }
        if (!IsOpenFeatures())//功能关闭
        {
            redPointStre1.state = RedPointState.None;
            return;
        }
    }
 
    public void MessageNotification()
    {
        var _funcOrder = 0;
        int InvestmentGrade = GetInvestmentGrade();
        if (!OpenServerActivityCenter.Instance.IsAnyActivityOpen(out _funcOrder))
        {
            SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit1");//信息提示
            return;
        }
        else if (InvestmentGrade <= 0 && PlayerDatas.Instance.baseData.LV >= 300)
        {
            SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit2");//信息提示
            return;
        }
        else
        {
            bool isOpen = false;
            if (InvestmentGrade == 4)
            {
                var dit = GetInfoSeriors();
                foreach (int key in dit.Keys)
                {
                    if (dit[key] != 4)
                    {
                        isOpen = true;
                    }
                }
            }
            if (!isOpen && PlayerDatas.Instance.baseData.LV >= 300)
            {
                SysNotifyMgr.Instance.ShowTip("JadeInvestmentLimit3");//信息提示
                return;
            }
        }
    }
 
    public int GetFairyJadeType()//获取投资类型
    {
        int type = 3;
        bool Isbool = true;
        int PlayerLV = PlayerDatas.Instance.baseData.LV;
        foreach (var key in BinningDic.Keys)
        {
            if (BinningDic[key].Money != 0)
            {
                Isbool = false;
            }
        }
        if (Isbool)//没有投资过永远为第一档
        {
            return 3;
        }
        bool Isbool3 = false;
      
        if (FairyJadeInvestmentTypeDic.ContainsKey(3) && InfoSeriorsTypeDic.ContainsKey(3))
        {
            int typeGrade = GetInvestmentGradeT(3);
            var dit = FairyJadeInvestmentTypeDic[3];
            var dit1 = InfoSeriorsTypeDic[3];
            foreach (var key in dit.Keys)
            {
                if (PlayerLV >= key)
                {
                    int indexID = dit[key].ID;
                    int IsReceive = dit1[indexID];
                    if (IsReceive == 0)
                    {
                        Isbool3 = true;
                    }
                    else
                    {
                        List<Item> fairyJadeInvestmentItem = dit[key].FairyJadeInvestmentItem.GetAwardItem(typeGrade);
                        int AtPresentNumber = 0;
                        if (IsReceive != 0)
                        {
                            List<Item> fairyJadeInvestmentItemAdd = dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive);
                            Item itemAdd = fairyJadeInvestmentItemAdd[0];
                            AtPresentNumber = itemAdd.count;
                        }
                        if (fairyJadeInvestmentItem[0].count > AtPresentNumber)
                        {
                            Isbool3 = true;
                        }
                    }
                }
            }
        }
        if (Isbool3 || PlayerLV <= 300)
        {
            return 3;
        }
        if (BinningDic.ContainsKey(4) && BinningDic[4].Money == 0)
        {
            return 4;
        }
        bool Isbool4 = false;
        if (BinningDic.ContainsKey(4) && BinningDic[4].Money != 0 && FairyJadeInvestmentTypeDic.ContainsKey(4) && InfoSeriorsTypeDic.ContainsKey(4))
        {
            int typeGrade = GetInvestmentGradeT(4);
            var dit = FairyJadeInvestmentTypeDic[4];
            var dit1 = InfoSeriorsTypeDic[4];
            foreach (var key in dit.Keys)
            {
                if (PlayerLV >= key)
                {
                    int indexID = dit[key].ID;
                    int IsReceive = dit1[indexID];
                    if (IsReceive == 0)
                    {
                        Isbool4 = true;
                    }
                    else
                    {
                        List<Item> fairyJadeInvestmentItem = dit[key].FairyJadeInvestmentItem.GetAwardItem(typeGrade);
                        int AtPresentNumber = 0;
                        if (IsReceive != 0)
                        {
                            List<Item> fairyJadeInvestmentItemAdd = dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive);
                            Item itemAdd = fairyJadeInvestmentItemAdd[0];
                            AtPresentNumber = itemAdd.count;
                        }
                        if (fairyJadeInvestmentItem[0].count > AtPresentNumber)
                        {
                            Isbool4 = true;
                        }
 
                    }
                }
            }
        }
        if ((PlayerLV > 300 && PlayerLV <= 400) || Isbool4)
        {
            return 4;
        }
        if (BinningDic.ContainsKey(5) && BinningDic[5].Money == 0)
        {
            return 5;
        }
        bool Isbool5 = false;
        if (FairyJadeInvestmentTypeDic.ContainsKey(5) && InfoSeriorsTypeDic.ContainsKey(5))
        {
            int typeGrade = GetInvestmentGradeT(5);
            var dit = FairyJadeInvestmentTypeDic[5];
            var dit1 = InfoSeriorsTypeDic[5];
            foreach (var key in dit.Keys)
            {
                if (PlayerLV >= key)
                {
                    int indexID = dit[key].ID;
                    int IsReceive = dit1[indexID];
                    if (IsReceive == 0)
                    {
                        Isbool5 = true;
                    }
                    else
                    {
                        List<Item> fairyJadeInvestmentItem = dit[key].FairyJadeInvestmentItem.GetAwardItem(typeGrade);
                        int AtPresentNumber = 0;
                        if (IsReceive != 0)
                        {
                            List<Item> fairyJadeInvestmentItemAdd = dit[key].FairyJadeInvestmentItem.GetAwardItem(IsReceive);
                            Item itemAdd = fairyJadeInvestmentItemAdd[0];
                            AtPresentNumber = itemAdd.count;
                        }
                        if (fairyJadeInvestmentItem[0].count > AtPresentNumber)
                        {
                            Isbool5 = true;
                        }
                    }
                }
            }
        }
 
        if ((PlayerLV > 400 && PlayerLV <= 500) || Isbool5)
        {
            return 5;
        }
        return 5;
    }
 
    private int GetInvestmentGradeT(int Type)
    {
        int InvestmentGrade = 0;
        if (BinningDic.ContainsKey(Type))
        {
            InvestmentGrade = BinningDic[Type].Binning;
        }
        return InvestmentGrade;
    }
    public int GetInvestmentGrade()//获取投资档位
    {
        int InvestmentGrade = 0;
        int type =BinningType;
        if (BinningDic.ContainsKey(type))
        {
            InvestmentGrade = BinningDic[type].Binning;
        }
        return InvestmentGrade;
    }
    public int GetInvestGold()//获取投资金额
    {
        int InvestGold = 0;
        int type = BinningType;
        if (BinningDic.ContainsKey(type))
        {
            InvestGold = BinningDic[type].Money;
        }
        return InvestGold;
    }
    public Dictionary<int, int> GetInfoSeriors()
    {
        Dictionary<int, int> dit = new Dictionary<int, int>();
        int type = BinningType;
        if (InfoSeriorsTypeDic.ContainsKey(type))
        {
            dit = InfoSeriorsTypeDic[type];
        }
        return dit;
    }
}