From 9a4c438bc7d995bd24fdd484f8d6ddd9e66bd4bf Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 20 四月 2019 15:18:03 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

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 7abbf6a..88d8d75 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -1592,6 +1592,18 @@
     if mapID not in ChConfig.Def_CrossMapIDList:
         return
     
+    tick = GameWorld.GetGameWorld().GetTick()
+    lastRequestTick = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_RequestEnterCrossServerTick)
+    if lastRequestTick and tick - lastRequestTick < 5000:
+        GameWorld.DebugLog("    请求进入跨服CD中!", playerID)
+        NotifyCode(curPlayer, "RequestEnterCrossServerCD")
+        return
+    
+    crossRegisterMap = curPlayer.NomalDictGetProperty(ChConfig.Def_PlayerKey_CrossRegisterMap)
+    if crossRegisterMap:
+        GameWorld.ErrLog("跨服已经在上传数据,不重复提交!crossRegisterMap=%s,mapID=%s" % (crossRegisterMap, mapID), playerID)
+        return
+    
     if GameWorld.IsCrossServer():
         GameWorld.DebugLog("跨服服务器不允许该操作!")
         return
@@ -1626,7 +1638,6 @@
         if ret != ShareDefine.EntFBAskRet_OK:
             return
         
-        tick = GameWorld.GetGameWorld().GetTick()
         if not FBLogic.OnEnterFBEvent(curPlayer, mapID, lineID, tick):
             GameWorld.DebugLog("    OnEnterFBEvent False!", curPlayer.GetPlayerID())
             NotifyCode(curPlayer, "SingleEnterDefaul")
@@ -1645,9 +1656,11 @@
         if extendInfo:
             msgDict.update(extendInfo)
         GameWorld.SendMsgToCrossServer(ShareDefine.ClientServerMsg_EnterFB, msgDict)
-        return
-    
-    GY_Query_CrossRealmReg.RegisterEnterCrossServer(curPlayer, mapID, lineID=lineID)
+    else:
+        isSend = GY_Query_CrossRealmReg.RegisterEnterCrossServer(curPlayer, mapID, lineID=lineID)
+        if not isSend:
+            return
+    curPlayer.SetDict(ChConfig.Def_PlayerKey_RequestEnterCrossServerTick, tick)
     return
 
 ##玩家进入副本

--
Gitblit v1.8.0