10162 后台优化(开放入口增加检查开服天及版本号;非手动开新服默认为推荐服,其他服设置为不推荐;)
2个文件已添加
71 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_CheckOpenServer.py 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_CheckOpenServer.py 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_CheckOpenServer.py
New file
@@ -0,0 +1,38 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package GM.Commands.GMT_CheckOpenServer
#
# @todo:检查开服相关是否正常
# @author hxp
# @date 2024-10-23
# @version 1.0
#
# 详细描述: 检查开服相关是否正常
#
#-------------------------------------------------------------------------------
#"""Version = 2024-10-23 15:00"""
#-------------------------------------------------------------------------------
import GMCommon
import PlayerDBGSEvent
import GameWorld
## 执行逻辑
#  @param curPlayer 当前玩家
#  @param gmCmdDict: 命令字典
#  @return None
#  @remarks 函数详细说明.
def OnExec(orderId, gmCmdDict):
    GameWorld.DebugLog("GMT_CheckOpenServer %s, %s" % (orderId, gmCmdDict))
    openServerDay = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_ServerDay) + 1
    if openServerDay != 1:
        strMsg = {"errMsg":"OpenServerDayError", "openServerDay":openServerDay}
        GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Unknow, strMsg)
        GameWorld.SendGameError("GMT_CheckOpenServer", "开服天异常:%s" % openServerDay)
        return
    strMsg = {"errMsg":"OK"}
    GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success, strMsg)
    return
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_CheckOpenServer.py
New file
@@ -0,0 +1,33 @@
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package PyMongoDataServer.GMToolLogicProcess.Commands.GMT_CheckOpenServer
#
# @todo:检查开服相关是否正常
# @author hxp
# @date 2024-10-23
# @version 1.0
#
# 详细描述: 检查开服相关是否正常
#
#-------------------------------------------------------------------------------
#"""Version = 2024-10-23 15:00"""
#-------------------------------------------------------------------------------
import GMCommon
## 收到gm命令执行
# @param gmCmdDict:gm命令字典
# @return None
def OnExec(gmCmdDict):
    from LogicProcess import (UserCtrlDB,)
    # 先检查版本号
    checkRet = UserCtrlDB.CheckGameVersion()
    curVersion, centerVersion = checkRet if checkRet else ("", "")
    if curVersion == centerVersion:
        # 推给GameServer进一步检查
        return GMCommon.Def_SendToGameServer, ''
    return GMCommon.Def_Unknow, {"errMsg":"VersionError", "curVersion":curVersion, "centerVersion":centerVersion}