From 40e13a9662e044e266ede74fb279e7305191ecc3 Mon Sep 17 00:00:00 2001
From: 339726288@qq.com <339726288@qq.com>
Date: 星期四, 09 八月 2018 16:24:15 +0800
Subject: [PATCH] fixed #1478 隐藏其他角色后再显示,守护没有显形

---
 Fight/GameActor/GActorPlayerBase.cs |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index a0a15f2..41f8fef 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -2068,16 +2068,19 @@
 
         ShowOrHide = showOrHide;
 
-        if (ShowOrHide)
+        if (this is GA_Player)
         {
-            var _equipModel = PlayerBackModel.GetSinglePackModel(PackType.rptEquip);
-            var _itemModel = _equipModel.GetItemModelByIndex((int)RoleEquipType.retSpiritAnimal);
+            var _player = this as GA_Player;
 
-            if (_itemModel != null)
+            if (ShowOrHide)
             {
-                SwitchGuard((uint)_itemModel.itemInfo.ItemID);
+                if (_player.serverGuardId != 0)
+                {
+                    SwitchGuard((uint)_player.serverGuardId);
+                }
             }
         }
+
     }
 
     private void ChangeBinderToClothes()

--
Gitblit v1.8.0