| | |
| | | import IPY_GameServer
|
| | | import CrossRealmPlayer
|
| | | import CrossRealmPK
|
| | | import ChConfig
|
| | | import GMShell
|
| | |
|
| | | import traceback
|
| | |
| | | ## 子服收到跨服服务器信息
|
| | | dataPack = IPY_GameServer.IPY_LGCrossLoginResult()
|
| | | result = dataPack.GetResult()
|
| | | connState = 1 if result == 1 else 0
|
| | | GameWorld.GetGameWorld().SetDict(ShareDefine.Def_Notify_WorldKey_CrossServerConnState, connState)
|
| | | |
| | | if result != 1:
|
| | | GameWorld.Log("--OnClientServerReceiveMsg disconn")
|
| | | CrossRealmPlayer.CrossServerMsg_CrossServerState({"isOpen":0})
|
| | | return
|
| | |
|
| | | GameWorld.Log("OnConnCorossServer conn success!!!")
|
| | | if not GameWorld.GetGameWorld().GetDictByKey(ChConfig.Def_WorldKey_IsGameWorldInit):
|
| | | GameWorld.Log(" 服务器还未启动好,暂不处理! 等服务器启动好后再处理!")
|
| | | return
|
| | | |
| | | serverGroupID = GameWorld.GetServerGroupID()
|
| | | if GameWorld.IsCrossRealmOpen() and not GameWorld.IsCrossServer():
|
| | | GameWorld.Log("通知跨服主服务器链接成功, 可接收最新跨服活动状态及数据...")
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def OnGameServerInitOK():
|
| | | ## 子服启动成功
|
| | | if GameWorld.IsCrossServer():
|
| | | return
|
| | | |
| | | serverGroupID = GameWorld.GetServerGroupID()
|
| | | if GameWorld.IsCrossRealmOpen() and not GameWorld.IsCrossServer():
|
| | | GameWorld.Log("通知跨服主服务器启动成功, 可接收最新跨服活动状态及数据...")
|
| | | dataMsg = {"ServerGroupID":serverGroupID}
|
| | | SendMsgToCrossServer(ShareDefine.ClientServerMsg_ServerInitOK, dataMsg)
|
| | | return
|
| | |
|
| | |
|
| | | |