5032 【主干】【BT2】仙盟答题正确答案显示乱码(优化提取答案逻辑)
1个文件已修改
8 ■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -206,8 +206,12 @@
                ipyData = IpyGameDataPY.GetIpyGameData('QuestionBank', lastQuestionID)
                if ipyData:
                    answer = ipyData.GetAnswer()
                    answer = answer.replace('[', '')
                    answer = answer.replace(']', '')
                    #不能用replace, 可能导致替换错误, 如 ['望廬山瀑布'] 为 "['\xcd\xfb\x8f]\xc9\xbd\xc6\xd9\xb2\xbc']" 中间有个 ] 替换会导致乱码
                    #answer = answer.replace('[', '')
                    #answer = answer.replace(']', '')
                    answer = answer.strip()
                    if answer.startswith("[") and answer.endswith("]"):
                        answer = answer[1:-1]
                    PlayerControl.FamilyNotify(familyID, 'Party_Correct', [maxSecond, GameWorld.GbkToCode(answer)])
                    
                for index in xrange(family.GetCount()):