少年修仙传客户端代码仓库
client_Wu Xijin
2019-06-13 033958214c0b16d7e7b93cc821b018c295251867
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
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Friday, January 05, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using System.Collections.Generic;
using System;
using Snxxz.UI;
using EnhancedUI.EnhancedScroller;
//坐骑属性面板赋值赋值
namespace Snxxz.UI
{
 
    public class MountPanelAssignment : MonoBehaviour
    {
        [SerializeField] RawImage m_MountRawImg;
        [SerializeField] Text m_HpTxt;//当前生命
        [SerializeField] Text m_AtkTxt;//当前攻击
        [SerializeField] Text m_SpeedTxt;//当前速度
        [SerializeField] Text m_PutTxt;//战斗力
 
        [SerializeField] RedpointBehaviour m_RedPointJH;//激活红点
 
 
        [SerializeField] UIEffect m_Uieffect3;//经验条特效
 
        [SerializeField] Transform GroupSkill;
        [SerializeField] FunctionUnlockFlyObjectTarget[] flyObjectTargets;
 
        [SerializeField] GameObject m_YiJieSuo;//解锁面板
        [SerializeField] GameObject m_BottomOperate;//关于经验条
        [SerializeField] Text m_MountLVNum;
        [SerializeField] Text m_ExpNum;
        [SerializeField] IntensifySmoothSlider m_IntensifySmoothSlider;
 
        [SerializeField] GameObject m_WeiJieSuo;//未解锁面板
        [SerializeField] Button m_NotUnlockButton;
        [SerializeField] Image m_NotUnlockImageBG;
        [SerializeField] Image m_ImmageBG;//背景框品质
        [SerializeField] Text m_NotUnlockTxt;
 
        [SerializeField] GameObject m_ManJie;//满阶面板
 
        [SerializeField] GameObject m_Deblocking;//激活按钮
 
        [SerializeField] GameObject m_TrainButtonGroup;//已激活按钮组
        [SerializeField] GameObject m_TrainBtn_1;//一倍驯养
        [SerializeField] RedpointBehaviour m_Redpoint_1;
        [SerializeField] Image IconImage1;
        [SerializeField] Text m_Text1;
 
        [Header("控制绳子")]
        [SerializeField]
        GameObject Skillimage1;
        [SerializeField]
        GameObject Skillimage2;
        [SerializeField]
        GameObject Skillimage3;
        [SerializeField]
        GameObject Skillimage4;
        [SerializeField]
        GameObject Skillimage5;
        private float timePlay = 0;//坐骑动作播放时间
        List<GameObject> Skillimage = new List<GameObject>();
 
        [SerializeField] ScrollerController allPetSkillCtrl;//所有的技能
 
        private int mount_ID = 0;//用来标记坐骑的ID
        MountModel m_MountModel;
        MountModel mountModel { get { return m_MountModel ?? (m_MountModel = ModelCenter.Instance.GetModel<MountModel>()); } }
 
