少年修仙传客户端代码仓库
lcy
2024-12-16 a39c35fc6449430cd02bccb681c4a0a880e46cd9
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Thursday, December 21, 2017
//--------------------------------------------------------
using LitJson;
using System;
using System.Collections.Generic;
 
namespace vnxbqy.UI
{
 
    
    public class DemonJarModel : Model, IBeforePlayerDataInitialize, IAfterPlayerDataInitialize, ISwitchAccount, IPlayerLoginOk
    {
        public const int TOTALTIME_LIMIT = 3;
 
        public const int SINGLEMAPID = 52020;
        public const int DATA_MAPID = 52010;
        public const int DEMONJAR_REDPOINTID = 77001;
 
        public Redpoint redpoint = new Redpoint(FindPreciousModel.FINDPRECIOUS_REDPOINTID, DEMONJAR_REDPOINTID);
 
        public bool oldDouble = false;
 
        bool m_IsDoubleAward = false;
        public bool isDoubleAward {
            get { return m_IsDoubleAward; }
            set {
                if (m_IsDoubleAward != value)
                {
                    m_IsDoubleAward = value;
 
                    if (doubleAwardChangeEvent != null)
                    {
                        doubleAwardChangeEvent();
                    }
                }
            }
        }
 
        bool m_AutoChallenge = false;
        public bool autoChallenge {
            get { return m_AutoChallenge; }
            set {
                if (m_AutoChallenge != value)
                {
                    m_AutoChallenge = value;
                    if (autoChallengeChangeEvent != null)
                    {
                        autoChallengeChangeEvent();
                    }
                }
            }
        }
 
        public int autoChallengeBoss { get; set; }
        public bool doubleToKillLowerBossHint { get; set; }
        public bool lockSelectedBoss = false;
 
        int m_SelectedBoss = 0;
        public int selectedBoss {
            get {
                return this.m_SelectedBoss;
            }
            set {
                if (this.m_SelectedBoss != value)
                {
                    this.m_SelectedBoss = value;
                    if (bossSelectedEvent != null)
                    {
                        bossSelectedEvent(value);
                    }
                }
            }
        }
 
        public int demonJarSoulIncreaseDelta { get; set; }
 
        public event Action<int> bossSelectedEvent;
        public event Action<int> participantChangeEvent;
        public event Action doubleAwardChangeEvent;
        public event Action autoChallengeChangeEvent;
 
        List<int> sortedBossIds = new List<int>();
        Dictionary<int, DemonJarBossData> demonBosses = new Dictionary<int, DemonJarBossData>();
        Dictionary<int, int> lineToBoss = new Dictionary<int, int>();
 
        List<AutoChallengeLog> autoChallengeLogs = new List<AutoChallengeLog>();
 
