From 2af64e0aa0a6d8c4aea5fed79986adfa364a1ace Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 25 十二月 2018 19:38:10 +0800
Subject: [PATCH] 5424 【后端】【1.4】跨服竞技场开发(Add: C1 03 跨服PK玩家历史赛季信息 #tagMCCrossRealmPKPlayerHisSeasonInfo)
---
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
index db3b4d1..b5b217c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/CrossRealmMsg.py
@@ -24,6 +24,7 @@
import GMShell
import traceback
+import json
def SendMsgToCrossServer(msgType, dataMsg):
## 发送信息到跨服服务器上
@@ -95,8 +96,10 @@
GameWorld.GetGameWorld().SendBroadcastMergeClient(sendMsg)
else:
serverGroupIDList = list(set(serverGroupIDList)) # 去重
- for serverGroupID in serverGroupIDList:
- GameWorld.GetGameWorld().SendMergeMsgToClientByGroupID(serverGroupID, sendMsg)
+ #for serverGroupID in serverGroupIDList:
+ # GameWorld.GetGameWorld().SendMergeMsgToClientByGroupID(serverGroupID, sendMsg)
+ jsonGroupIDInfo = json.dumps(serverGroupIDList, ensure_ascii=False)
+ GameWorld.GetGameWorld().SendMergeMsgToClientByGroupList(jsonGroupIDInfo, sendMsg)
return
def OnClientServerReceiveMsg(index, tick):
@@ -141,3 +144,15 @@
return
+
+# 连接跨服服务器状态
+# 1 为连接成功; 其他为失败,失败会延迟通知
+def OnConnCorossServer(index, tick):
+ ## 子服收到跨服服务器信息
+ dataPack = IPY_GameServer.IPY_LGCrossLoginResult()
+ result = dataPack.GetResult()
+ if result == 1:
+ GameWorld.Log("OnConnCorossServer conn success!!!")
+ else:
+ GameWorld.Log("--OnClientServerReceiveMsg disconn")
+
\ No newline at end of file
--
Gitblit v1.8.0