hxp
2025-05-23 fdebf36f0d9201c6a6949a08cdfeebb718c25ce2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorld.py
@@ -866,6 +866,8 @@
# @remarks 获得服务器系统时间
def GetCurrentTime():
    return datetime.datetime.today()
def GetServerTime():
    return datetime.datetime.today()
#    ctime = GetGameWorld().GetGameServerEventTime()
#    
#    if not ctime:
@@ -1318,15 +1320,11 @@
    ## 服务器组ID,必须唯一,代表这台物理服务器
    return ToIntDef(ReadChConfig.GetPyMongoConfig("platform", "GroupID"), 0)
def GetServerID():
    ## 当前服务器ID
    return 87
def GetMainServerID(serverID):
    ## 获取服务器ID所属主服ID
    ServerIDMainServerDict = IpyGameDataPY.GetConfigEx("ServerIDMainServerDict")
    if ServerIDMainServerDict == None:
        filePath = ChConfig.GetDBPath() + ("\\MixServerMap_%s.json" % GetPlatform())
        filePath = ChConfig.GetServerConfigPath() + ("\\MixServerMap_%s.json" % GetPlatform())
        if not os.path.isfile(filePath):
            SendGameErrorEx("GetMainServerIDError", "file can not found. %s" % filePath)
        else:
@@ -1408,6 +1406,9 @@
        return mainServerID
    return 0
def GetDBPlayerAccIDByID(playerID):
    ## 获取玩家表账号ID - 根据玩家ID, 可用于判断是否本服玩家
    return PyGameData.g_dbPlayerIDMap.get(playerID, "")
#===============================================================================
# ƽ̨ID = appid
@@ -2389,8 +2390,8 @@
def SendGameErrorEx(errType, msgInfo="", playerID=0):
    ErrLog("SendGameErrorEx: %s -> %s" % (errType, msgInfo), playerID)
    SendGameError(errType, msgInfo)
    if GetGameWorld().GetDebugLevel():
        raise Exception("%s -> %s" % (errType, msgInfo))
    #if GetGameWorld().GetDebugLevel():
    #    raise Exception("%s -> %s" % (errType, msgInfo))
    return
def SendGameError(errType, msgInfo=""):