| | |
| | | import ShareDefine
|
| | | import DataRecordPack
|
| | | import CrossRealmMsg
|
| | | import ReadChConfig
|
| | | import GameWorld
|
| | | import GMCommon
|
| | |
|
| | |
| | | GameWorld.Log("GMT_CrossClientServerMaintain gmCmdDict=%s" % str(gmCmdDict))
|
| | | operate = gmCmdDict.get('operate', '')
|
| | |
|
| | | strMsg = ""
|
| | | strMsg = {"operate":operate}
|
| | | if GameWorld.IsCrossServer():
|
| | | strMsg = "this server is cross server. can not do!"
|
| | | strMsg.update({"error":1})
|
| | |
|
| | | # 查询跨服状态
|
| | | elif operate == "cross_server_state":
|
| | | crossServerIP = ReadChConfig.GetPyMongoConfig("Merge", "MergeServerIP")
|
| | | isOpen = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerOpen)
|
| | | isConn = GameWorld.GetGameWorld().GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossServerConnState)
|
| | | strMsg = {"OpenState":isOpen, "ConnState":isConn}
|
| | | strMsg.update({"OpenState":isOpen, "ConnState":isConn, "CrossServerIP":crossServerIP})
|
| | |
|
| | | # 查询跨服PK状态
|
| | | elif operate == "cross_pk_state":
|
| | |
| | | seasonState = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossPKSeasonState)
|
| | | matchState = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_CrossDailyActionState % ShareDefine.DailyActionID_CrossReamPK)
|
| | |
|
| | | strMsg = {"GroupID":GameWorld.GetServerGroupID(), "ZoneID":zoneID, "SeasonID":seasonID, "SeasonState":seasonState, "MatchState":matchState}
|
| | | strMsg.update({"GroupID":GameWorld.GetServerGroupID(), "ZoneID":zoneID, "SeasonID":seasonID, "SeasonState":seasonState, "MatchState":matchState})
|
| | |
|
| | | # 重新同步跨服状态
|
| | | elif operate == "reconn_cross_Server":
|
| | | CrossRealmMsg.OnGameServerInitOK()
|
| | | strMsg.update({"OK":1})
|
| | |
|
| | | else:
|
| | | GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
|