From c79dbe6647429b864d15a21b3baa77ffa8d48768 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 15 四月 2019 15:29:35 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/Mount/MountModel.cs |   23 +++++++++++++++--------
 1 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/System/Mount/MountModel.cs b/System/Mount/MountModel.cs
index 77239f0..0d8cd12 100644
--- a/System/Mount/MountModel.cs
+++ b/System/Mount/MountModel.cs
@@ -273,7 +273,11 @@
     public Redpoint redPointStre2 = new Redpoint(MainRedDot.RedPoint_MountPackKey, Redpoint_key2);//鍧愰獞鍏介瓊
     private void OnItemRefreshEvent(PackType type, int index, int id)
     {
-        MountH0704(playerPack.GetItemByIndex(type, index));
+        if (type == PackType.Equip)
+        {
+            RefreshCurrentMount(playerPack.GetItemByIndex(type, index));
+        }
+
         if (type == PackType.Item)
         {
             if (_DicMountItem.ContainsKey(id))
@@ -519,19 +523,22 @@
             }
         }
         return SkillLv;
-    }
-    public void MountH0704(ItemModel info)//鑾峰彇褰撳墠鐨勫潗楠�
+    }
+
+    void RefreshCurrentMount(ItemModel info)//鑾峰彇褰撳墠鐨勫潗楠�
     {
+        if (info == null)
+        {
+            return;
+        }
 
-        if (info == null || info.packType != PackType.Equip)
-            return;
-        if (info.gridIndex == (byte)RoleEquipType.Mount)//鍧愰獞浣嶇疆19
+        if (info.config.EquipPlace == (byte)RoleEquipType.Mount)//鍧愰獞浣嶇疆19
         {
             if (Hconfigs.Count <= 0)
             {
                 Hconfigs = HorseConfig.GetValues();
             }
-            // var configs = HorseConfig.GetValues();
+
             foreach (var config in Hconfigs)
             {
                 if (config.ItemID == info.itemId)
@@ -542,10 +549,10 @@
                     {
                         Event_MountAlteration(_HorseIDNow);
                     }
-
                 }
             }
         }
+
         MountDanRed();
         MountStoneRed();
     }

--
Gitblit v1.8.0