From e43df5edfae9d2f6e53df1f9c2cd88469cbf35d8 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 05 十二月 2018 15:22:46 +0800
Subject: [PATCH] 5224 子 【1.3.100】游戏帧数优化(一) / 【1.3.100】【前端】游戏帧数优化(一)
---
Fight/GameActor/GActorPlayerBase.cs | 39 ++++++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/Fight/GameActor/GActorPlayerBase.cs b/Fight/GameActor/GActorPlayerBase.cs
index ab7c68d..c9775ad 100644
--- a/Fight/GameActor/GActorPlayerBase.cs
+++ b/Fight/GameActor/GActorPlayerBase.cs
@@ -1096,6 +1096,7 @@
if (ShowOrHide)
{
m_Guard = GAMgr.Instance.RequestNpcNoFight<GA_Guard>(ServerInstID * 100 + 1, (uint)config.npcId, Group, null);
+ m_Guard.ActorInfo.ownerSID = ServerInstID;
m_Guard.itemID = (int)guardID;
m_Guard.InitBase();
m_Guard.IsStateActive = true;
@@ -2133,27 +2134,39 @@
ReleaseShadow();
}
- GA_Pet _pet = GAMgr.Instance.GetBySID(ServerInstID * 10 + 1) as GA_Pet;
- if (_pet != null)
+ GA_Player _player = this as GA_Player;
+ if (_player != null)
{
- _pet.ShowOrHideModel(showOrHide);
- }
-
- ShowOrHide = showOrHide;
-
- if (this is GA_Player)
- {
- var _player = this as GA_Player;
-
- if (ShowOrHide)
+ GA_Pet _pet = GAMgr.Instance.GetBySID(ServerInstID * 10 + 1) as GA_Pet;
+ var _index = BattleEffectPlayRule.Instance.GetIndex(ServerInstID);
+ if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
{
- if (_player.serverGuardId != 0)
+ if (_pet != null)
+ {
+ _pet.ShowOrHideModel(true);
+ }
+
+ if (m_Guard == null)
{
SwitchGuard((uint)_player.serverGuardId);
}
}
+ else
+ {
+ if (_pet != null)
+ {
+ _pet.ShowOrHideModel(false);
+ }
+
+ if (m_Guard != null)
+ {
+ SwitchGuard(0);
+ }
+ }
}
+ ShowOrHide = showOrHide;
+
}
/// <summary>
--
Gitblit v1.8.0