| | |
| | | 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):
|
| | | ## 玩家退出跨服服务器
|