From cf68d0b9ba9848711a8ade63e5139ee02449e1ff Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期三, 16 一月 2019 14:28:25 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 Core/GameEngine/Model/Player/PlayerDatas.cs |   12 ++++++------
 Fight/Actor/HeroBehaviour.cs                |    3 ++-
 System/KnapSack/Logic/ItemOverdueModel.cs   |    4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/Core/GameEngine/Model/Player/PlayerDatas.cs b/Core/GameEngine/Model/Player/PlayerDatas.cs
index 05be617..d7c1a72 100644
--- a/Core/GameEngine/Model/Player/PlayerDatas.cs
+++ b/Core/GameEngine/Model/Player/PlayerDatas.cs
@@ -43,7 +43,7 @@
     public uint worldExpRate { get; private set; }
     public List<uint> maliciousAtkPlayer = new List<uint>();// 鍙戝姩鎭舵剰鏀诲嚮鐨勭帺瀹跺垪琛�
     private int m_Tick;
-    private uint m_CrossServerTick;
+    public uint crossServerTick;
 
     public event Action OnRoleAttrRefresh;
     public event Action<E_AttackMode> OnSwitchAttackMode;
@@ -479,7 +479,7 @@
                 }
                 else
                 {
-                    if (m_CrossServerTick != 0)
+                    if (crossServerTick != 0)
                     {
                         uint _curWorldTick = GetWorldTick();
                         uint _diffValue = value > _curWorldTick ? value - _curWorldTick : _curWorldTick - value;
@@ -497,7 +497,7 @@
                 }
                 else
                 {
-                    m_CrossServerTick = value;
+                    crossServerTick = value;
                 }
                 m_Tick = Environment.TickCount;
 
@@ -1006,14 +1006,14 @@
     public void ClearTick()
     {
         extersion.Tick = 0;
-        m_CrossServerTick = 0;
+        crossServerTick = 0;
     }
 
     public bool IsTickVaild()
     {
         if (CrossServerUtility.IsCrossServer())
         {
-            return m_CrossServerTick != 0;
+            return crossServerTick != 0;
         }
         else
         {
@@ -1024,7 +1024,7 @@
     public uint GetWorldTick()
     {
         int _currentTick = Environment.TickCount - m_Tick;
-        uint _tick = CrossServerUtility.IsCrossServer() ? m_CrossServerTick + (uint)_currentTick : extersion.Tick + (uint)_currentTick;
+        uint _tick = CrossServerUtility.IsCrossServer() ? crossServerTick + (uint)_currentTick : extersion.Tick + (uint)_currentTick;
         return _tick;
     }
 
diff --git a/Fight/Actor/HeroBehaviour.cs b/Fight/Actor/HeroBehaviour.cs
index 7653647..0262455 100644
--- a/Fight/Actor/HeroBehaviour.cs
+++ b/Fight/Actor/HeroBehaviour.cs
@@ -341,7 +341,8 @@
 
     public void DoAttack(Skill skill)
     {
-        if (PlayerDatas.Instance.extersion.Tick == 0)
+        if (PlayerDatas.Instance.extersion.Tick == 0 &&
+            PlayerDatas.Instance.crossServerTick == 0)
         {
             return;
         }
diff --git a/System/KnapSack/Logic/ItemOverdueModel.cs b/System/KnapSack/Logic/ItemOverdueModel.cs
index bba7915..d239174 100644
--- a/System/KnapSack/Logic/ItemOverdueModel.cs
+++ b/System/KnapSack/Logic/ItemOverdueModel.cs
@@ -102,7 +102,7 @@
 
         public void ReportConfirmUseItem(string guid)
         {
-            if (string.IsNullOrEmpty(guid))
+            if (guid == null)
             {
                 return;
             }
@@ -458,7 +458,7 @@
 
             public static bool operator !=(OverdueItem _lhs, OverdueItem _rhs)
             {
-                return _lhs.itemId != _rhs.itemId || _lhs.guid != _rhs.guid || _lhs.index == _rhs.index;
+                return _lhs.itemId != _rhs.itemId || _lhs.guid != _rhs.guid || _lhs.index != _rhs.index;
             }
 
         }

--
Gitblit v1.8.0