From 2bdca925498c2b06de803cd6ec1704faef8eec30 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期四, 18 十月 2018 15:34:27 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Mount/PlayerMountDatas.cs |   19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/System/Mount/PlayerMountDatas.cs b/System/Mount/PlayerMountDatas.cs
index c336549..32d3a6a 100644
--- a/System/Mount/PlayerMountDatas.cs
+++ b/System/Mount/PlayerMountDatas.cs
@@ -318,25 +318,20 @@
         }
     }
 
-    public int GetMinLvMount()
+    public int GetMinExpMount()
     {
         int GetMountID = 0;
-        int GetMountLv = 0;
+        int NeedExp = 99999999;
         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;
                 }
             }
         }

--
Gitblit v1.8.0