        PackModel _playerPack;
        PackModel playerPack { get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); } }
 
        RidingAndPetActivationModel ridingModel { get { return ModelCenter.Instance.GetModel<RidingAndPetActivationModel>(); } }
 
        private int pitchOnHorseID = 0;
        private void Start()
        {
            
            m_NotUnlockButton.AddListener(OnClickNotUnlockButton);
        }
        private void OnEnable()
        {
 
            MountModel.Event_MountHA301U += OnMountHA301Update;
            allPetSkillCtrl.OnRefreshCell += RefreshAllMountSkillCell;
            CreateAllMountSkill();
        }
        private void OnDisable()
        {
            mount_ID = 0;
            MountModel.Event_MountHA301U -= OnMountHA301Update;
            allPetSkillCtrl.OnRefreshCell -= RefreshAllMountSkillCell;
            m_MountRawImg.gameObject.SetActive(false);
        }
 
        private void LateUpdate()
        {
            timePlay += Time.deltaTime;
            if (timePlay >= GeneralDefine.PetDanceInterval)
            {
                timePlay = 0;
 
                if (UI3DModelExhibition.Instance.NpcModelHorse != null)
                {
                    var animator = UI3DModelExhibition.Instance.NpcModelHorse.GetComponent<Animator>();
                    if (animator != null)
                    {
                        StartCoroutine("FrameDelay");
                    }
                }
            }
        }
        IEnumerator FrameDelay()
        {
            yield return null;
 
            if (UI3DModelExhibition.Instance.NpcModelHorse != null)
            {
                var animator = UI3DModelExhibition.Instance.NpcModelHorse.GetComponent<Animator>();
                animator.Play(GAStaticDefine.State_Dance);
            }
        }
 
        private void OnMountHA301Update(int _HorseID)
        {
            m_Uieffect3.Play();
            SoundPlayer.Instance.PlayUIAudio(19);
            ToAddSorting();
            allPetSkillCtrl.m_Scorller.RefreshActiveCellViews();
            if (pitchOnHorseID != 0 && pitchOnHorseID!= _HorseID)
            {
                PanelAssignment(pitchOnHorseID);
            }
            else
            {
                PanelAssignment(_HorseID);
            }
          
        }
 
        private void OnClickDeblockingButton()
        {
            FuncConfigConfig _tagfun = FuncConfigConfig.Get("HorseUpItem");
            ItemConfig _tagchine = ItemConfig.Get(int.Parse(_tagfun.Numerical1));
            ItemTipUtility.Show(_tagchine.ID);
        }
 
        private void OnClickNotUnlockButton()
        {
            var _Horse = HorseConfig.Get(pitchOnHorseID);
            var _item = ItemConfig.Get(_Horse.UnlockItemID);
 
            ItemTipUtility.Show(_item.ID);
        }
 
        public void PanelAssignment(int mountID)
        {
            SetSkillimage();
            pitchOnHorseID = mountID;
            MountAttribute(mountID);
            PanelClassify(mountID);
            ShowHorse(mountID);
            MountSkill(mountID);
            TheMountButton();
            if (WindowCenter.Instance.Get<MountWin>().AchievementGuideEffect2 != null)
            {
                AchievementGuideEffectPool.Recycle(WindowCenter.Instance.Get<MountWin>().AchievementGuideEffect2);
            }
        }
        private void ShowHorse(int HorseID)
        {
            if (!m_MountRawImg.gameObject.activeSelf)
            {
                m_MountRawImg.gameObject.SetActive(true);
            }
            if (HorseID != mount_ID)
            {
                HorseConfig _model = HorseConfig.Get(HorseID);
                UI3DModelExhibition.Instance.ShowHourse(_model.Model, m_MountRawImg);
                mount_ID = HorseID;
                if (UI3DModelExhibition.Instance.NpcModelHorse != null)
                {
                    var animator = UI3DModelExhibition.Instance.NpcModelHorse.GetComponent<Animator>();
                    if (animator != null)
                    {
                        if (this.gameObject.activeInHierarchy)
                        {
                            StartCoroutine("FrameDelay");
                        }
                        else
                        {
                            animator.Play(GAStaticDefine.State_Dance);
                        }
                    }
                }
            }
        }
        private void MountAttribute(int mountID)//坐骑属性面板赋值
        {
            //Dictionary<int, int> dicStone = Bonuses();
            int _HPP = 0;//生命
            int _AttT = 0;//攻击
            int _SpeE = 0;//速度
            Dictionary<int, float> addAttrDict510 = ridingModel.GetAllMountProperty();
            Dictionary<int, float> addAttrDict511 = ridingModel.GetAllMountPropertyQuality();
            if (mountModel._DicHorse.Count == 0)
            {
                m_HpTxt.text = (_HPP /*+ dicStone[6]*/).ToString();
                m_AtkTxt.text = (_AttT /*+ dicStone[7]*/).ToString();
                m_SpeedTxt.text = _SpeE.ToString();
                m_PutTxt.text = "0";
            }
            else
            {
                foreach (int key in mountModel._DicHorse.Keys)
                {
                    HorseUpConfig tagMode = HorseUpConfig.GetHorseIDAndLV(key, mountModel._DicHorse[key].Lv);
                    int[] intAttrValue = tagMode.AttrValue;
                    if (intAttrValue.Length != 0)
                    {
                        _HPP += intAttrValue[0];
                        _AttT += intAttrValue[1];
                        if (intAttrValue[2] > _SpeE)
                        {
                            _SpeE = intAttrValue[2];
                        }
                    }
                }
                float addHp = 0;
                float addAtk = 0;
                if (addAttrDict510.ContainsKey((int)PropertyType.HP))
                {
                    addHp += addAttrDict510[(int)PropertyType.HP];
                }
                if (addAttrDict511.ContainsKey((int)PropertyType.HP))
                {
                    addHp += addAttrDict511[(int)PropertyType.HP];
                }
 
                if (addAttrDict510.ContainsKey((int)PropertyType.ATK))
                {
                    addAtk += addAttrDict510[(int)PropertyType.ATK];
                }
                if (addAttrDict511.ContainsKey((int)PropertyType.ATK))
                {
                    addAtk += addAttrDict511[(int)PropertyType.ATK];
                }
                m_HpTxt.text = ((int)(_HPP /*+ dicStone[6]*/ + addHp)).ToString();
                m_AtkTxt.text = ((int)(_AttT /*+ dicStone[7]*/ + addAtk)).ToString();
                m_SpeedTxt.text = _SpeE.ToString();
                int fightNumberA = 0;
                foreach (int key in mountModel.GetMountSkillAndItem.Keys)
                {
                    fightNumberA += fightNumber(key);
                }
                int initialForce = 0;
                foreach (var key in mountModel._DicHorse.Keys)
                {
                    HorseConfig horseConfig = HorseConfig.Get(key);
                    initialForce += horseConfig.InitFightPower;
                }
                Dictionary<int, int> AddPowerDic = new Dictionary<int, int>();
                AddPowerDic.Clear();
                AddPowerDic.Add(6, (_HPP /*+ dicStone[6]*/));
                AddPowerDic.Add(7, (_AttT /*+ dicStone[7]*/));
                int AddPower = UIHelper.GetFightPower(AddPowerDic);
                m_PutTxt.text = (fightNumberA + AddPower + initialForce).ToString();
            }
        }
        Dictionary<int, int> Bonuses()//属性加成
        {
            Dictionary<int, int> dic = new Dictionary<int, int>();
            dic.Clear();
            dic.Add(6, 0);//生命
            dic.Add(7, 0);//攻击
            dic.Add(8, 0);//防御
            foreach (int key in mountModel._DicMountItem.Keys)
            {
                if (mountModel._DicMountItem[key] != 0)
                {
                    ItemConfig itemModel = ItemConfig.Get(key);
                    if (dic.ContainsKey(itemModel.Effect1))
                    {
                        dic[itemModel.Effect1] += itemModel.EffectValueA1 * mountModel._DicMountItem[key];
                    }
                    if (dic.ContainsKey(itemModel.Effect2))
                    {
                        dic[itemModel.Effect2] += itemModel.EffectValueA2 * mountModel._DicMountItem[key];
                    }
                    if (dic.ContainsKey(itemModel.Effect3))
                    {
                        dic[itemModel.Effect3] += itemModel.EffectValueA3 * mountModel._DicMountItem[key];
                    }
                    if (dic.ContainsKey(itemModel.Effect4))
                    {
                        dic[itemModel.Effect4] += itemModel.EffectValueA4 * mountModel._DicMountItem[key];
                    }
                    if (dic.ContainsKey(itemModel.Effect5))
                    {
                        dic[itemModel.Effect5] += itemModel.EffectValueA5 * mountModel._DicMountItem[key];
                    }
                }
            }
            return dic;
        }
 
 
        private void PanelClassify(int mountID)//面板分类
        {
            if (WindowCenter.Instance.Get<MountWin>().AchievementGuideEffect1 != null)
            {
                AchievementGuideEffectPool.Recycle(WindowCenter.Instance.Get<MountWin>().AchievementGuideEffect1);
            }
            if (mountModel._DicHorse.ContainsKey(mountID))
            {
                var configHorse = HorseConfig.Get(mountID);
                if (mountModel._DicHorse[mountID].Lv >= configHorse.MaxLV)
                {
                    m_ManJie.SetActive(true);
                    m_YiJieSuo.SetActive(false);
                    m_WeiJieSuo.SetActive(false);
                    m_Deblocking.SetActive(false);
                    m_TrainButtonGroup.SetActive(false);
                    //满阶
                }
                else
                {
                    IsExpSlider(mountID);
                    m_YiJieSuo.SetActive(true);
                    m_WeiJieSuo.SetActive(false);
                    m_ManJie.SetActive(false);
                    m_Deblocking.SetActive(false);
                    m_TrainButtonGroup.SetActive(true);
                    m_Redpoint_1.redpointId = mountModel.ASingleFeedRedPoint[mountID].id;
                    //为满街
                }
            }
            else
            {
                m_RedPointJH.redpointId = mountModel.DeblockingRedPoint[mountID].id;
                m_WeiJieSuo.SetActive(true);
                m_ManJie.SetActive(false);
                m_YiJieSuo.SetActive(false);
                m_Deblocking.SetActive(true);
                m_TrainButtonGroup.SetActive(false);
                HorseConfig _Horse = HorseConfig.Get(mountID);
                ItemConfig _item = ItemConfig.Get(_Horse.UnlockItemID);
                m_NotUnlockImageBG.SetSprite(_item.IconKey);
                m_ImmageBG.SetItemBackGround(_item.ItemColor);
                int UnlockItemID = HorseConfig.Get(mountID).UnlockItemID;
                int MaterialNumber = playerPack.GetItemCountByID(PackType.Item, UnlockItemID);//获取背包解锁材料的数量
                int UnlockItemCnt = HorseConfig.Get(mountID).UnlockItemCnt;
                if (MaterialNumber >= UnlockItemCnt)
                {
                    m_NotUnlockTxt.text = "<color=#fffaf0>" + MaterialNumber + "/" + UnlockItemCnt + "</color>";
                }
                else
                {
                    m_NotUnlockTxt.text = "<color=#ff2828>" + MaterialNumber + "</color>" + "<color=#fffaf0>/" + UnlockItemCnt + "</color>";
                }
            }
        }
        private void IsExpSlider(int mountID)
        {
            if (mountModel._DicHorse.ContainsKey(mountID))
            {
                m_BottomOperate.SetActive(true);
                int horseMaxLv = HorseConfig.Get(mountID).MaxLV;
                if (mountModel._DicHorse[mountID].Lv >= horseMaxLv)
                {
                    m_ExpNum.text = Language.Get("Z1029");
                    m_IntensifySmoothSlider.stage = mountModel._DicHorse[mountID].Lv;
                    m_IntensifySmoothSlider.value = 1f;
                    m_IntensifySmoothSlider.delay = 0f;
                    m_IntensifySmoothSlider.ResetStage();
                }
                else
                {
                    int exp = mountModel._DicHorse[mountID].Exp;
                    HorseUpConfig horseUp = HorseUpConfig.GetHorseIDAndLV(mountID, mountModel._DicHorse[mountID].Lv);
                    int expMax = horseUp.NeedExp;
                    m_ExpNum.text = exp + "/" + expMax;
 
                    if (mount_ID != mountID)
                    {
                        m_IntensifySmoothSlider.stage = mountModel._DicHorse[mountID].Lv;
                        m_IntensifySmoothSlider.delay = 0f;
                        m_IntensifySmoothSlider.ResetStage();
                        m_IntensifySmoothSlider.value = (float)Math.Round((float)exp / expMax, 2, MidpointRounding.AwayFromZero);
                    }
                    else
                    {
                        m_IntensifySmoothSlider.delay = 0.1f;
                        m_IntensifySmoothSlider.stage = mountModel._DicHorse[mountID].Lv;
                        m_IntensifySmoothSlider.value = (float)Math.Round((float)exp / expMax, 2, MidpointRounding.AwayFromZero);
                    }
                }
                m_MountLVNum.text = mountModel._DicHorse[mountID].Lv + Language.Get("Z1041");
            }
            else
            {
                m_BottomOperate.SetActive(false);
            }
        }
        List<HorseSkillClass> MountSkills = new List<HorseSkillClass>();
        private void MountSkill(int HorseID)//关于坐骑技能
        {
            MountSkills.Clear();
            foreach (var key in mountModel.GetMountSkillAndItem.Keys)
            {
                if (mountModel.GetMountSkillAndItem[key].HorseID == HorseID)
                {
                    MountSkills.Add(mountModel.GetMountSkillAndItem[key]);
                }
            }
            for (int i = 0; i < Skillimage.Count; i++)
            {
                Skillimage[i].SetActive(false);
 
            }
            for (int i = 0; i < GroupSkill.childCount; i++)
            {
 
                if (i < MountSkills.Count)
                {
                    if (i < Skillimage.Count)
                    {
                        Skillimage[i].SetActive(true);
                    }
                    GroupSkill.GetChild(i).gameObject.SetActive(true);
                    UIEffect uie = GroupSkill.GetChild(i).GetComponent<UIEffect>();
                    if (mountModel.ListEffectSkill.Contains(MountSkills[i].SkillID))
                    {
                        if (!uie.IsPlaying)
                        {
                            uie.Play();
                        }
                    }
                    else
                    {
                        if (uie.IsPlaying)
                        {
                            uie.Stop();
                        }
 
                    }
                    SkillButtonPet mountSkill = GroupSkill.GetChild(i).gameObject.GetComponent<SkillButtonPet>();
                    int curMountLv = 0;
                    if (mountModel._DicHorse.ContainsKey(MountSkills[i].HorseID))
                    {
                        curMountLv = mountModel._DicHorse[MountSkills[i].HorseID].Lv;
                    }
                    if (curMountLv >= MountSkills[i].HorseLV)
                    {
                        mountSkill.SetModel(MountSkills[i].SkillID, MountSkills[i].HorseLV, true, HorseID, SkillType.MountSkill);
                    }
                    else
                    {
                        mountSkill.SetModel(MountSkills[i].SkillID, MountSkills[i].HorseLV, false, HorseID, SkillType.MountSkill);
                    }
                    if (i < flyObjectTargets.Length)
                    {
                        var flyObjectTarget = flyObjectTargets[i];
                        flyObjectTarget.IdList = new int[] { MountSkills[i].SkillID };
                        flyObjectTarget.Z_UnLockType = FunctionUnlockType.Skill;
                        FunctionUnlockFlyObjectTargetCenter.Register(FunctionUnlockType.Skill, new int[] { MountSkills[i].SkillID }, flyObjectTarget);
                    }
                }
                else
                {
                    GroupSkill.GetChild(i).gameObject.SetActive(false);
                }
            }
        }
 
        List<int> displayTotalSkills = new List<int>();
        private void CreateAllMountSkill()//所有坐骑技能
        {
            displayTotalSkills.Clear();
            var skills = mountModel.GetMountSkillAndItem.Keys;
            foreach (var id in skills)
            {
                var config = SkillConfig.Get(id);
                var skillId = 0;
                var effect = SkillConfig.GetSkillEffectValue(config);
                if (mountModel.TryGetIntegrationSkill(effect, out skillId))
                {
                    if (!displayTotalSkills.Contains(skillId))
                    {
                        displayTotalSkills.Add(skillId);
                    }
                    continue;
                }
                displayTotalSkills.Add(id);
            }
 
            ToAddSorting();
 
            allPetSkillCtrl.Refresh();
            int line = Mathf.CeilToInt((float)displayTotalSkills.Count / 3);
            for (int i = 0; i < line; i++)
            {
                allPetSkillCtrl.AddCell(ScrollerDataType.Header, i);
            }
 
            allPetSkillCtrl.Restart();
        }
 
        void ToAddSorting()
        {
            displayTotalSkills.Sort(Compare);
        }
 
        int Compare(int lhs, int rhs)
        {
            var lhs_unlock = mountModel.IsSkillUnlock(lhs);
            var rhs_unlock = mountModel.IsSkillUnlock(rhs);
            if (lhs_unlock != rhs_unlock)
            {
                return -lhs_unlock.CompareTo(rhs_unlock);
            }
 
            var lhs_config = SkillConfig.Get(lhs);
            var rhs_config = SkillConfig.Get(rhs);
            var lhs_Id = 0;
            var rhs_Id = 0;
            var lhs_effect = SkillConfig.GetSkillEffectValue(lhs_config);
            var rhs_effect = SkillConfig.GetSkillEffectValue(rhs_config);
            var lhs_integration = mountModel.TryGetIntegrationSkill(lhs_effect, out lhs_Id);
            var rhs_integration = mountModel.TryGetIntegrationSkill(rhs_effect, out rhs_Id);
 
            if (lhs_integration != rhs_integration)
            {
                return -lhs_integration.CompareTo(rhs_integration);
            }
            if (lhs_integration && rhs_integration)
            {
                return lhs_config.Effect1.CompareTo(rhs_config.Effect1);
            }
 
            var lhs_horseInfo = mountModel.GetMountSkillAndItem[lhs];
            var rhs_horseInfo = mountModel.GetMountSkillAndItem[rhs];
 
            if (lhs_horseInfo.HorseID != rhs_horseInfo.HorseID)
            {
                return lhs_horseInfo.HorseID.CompareTo(rhs_horseInfo.HorseID);
            }
 
            if (lhs_horseInfo.HorseLV.CompareTo(rhs_horseInfo.HorseLV) != 0)
            {
                return lhs_horseInfo.HorseLV.CompareTo(rhs_horseInfo.HorseLV);
            }
            return 0;
        }
 
        private bool IsDeblocking(int SkillID)//是否解锁
        {
            if (mountModel.GetMountSkillAndItem.ContainsKey(SkillID))
            {
                int mountID = mountModel.GetMountSkillAndItem[SkillID].HorseID;
                int mountLv = mountModel.GetMountSkillAndItem[SkillID].HorseLV;
                if (mountModel._DicHorse.ContainsKey(mountID) && mountModel._DicHorse[mountID].Lv >= mountLv)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return false;
            }
        }
 
        private void RefreshAllMountSkillCell(ScrollerDataType type, CellView cell)
        {
            int length = cell.transform.childCount;
            for (int i = 0; i < length; i++)
            {
                int index = cell.index * 3 + i;
                SkillButtonPet skillButton = cell.transform.GetChild(i).GetComponent<SkillButtonPet>();
                if (index < displayTotalSkills.Count)
                {
                    skillButton.gameObject.SetActive(true);
                    var skillId = displayTotalSkills[index];
                    skillButton.SetModel(skillId, 0, mountModel.IsSkillUnlock(skillId), 0, SkillType.MountSkill, true);
                }
                else
                {
                    skillButton.gameObject.SetActive(false);
                }
            }
        }
 
        private void TheMountButton()
        {
            FuncConfigConfig _tagfun = FuncConfigConfig.Get("HorseUpItem");
            ItemConfig _tagchine = ItemConfig.Get(int.Parse(_tagfun.Numerical1));
            IconImage1.SetSprite(_tagchine.IconKey);
            int mountDanNum = playerPack.GetItemCountByID(PackType.Item, int.Parse(_tagfun.Numerical1));
            m_Text1.text = string.Format(Language.Get("Remaining_Z1"), UIHelper.ReplaceLargeNum(mountDanNum));
        }
 
        private int fightNumber(int SkillID)
        {
            int fightNum = 0;
            if (IsDeblocking(SkillID))
            {
                SkillConfig skillconfig = SkillConfig.Get(SkillID);
                fightNum = skillconfig.FightPower;
            }
            return fightNum;
        }
 
        private void SetSkillimage()
        {
            if (Skillimage.Count <= 0)
            {
                Skillimage.Clear();
                Skillimage.Add(Skillimage1);
                Skillimage.Add(Skillimage2);
                Skillimage.Add(Skillimage3);
                Skillimage.Add(Skillimage4);
                Skillimage.Add(Skillimage5);
            }
        }       
    }
 
}