| | |
| | | def GetPlayerMainServerID(accIDPlatform):
|
| | | # 玩家合服后所属主服ID
|
| | | # @param accIDPlatform: 玩家账号所属的平台
|
| | | #===========================================================================
|
| | | # mainServerID = ToIntDef(ReadChConfig.GetPyMongoConfig("platform", "%sMainServerID" % accIDPlatform), None)
|
| | | # if mainServerID != None:
|
| | | # return mainServerID
|
| | | #===========================================================================
|
| | | mainServerID = ToIntDef(ReadChConfig.GetPyMongoConfig("platform", "%sMainServerID" % accIDPlatform), None)
|
| | | if mainServerID != None:
|
| | | return mainServerID
|
| | | return GetServerID()
|
| | |
|
| | | ##获取玩家所属平台
|
| | |
| | | except:
|
| | | return inputText
|
| | |
|
| | | return inputText
|
| | |
|
| | | # 服务器默认GBK,转配置编码如UTF8,一般用于与显示层交互,不判断是否base64
|
| | | def CodeToGBK(inputText):
|
| | | encodingList = ReadChConfig.GetEvalChConfig("EncodingTex")
|
| | | |
| | | if len(encodingList) != 2:
|
| | | ErrLog("EncodingTex.txt Error len != 2")
|
| | | return inputText
|
| | | |
| | | try:
|
| | | return inputText.decode(GetCharacterEncoding()).encode(ShareDefine.Def_Game_Character_Encoding)
|
| | | except:
|
| | | return inputText
|
| | | |
| | | return inputText |