From 4bcef0ba119712bcd00064516062480f4b46bb51 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 23 九月 2022 14:22:33 +0800
Subject: [PATCH] 9701 【后端】【越南】【BT7】【主干】跨服竞技64位排位赛(初版)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index 92d8ea0..dea19da 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/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()):
--
Gitblit v1.8.0