From d38c7d1761ffcf23758289dbc9b7a25f700caf6e Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期二, 04 九月 2018 14:39:28 +0800
Subject: [PATCH] 1 当客户端攻击或移动tick不对时同步一次

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py     |    3 ++-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py      |    2 ++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |    1 -
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index c63b2a6..32ee3d2 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -1846,6 +1846,7 @@
     curMap = GameWorld.GetMap()
     #校验客户端时间
     if not PlayerControl.PlayerMoveCheckClientWorldTick(curPlayer, clientWorldTick, client_StartX, client_StartY):
+        curPlayer.Sync_ClientTick()
         return
     
     #移动点检查
@@ -5409,6 +5410,7 @@
 
     #校验客户端时间
     if not PlayerControl.PlayerMoveCheckClientWorldTick(curPlayer, sendPack_WorldTick, sendPack_SeverPosX, sendPack_SeverPosY):
+        curPlayer.Sync_ClientTick()
         return False
 
     dist = GameWorld.GetDist(curPlayer.GetPosX(), curPlayer.GetPosY(), sendPack_SeverPosX, sendPack_SeverPosY)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
index de758cd..2606f18 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -116,7 +116,6 @@
         #时间相差过大,可能因网络引起,拉回
         GameWorld.DebugLog("PlayerMoveCheckClientWorldTick -- 服务器tick %s-客户端%s时间相差过大,可能因网络引起,拉回" % (
                             gameWorldTick, clientWorldTick), curPlayer.GetID())
-        curPlayer.Sync_ClientTick()
         return False
     
     if gameWorldTick - curPlayer.GetDictByKey("CheckTick") > 60000:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index d38337f..99e5fb4 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -929,7 +929,8 @@
         return
 
     if not CheckClientAttackTick(curPlayer, clientTick, tick):
-        AttackFailNotify(curPlayer, curSkill, ChConfig.SkillFail_AtkInterval)   
+        AttackFailNotify(curPlayer, curSkill, ChConfig.SkillFail_AtkInterval)  
+        curPlayer.Sync_ClientTick() 
         return
 
     #已经在攻击中

--
Gitblit v1.8.0