From d10eb06e8d935a453ad85dc359eab2d8401b2ba9 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期四, 06 十二月 2018 10:31:24 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Fight/GameActor/GA_Pet.cs |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/Fight/GameActor/GA_Pet.cs b/Fight/GameActor/GA_Pet.cs
index 0e3e13f..8aa555e 100644
--- a/Fight/GameActor/GA_Pet.cs
+++ b/Fight/GameActor/GA_Pet.cs
@@ -39,13 +39,28 @@
         if (_parentSID != PlayerDatas.Instance.PlayerId)
         {
             GA_Player _player = GAMgr.Instance.GetBySID(_parentSID) as GA_Player;
-            if (_player != null)
+
+            bool _showOrHide = true;
+            int _index = -999;
+
+            if (_player == null)
             {
-                if (!_player.ShowOrHide)
+                _showOrHide = false;
+            }
+            else
+            {
+                _showOrHide = _player.ShowOrHide;
+                if (_showOrHide)
                 {
-                    ShowOrHideModel(false);
+                    _index = BattleEffectPlayRule.Instance.GetIndex(_parentSID);
+                    _showOrHide = _index != -1 && _index < BattleEffectPlayRule.Instance.petLimit;
                 }
             }
+
+            if (!_showOrHide)
+            {
+                ShowOrHideModel(_showOrHide);
+            }
         }
     }
 

--
Gitblit v1.8.0