| | |
| | | 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
|
| | |
| | | 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()):
|