From d4529565bd49054b9a8b7be2eaea2785438f4c41 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期一, 08 十月 2018 17:59:42 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Mount/PlayerMountDatas.cs |   44 +++++++++++++++-----------------------------
 1 files changed, 15 insertions(+), 29 deletions(-)

diff --git a/System/Mount/PlayerMountDatas.cs b/System/Mount/PlayerMountDatas.cs
index c84a6d1..c336549 100644
--- a/System/Mount/PlayerMountDatas.cs
+++ b/System/Mount/PlayerMountDatas.cs
@@ -50,8 +50,8 @@
     private List<HorseConfig> SortMount = new List<HorseConfig>();//鐢ㄤ簬绾㈢偣鎺掑簭
     public int MountStoneItemId = 0;
     public bool IsOk = false;
-    public bool IsRedPointSingleFeed = true;
     public List<int> ListEffectSkill = new List<int>();
+    private int HorseDanExp = 0;//鍧愰獞涓圭粡楠�
     PlayerPackModel _playerPack;
     PlayerPackModel playerPack
     {
@@ -78,6 +78,8 @@
         }
         string MountRedDotstr = Config.Instance.Get<FuncConfigConfig>("MountPetRedDot").Numerical1;
         DicDefaultMount = ConfigParse.GetDic<int, int>(MountRedDotstr);
+        string HorseUpItem = Config.Instance.Get<FuncConfigConfig>("HorseUpItem").Numerical2;
+        HorseDanExp = int.Parse(HorseUpItem);
     }
 
     public override void UnInit()
@@ -96,7 +98,6 @@
         _DicHorse.Clear();
         HorseRidingBool = false;
         Wait = true;
-        IsRedPointSingleFeed = true;
     }
 
     public void OnPlayerLoginOk()
@@ -250,7 +251,6 @@
 
     private void RedPointMountDan()
     {
-        IsRedPointSingleFeed = false;
         MountDanRed();
     }
 
@@ -281,22 +281,20 @@
 
         int GetMountID = 0;
         int GetMountLv = 0;
-
+        int NeedExp = 99999999;
+        int NeedNumber = 0;//鎵�闇�瑕佺殑缁忛獙涓�
         for (int i = 0; i < SortMount.Count; i++)
         {
             int horseID = SortMount[i].HorseID;
-            if (_DicHorse.ContainsKey(horseID))
+            if (_DicHorse.ContainsKey(horseID) && _DicHorse[horseID].Lv < Config.Instance.Get<HorseConfig>(horseID).MaxLV)
             {
-                var key = horseID;
-                if (GetMountID == 0 && _DicHorse[key].Lv < GetMountSkillMaxLV(key))
+                int _NeedExp = HorseUpConfig.GetHorseIDAndLV(horseID, (_DicHorse[horseID].Lv)).NeedExp;
+                if (_NeedExp - _DicHorse[horseID].Exp < NeedExp)
                 {
-                    GetMountID = key;
-                    GetMountLv = _DicHorse[key].Lv;
-                }
-                if (_DicHorse[key].Lv < GetMountLv && _DicHorse[key].Lv < GetMountSkillMaxLV(key))
-                {
-                    GetMountID = key;
-                    GetMountLv = _DicHorse[key].Lv;
+                    NeedExp = _NeedExp - _DicHorse[horseID].Exp;
+                    GetMountID = horseID;
+                    GetMountLv = _DicHorse[horseID].Lv;
+                    NeedNumber = Mathf.CeilToInt((float)NeedExp / HorseDanExp);
                 }
             }
         }
@@ -312,23 +310,11 @@
                 ASingleFeedRedPoint[key].state = RedPointState.Simple;
                 return;
             }
-
         }
-        if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number > 0 && GetMountLv < horsecon.MaxLV)
+        if (ASingleFeedRedPoint.ContainsKey(GetMountID) && number >= NeedNumber && GetMountLv < horsecon.MaxLV)
         {
-            if (PlayerDatas.Instance.baseData.LV >= 1500)
-            {
-                if (IsRedPointSingleFeed)
-                {
-                    ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
-                    return;
-                }
-            }
-            else
-            {
-                ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
-                return;
-            }
+            ASingleFeedRedPoint[GetMountID].state = RedPointState.Simple;
+            return;
         }
     }
 

--
Gitblit v1.8.0