        FindPreciousModel findPreciousModel { get { return ModelCenter.Instance.GetModel<FindPreciousModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
 
        public override void Init()
        {
            doubleToKillLowerBossHint = true;
            ParseConfig();
 
            dungeonModel.dungeonRecordChangeEvent += OnDungeonRecordUpdate;
            dungeonModel.updateDungeonBuyCnt += OnDungeonBuyCount;
            dungeonModel.countRemainTimeChangeEvent += OnDungeonUpdateRedPoint;
        }
 
        public override void UnInit()
        {
            dungeonModel.dungeonRecordChangeEvent -= OnDungeonRecordUpdate;
            dungeonModel.updateDungeonBuyCnt -= OnDungeonBuyCount;
            dungeonModel.countRemainTimeChangeEvent -= OnDungeonUpdateRedPoint;
        }
 
        public void OnBeforePlayerDataInitialize()
        {
            PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerLevelUp;
            ModelCenter.Instance.GetModel<MapModel>().mapLinesUpdateEvent -= OnMapLineUpdateEvent;
        }
 
        public void OnAfterPlayerDataInitialize()
        {
            if (!FuncOpen.Instance.IsFuncOpen(76))
            {
                return;
            }
            var bossId = GetRecommendBoss();
            if (bossId != 0 && !findPreciousModel.IsBossSubscribed(bossId))
            {
                findPreciousModel.RequestSubscribeBoss(bossId, true);
            }
 
            PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerLevelUp;
            ModelCenter.Instance.GetModel<MapModel>().mapLinesUpdateEvent += OnMapLineUpdateEvent;
        }
 
        public void OnPlayerLoginOk()
        {
            demonJarSoulIncreaseDelta = 0;
 
            if (FuncOpen.Instance.IsFuncOpen(76))
            {
                var bossId = GetLastUnlockBoss();
                AutoSubscribeLastUnLockBoss(bossId);
            }
 
            ParseLocalSaveAutoChallengeLogs();
            DemonJarAutoChallenge.Instance.Begin();
        }
 
        public void OnSwitchAccount()
        {
            doubleToKillLowerBossHint = true;
            autoChallenge = false;
        }
 
        public bool TryGetBossData(int _bossId, out DemonJarBossData _data)
        {
            return demonBosses.TryGetValue(_bossId, out _data);
        }
 
        public void RequestSetDoubleAward(bool _double)
        {
            var send = new CB103_tagCMSetFMTDouble();
            send.IsDouble = (byte)(_double ? 1 : 0);
 
            GameNetSystem.Instance.SendInfo(send);
        }
 
        public List<int> GetDemonJarBosses()
        {
            var dungeonModel = ModelCenter.Instance.GetModel<DungeonModel>();
            var bosses = new List<int>();
            var lockedCount = 0;
            for (int i = 0; i < sortedBossIds.Count; i++)
            {
                var bossId = sortedBossIds[i];
                var config = DemonJarConfig.Get(bossId);
 
                var grade = dungeonModel.GetGrade(new Dungeon(DATA_MAPID, config.LineID));
                //if (config.CanEnterTimes > 0 && grade > 0)
                //{
                //    continue;
                //}
 
                if (findPreciousModel.IsBossUnlock(bossId))
                {
                    bosses.Add(bossId);
                }
                else
                {
                    if (lockedCount < FindPreciousModel.ShowLockBossCnt)
                    {
                        bosses.Add(bossId);
                        lockedCount++;
                    }
                }
            }
 
            return bosses;
        }
 
        public bool IsBossUnlock(int bossId)
        {
            return findPreciousModel.IsBossUnlock(bossId) && IsPlayerLevelEnough(bossId);
        }
 
        public bool IsPlayerLevelEnough(int bossId)
        {
            var config = NPCConfig.Get(bossId);
            return PlayerDatas.Instance.baseData.LV >= config.NPCLV;
        }
 
        public bool IsPlayerRealmEnough(int bossId)
        {
            var config = NPCConfig.Get(bossId);
            return PlayerDatas.Instance.baseData.realmLevel >= RealmConfig.Get(config.Realm).LvLarge;
        }
 
        public int GetBossIdByLine(int _line)
        {
            if (lineToBoss.ContainsKey(_line))
            {
                return lineToBoss[_line];
            }
            else
            {
                return 0;
            }
        }
 
        public int GetRecommendBoss()
        {
            if (FuncOpen.Instance.IsFuncOpen(76))
            {
                var preferBoss = 0;
                for (int i = sortedBossIds.Count - 1; i >= 0; i--)
                {
                    var bossId = sortedBossIds[i];
                    if (IsBossUnlock(bossId))
                    {
                        if (preferBoss == 0)
                        {
                            preferBoss = bossId;
                        }
 
                        if (findPreciousModel.IsBossAlive(bossId) && findPreciousModel.IsSameBigRealmStageBoss(bossId))
                        {
                            return bossId;
                        }
                    }
                }
 
                if (preferBoss == 0)
                {
                    preferBoss = sortedBossIds[0];
                }
 
                return preferBoss;
            }
            else
            {
                return sortedBossIds[0];
            }
        }
 
        public int GetLastUnlockBoss()
        {
            for (int i = sortedBossIds.Count - 1; i >= 0; i--)
            {
                var bossId = sortedBossIds[i];
                if (IsBossUnlock(bossId))
                {
                    return bossId;
                }
            }
 
            return 0;
        }
 
        public int GetSurplusTimes()
        {
            var totalTimes = dungeonModel.GetTotalTimes(DATA_MAPID);
            var enterTimes = dungeonModel.GetEnterTimes(DATA_MAPID);
 
            return totalTimes - enterTimes;
        }
 
        public bool IsPersonalBoss(int _bossId)
        {
            if (DemonJarConfig.Has(_bossId))
            {
                var config = DemonJarConfig.Get(_bossId);
                return config.CanEnterTimes != 0;
            }
            else
            {
                return false;
            }
        }
 
        public List<JiaBossKillRecord> GetJiaBossKillRecords(int _bossId)
        {
            var records = new List<JiaBossKillRecord>();
            var killTime = DateTime.Now;
            var config = DemonJarConfig.Get(_bossId);
 
            for (int i = 0; i < 5; i++)
            {
                var playerName = StringUtility.Contact(RandomNameConfig.GetFirstName(1), RandomNameConfig.GetSecondName(1));
                var exitJiaPlayer = false;
                for (int j = 0; j < records.Count; j++)
                {
                    var jiaPlayer = records[j];
                    if (jiaPlayer.playerName == playerName)
                    {
                        exitJiaPlayer = true;
                        break;
                    }
                }
 
                if (!exitJiaPlayer)
                {
                    killTime -= new TimeSpan(UnityEngine.Random.Range(3, 5) * TimeSpan.TicksPerMinute);
                    records.Add(new JiaBossKillRecord(playerName, killTime, UnityEngine.Random.Range(config.KillHurtMin, config.KillHurtMax)));
                }
            }
 
            return records;
        }
 
        public void UpdateAutoChallengeLogs()
        {
            autoChallengeLogs.Sort(AutoChallengeLog.SortPredicate);
        }
 
        private void ParseLocalSaveAutoChallengeLogs()
        {
            autoChallengeLogs.Clear();
            var localSaves = LocalSave.GeStringArray(StringUtility.Contact("DemonJarAutoChallengeLog_", PlayerDatas.Instance.PlayerId));
            if (localSaves != null)
            {
                for (var i = 0; i < localSaves.Length; i++)
                {
                    var log = JsonMapper.ToObject<AutoChallengeLog>(localSaves[i]);
                    if ((TimeUtility.ServerNow - log.time).TotalDays <= 2)
                    {
                        autoChallengeLogs.Add(JsonMapper.ToObject<AutoChallengeLog>(localSaves[i]));
                    }
                }
            }
        }
 
        public void AddAutoChallengeLog(int bossId, bool isDouble, int rank)
        {
            var newLog = new AutoChallengeLog()
            {
                bossId = bossId,
                isDouble = isDouble,
                rank = rank,
                time = TimeUtility.ServerNow
            };
 
            autoChallengeLogs.Add(newLog);
            for (var i = autoChallengeLogs.Count - 1; i >= 0; i--)
            {
                var log = autoChallengeLogs[i];
                if ((TimeUtility.ServerNow - log.time).TotalDays > 2)
                {
                    autoChallengeLogs.RemoveAt(i);
                }
            }
 
            var jsons = new string[autoChallengeLogs.Count];
            for (var i = 0; i < autoChallengeLogs.Count; i++)
            {
                jsons[i] = JsonMapper.ToJson(autoChallengeLogs[i]);
            }
 
            LocalSave.SetStringArray(StringUtility.Contact("DemonJarAutoChallengeLog_", PlayerDatas.Instance.PlayerId), jsons);
        }
 
        public List<AutoChallengeLog> GetAutoChallengeLogs()
        {
            return new List<AutoChallengeLog>(autoChallengeLogs);
        }
 
        private void OnPlayerLevelUp(PlayerDataType _type)
        {
            switch (_type)
            {
                case PlayerDataType.RealmLevel:
                    if (FuncOpen.Instance.IsFuncOpen(76))
                    {
                        var bossId = GetLastUnlockBoss();
                        AutoSubscribeLastUnLockBoss(bossId);
                    }
                    break;
                case PlayerDataType.LV:
                    if (FuncOpen.Instance.IsFuncOpen(76))
                    {
                        var bossId = GetLastUnlockBoss();
                        AutoSubscribeLastUnLockBoss(bossId);
                    }
 
                    if (PlayerDatas.Instance.baseData.LV == GeneralDefine.demonJarRedPoint)
                    {
                        UpdateRedpoint();
                    }
                    break;
            }
        }
 
        private void UpdateRedpoint()
        {
            if (FuncOpen.Instance.IsFuncOpen(76))
            {
                var count = dungeonModel.GetTotalTimes(DATA_MAPID) - dungeonModel.GetEnterTimes(DATA_MAPID);
                redpoint.count = count;
            }
            else
            {
                redpoint.count = 0;
            }
 
            redpoint.state = redpoint.count > 0 ? RedPointState.Quantity : RedPointState.None;
        }
 
        private void OnMapLineUpdateEvent(int _mapId)
        {
            if (_mapId != DATA_MAPID)
            {
                return;
            }
 
            foreach (var boss in demonBosses.Values)
            {
                if (boss.participant != 0)
                {
                    boss.participant = 0;
                    if (participantChangeEvent != null)
                    {
                        participantChangeEvent(boss.id);
                    }
                }
                else
                {
                    boss.participant = 0;
                }
            }
 
            var mapModel = ModelCenter.Instance.GetModel<MapModel>();
            var lines = mapModel.GetMapLines(DATA_MAPID);
            for (int i = 0; i < sortedBossIds.Count; i++)
            {
                var bossId = sortedBossIds[i];
                var bossConfig = DemonJarConfig.Get(bossId);
                if (bossConfig == null)
                {
                    continue;
                }
 
                for (int j = 0; j < lines.Count; j++)
                {
                    if (lines[j].lineIndex == bossConfig.LineID)
                    {
                        demonBosses[bossId].participant = lines[j].playerCount;
                        if (participantChangeEvent != null)
                        {
                            participantChangeEvent(bossId);
                        }
                        break;
                    }
                }
            }
 
        }
 
        private void OnDungeonRecordUpdate(int _dataMapId)
        {
            if (DATA_MAPID != _dataMapId)
            {
                return;
            }
 
            if (PlayerDatas.Instance.baseData.LV >= GeneralDefine.demonJarRedPoint)
            {
                UpdateRedpoint();
            }
 
            foreach (var boss in demonBosses.Values)
            {
                if (this.findPreciousModel.IsBossAutoSubscribe(boss.id))
                {
                    var config = DemonJarConfig.Get(boss.id);
                    var grade = dungeonModel.GetGrade(new Dungeon(DATA_MAPID, config.LineID));
                    if (grade > 0 && config.CancelAttentionAfterKill == 1)
                    {
                        this.findPreciousModel.RequestDeSubscribeBoss(boss.id);
                    }
                }
            }
        }
 
        
        private void OnDungeonUpdateRedPoint(int mapid)
        {
            if (PlayerDatas.Instance.baseData.LV >= GeneralDefine.demonJarRedPoint)
            {
                UpdateRedpoint();
            }
        }
 
        private void OnDungeonBuyCount()
        {
            if (PlayerDatas.Instance.baseData.LV >= GeneralDefine.demonJarRedPoint)
            {
                UpdateRedpoint();
            }
        }
 
        private void AutoSubscribeLastUnLockBoss(int bossId)
        {
            if (bossId == 0)
            {
                return;
            }
 
            foreach (var boss in demonBosses.Values)
            {
                if (this.findPreciousModel.IsBossAutoSubscribe(boss.id) && boss.id != bossId)
                {
                    this.findPreciousModel.RequestDeSubscribeBoss(boss.id);
                }
            }
 
            if (bossId != 0 && this.findPreciousModel.IsBossNeverSubscribe(bossId))
            {
                if (IsBossUnlock(bossId))
                {
                    var config = DemonJarConfig.Get(bossId);
                    if (config.AutoAttention == 1)
                    {
                        this.findPreciousModel.RequestSubscribeBoss(bossId, true);
 
                        var model = ModelCenter.Instance.GetModel<DungeonModel>();
                        var grade = model.GetGrade(new Dungeon(DATA_MAPID, config.LineID));
                        if ((config.CanEnterTimes == 0 || grade == 0) && this.findPreciousModel.IsBossAlive(bossId))
                        {
                            this.findPreciousModel.AddOneBossRebornNotify(bossId);
                        }
                    }
                }
            }
        }
        void SendInspire(int inspireType)
        {
            CA508_tagCMDoFBAction pak = new CA508_tagCMDoFBAction();
            pak.ActionType = 0;
            pak.ActionInfo = (uint)inspireType;
            GameNetSystem.Instance.SendInfo(pak);
        }
 
        public void AutoConfirm()
        {
            //已经达到鼓舞上限
            if ((dungeonModel.GetDungeonInspireLevel()) >= dungeonModel.GetInspireMaxCount(PlayerDatas.Instance.baseData.MapID))
            {
                SysNotifyMgr.Instance.ShowTip("Xjmj_InspireMaxLevel");
                return;
            }
            var mapId = PlayerDatas.Instance.baseData.MapID;
            var _list = dungeonModel.GetDungeonInspire(mapId);
            if (_list == null)
            {
                return;
            }
            DungeonInspireConfig coinInspireConfig = null;
            DungeonInspireConfig fairyInspireConfig = null;
 
            for (int i = 0; i < _list.Count; i++)
            {
                if (_list[i].InspireType == 3)
                {
                    coinInspireConfig = _list[i];
                }
                else if (_list[i].InspireType == 2
                    || _list[i].InspireType == 1 || _list[i].InspireType == 5)
                {
                    fairyInspireConfig = _list[i];
                }
            }
            if (coinInspireConfig!=null) 
            {
                //勾选了自动用硬币
                if (LocalSave.GetBool(StringUtility.Contact("AutoCoinInspire_", dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID), "_", PlayerDatas.Instance.PlayerId)))
                {
                    if (coinInspireConfig == null)
                        return;
                    int nowLevel = dungeonModel.GetDungeonInspireLevel(3);
                    for (int i = nowLevel; i < coinInspireConfig.InspireCount; i++)
                    {
                        // 达到硬币最高等级限制
                        if (coinInspireConfig == null)
                            break;
                        if (dungeonModel.GetDungeonInspireLevel(3) >= coinInspireConfig.InspireCount)
                            break;
                        // 硬币数量不够
                        if (UIHelper.GetMoneyCnt(3) < (ulong)dungeonModel.GetDungeonInspireCost(coinInspireConfig))
                        {
                            SysNotifyMgr.Instance.ShowTip("Xjmj_InspireNoEnoughGold");
                            break;
                        }
                        SendInspire(coinInspireConfig.InspireType);
                    }
                }
            }
            if (fairyInspireConfig != null)
            {
                //勾选了自动用仙玉
                if (LocalSave.GetBool(StringUtility.Contact("AutoFairyInspire_", dungeonModel.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID), "_", PlayerDatas.Instance.PlayerId)))
                {
                    int nowLevel = dungeonModel.GetDungeonInspireLevel(3);
                    int maxLevel = dungeonModel.GetInspireMaxCount(PlayerDatas.Instance.baseData.MapID);
                    for (int i = nowLevel; i < maxLevel; i++)
                    {
                        uint money = 0;
                        switch (fairyInspireConfig.InspireType)
                        {
                            case 1:
                            case 5:
                                money += PlayerDatas.Instance.baseData.diamond;
                                break;
                        }
                        var cost = dungeonModel.GetDungeonInspireCost(fairyInspireConfig);
                        // 仙玉数量不够
                        if (money < cost && !(NewBieCenter.Instance.inGuiding
                    && NewBieCenter.Instance.currentGuide == GeneralDefine.fairyLandGuideId))
                        {
                            SysNotifyMgr.Instance.ShowTip("Xjmj_InspireNoEnoughFairy");
                            break;
                        }
                        SendInspire(fairyInspireConfig.InspireType);
                    }
                }
            }
        }
 
