5512 子 【开发】【1.4】跨服竞技场 / 【后端】【1.4】跨服竞技场开发 -- 命名规则修改
2个文件已修改
36 ■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/CrossRealmPlayer.py
@@ -28,16 +28,31 @@
import PyGameData
# 获取玩家跨服服务器上的名字
#===============================================================================
# def GetCrossPlayerName(curPlayer):
#    # 通过游戏账号中的平台标志获取名称,目前为spid
#    playerName = curPlayer.GetPlayerName()
#    nameFormat = ReadChConfig.GetPyMongoConfig("Merge", "NameFormat", True)
#    if not nameFormat:
#        return playerName
#
#    opName = ReadChConfig.GetPyMongoConfig("Merge", "OpName_%s" % GameWorld.GetPlayerPlatform(curPlayer))
#
#    return (nameFormat%{"opname":opName, "sid":GameWorld.GetPlayerServerID(curPlayer)}).decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
#===============================================================================
# 获取玩家跨服服务器上的名字
def GetCrossPlayerName(curPlayer):
    # 通过游戏账号中的平台标志获取名称,目前为spid
    playerName = curPlayer.GetPlayerName()
    nameFormat = ReadChConfig.GetPyMongoConfig("Merge", "NameFormat", True)
    if not nameFormat:
    opName = ReadChConfig.GetPyMongoConfig("Merge", "OpName_%s_%s" % (GameWorld.GetPlayerPlatform(curPlayer)),
                                           GameWorld.GetPlayerServerSID(curPlayer))
    if not opName:
        return playerName
    
    opName = ReadChConfig.GetPyMongoConfig("Merge", "OpName_%s" % GameWorld.GetPlayerPlatform(curPlayer))
    return (nameFormat%{"opname":opName, "sid":GameWorld.GetPlayerServerID(curPlayer)}).decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
    return opName.decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
def PlayerExitCrossServer(curPlayer):
    ## 玩家退出跨服服务器
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/CrossRealmPlayer.py
@@ -26,13 +26,14 @@
def GetCrossPlayerName(curPlayer):
    # 通过游戏账号中的平台标志获取名称,目前为spid
    playerName = curPlayer.GetPlayerName()
    nameFormat = ReadChConfig.GetPyMongoConfig("Merge", "NameFormat", True)
    if not nameFormat:
    opName = ReadChConfig.GetPyMongoConfig("Merge", "OpName_%s_%s" % (GameWorld.GetPlayerPlatform(curPlayer)),
                                           GameWorld.GetPlayerServerSID(curPlayer))
    if not opName:
        return playerName
    
    opName = ReadChConfig.GetPyMongoConfig("Merge", "OpName_%s" % GameWorld.GetPlayerPlatform(curPlayer))
    return (nameFormat%{"opname":opName, "sid":GameWorld.GetPlayerServerID(curPlayer)}).decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
    return opName.decode('gbk').encode(GameWorld.GetCharacterEncoding()) + playerName
#// C1 04 主动退出跨服 #tagCMExitCrossRealm
#