From 7092b21fcd41a0d2b14c428e04950097967f3619 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 03 二月 2021 17:56:45 +0800
Subject: [PATCH] 4926 【主干】仙盟宴会答题(加载的答案格式异常的不列入随机题库);

---
 ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index f6b51be..92d8ea0 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -183,8 +183,14 @@
         for i in xrange(ipyMgr.GetQuestionBankCount()):
             ipyData = ipyMgr.GetQuestionBankByIndex(i)
             questionID = ipyData.GetID()
+            try:
+                eval(ipyData.GetAnswer())
+            except:
+                GameWorld.ErrLog("答题题库答案异常,不处理! questionID=%s,answer=%s" % (questionID, ipyData.GetAnswer()))
+                continue
             allQuestionIDList.append(questionID)
         IpyGameDataPY.SetConfigEx('AllQuestionID', allQuestionIDList)
+        GameWorld.Log("加载仙盟宴会答题题库ID! %s" % str(allQuestionIDList))
     if not allQuestionIDList:
         GameWorld.ErrLog('仙盟宴会题库没有题目!')
         return

--
Gitblit v1.8.0