        private void ParseConfig()
        {
            var demonJarConfigs = DemonJarConfig.GetValues();
            foreach (var config in demonJarConfigs)
            {
                var bossData = demonBosses[config.NPCID] = new DemonJarBossData(config.NPCID);
                var npcConfig = NPCConfig.Get(config.NPCID);
                bossData.unLockLevel = npcConfig.NPCLV;
                lineToBoss[config.LineID] = config.NPCID;
            }
 
            sortedBossIds.AddRange(demonBosses.Keys);
            sortedBossIds.Sort(FindPreciousModel.BossCompare);
        }
 
        public struct JiaBossKillRecord
        {
            public string playerName;
            public DateTime killTime;
            public long hurt;
 
            public JiaBossKillRecord(string _playerName, DateTime _killTime, int _hurt)
            {
                playerName = _playerName;
                killTime = _killTime;
                hurt = _hurt;
            }
 
            public override string ToString()
            {
                return Language.Get("FightTreasure_KillTime", killTime.ToString("HH:mm:ss"), playerName);
            }
 
        }
 
        public struct AutoChallengeLog
        {
            public int bossId;
            public DateTime time;
            public bool isDouble;
            public int rank;
 
            public AutoChallengeLog(string dateTime)
            {
                this.bossId = 1000000;
                DateTime.TryParse("", out time);
                this.isDouble = true;
                this.rank = 1;
            }
 
            public static int SortPredicate(AutoChallengeLog lhs, AutoChallengeLog rhs)
            {
                return lhs.time < rhs.time ? -1 : 1;
            }
 
        }
 
    }
 
    public class DemonJarBossData
    {
        public int id { get; private set; }
        public int unLockLevel { get; set; }
        public int participant { get; set; }
 
        public DemonJarBossData(int _id)
        {
            this.id = _id;
        }
    }
 
 
 
}