From 0d0a2ff5d04a605abf0092c054ea801936d23b17 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期一, 14 一月 2019 22:00:21 +0800 Subject: [PATCH] 5722 【后端】【1.5】跨服BOSS开发(跨服采集支持,采集支持配置共享采集次数) --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py | 17 +++++++++++++---- 1 files changed, 13 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 6ffbb43..5590d72 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py @@ -118,6 +118,7 @@ Def_Max_Move_Tick = 5000 if abs(gameWorldTick - clientWorldTick) >= Def_Max_Move_Tick: + curPlayer.Sync_ClientTick() #时间相差过大,可能因网络引起,拉回 GameWorld.DebugLog("PlayerMoveCheckClientWorldTick -- 服务器tick %s-客户端%s时间相差过大,可能因网络引起,拉回" % ( gameWorldTick, clientWorldTick), curPlayer.GetID()) @@ -1574,12 +1575,18 @@ GameWorld.DebugLog("跨服服务器不允许该操作!") return - if GetCrossRealmState(curPlayer): + if GetCrossMapID(curPlayer): GameWorld.ErrLog("玩家当前为跨服状态,不允许再次请求进入跨服!", curPlayer.GetPlayerID()) return if not CrossRealmPlayer.IsCrossServerOpen(): NotifyCode(curPlayer, "CrossMatching18") + return + + if curPlayer.GetHP() <= 0: + return + + if PlayerCrossRealmPK.GetIsCrossPKMatching(curPlayer): return GY_Query_CrossRealmReg.RegisterEnterCrossServer(curPlayer, mapID) @@ -5710,9 +5717,11 @@ def SetFBFuncLineID(curPlayer, funcLineID): return curPlayer.SetExAttr3(funcLineID, False, False) def GetFBFuncLineID(curPlayer): return curPlayer.GetExAttr3() -## 跨服状态: 0-非跨服状态,1-跨服状态 -def GetCrossRealmState(curPlayer): return curPlayer.GetExAttr5() -def SetCrossRealmState(curPlayer, value): curPlayer.SetExAttr5(value, False, True) +## 跨服状态所在地图ID: 0-非跨服状态,非0-跨服状态对应的地图ID +def GetCrossMapID(curPlayer): return curPlayer.GetExAttr5() +def SetCrossMapID(curPlayer, value): + curPlayer.SetExAttr5(value, False, True) + return ## 铜钱点, 支持铜钱超20亿 def GetSilver(curPlayer): return curPlayer.GetExAttr6() * ChConfig.Def_PerPointValue + curPlayer.GetSilver() -- Gitblit v1.8.0