| | |
| | | import GMShell
|
| | |
|
| | | import traceback
|
| | | import json
|
| | |
|
| | | def SendMsgToCrossServer(msgType, dataMsg):
|
| | | ## 发送信息到跨服服务器上
|
| | |
| | | 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):
|
| | |
| | |
|
| | | 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")
|
| | | |