From fdc93e9592be7de1dff464c911aae6489f1a6eed Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 11 一月 2019 18:23:21 +0800
Subject: [PATCH] 5512 子 【开发】【1.4】跨服竞技场 / 【后端】【1.4】跨服竞技场开发 --  指定gameworld的npc管理

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py |   16 ++++++++++++----
 1 files changed, 12 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 0556fbc..5590d72 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -1575,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)
@@ -5711,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