From 31a441bf2842217a4fb215ae25d6e836980f52d4 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期四, 24 一月 2019 10:17:34 +0800
Subject: [PATCH] 5924 【后端】【1.5.100】诛仙Boss功能(杀人不红名)
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index 3d37919..7e838e8 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -34,7 +34,7 @@
FamilyPartyFB_QuestionTick = 'FamilyPartyFB_QuestionTick%s' #当前题出题时间
FamilyPartyFB_AnswerTick = 'FamilyPartyFB_AnswerTick%s' #答对时间
-
+AnswerState = 2 #开始答题活动状态
## 玩家登录
# @param None
# @return None
@@ -55,7 +55,7 @@
#刚登录的或刚进仙盟的补发最近的题目
gameWorld = GameWorld.GetGameWorld()
state = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_FamilyParty)
- if state != 1:
+ if state != AnswerState:
return
curFamilyid = curPlayer.GetFamilyID()
if not curFamilyid:
@@ -81,8 +81,8 @@
familyID = family.GetID()
gameWorld.SetDict(FamilyPartyFB_QuestionID % familyID, 0)
gameWorld.SetDict(FamilyPartyFB_AnswerTick % familyID, 0)
-
-
+ GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_FamilyPartyInfo, [])
+
if state == 0:
#活动结算 前3名仙盟、答题王
GameWorld.Log(" 仙盟宴会结算 g_familyAnswerDict=%s, g_familyPartyTopInfo=%s"%(PyGameData.g_familyAnswerDict, PyGameData.g_familyPartyTopInfo))
@@ -149,7 +149,7 @@
#开始出题
gameWorld = GameWorld.GetGameWorld()
state = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_FamilyParty)
- if state != 1:
+ if state != AnswerState:
return
allQuestionIDList = IpyGameDataPY.GetConfigEx('AllQuestionID')
ipyMgr = IpyGameDataPY.IPY_Data()
@@ -170,13 +170,14 @@
lastQuestionID = gameWorld.GetDictByKey(FamilyPartyFB_QuestionID % familyID)
if lastQuestionID:
#还有题未答
- if tick - gameWorld.GetDictByKey(FamilyPartyFB_QuestionTick % familyID) > IpyGameDataPY.GetFuncCfg('FairyCorrectAnswer')*1000:
+ maxSecond = IpyGameDataPY.GetFuncCfg('FairyCorrectAnswer')
+ if tick - gameWorld.GetDictByKey(FamilyPartyFB_QuestionTick % familyID) > maxSecond*1000:
ipyData = IpyGameDataPY.GetIpyGameData('QuestionBank', lastQuestionID)
if ipyData:
answer = ipyData.GetAnswer()
answer = answer.replace('[', '')
answer = answer.replace(']', '')
- PlayerControl.FamilyNotify(familyID, 'Party_Correct', [GameWorld.GbkToCode(answer)])
+ PlayerControl.FamilyNotify(familyID, 'Party_Correct', [maxSecond, GameWorld.GbkToCode(answer)])
else:
continue
answerTick = gameWorld.GetDictByKey(FamilyPartyFB_AnswerTick % familyID)
@@ -205,7 +206,7 @@
gameWorld = GameWorld.GetGameWorld()
state = gameWorld.GetDictByKey(ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_FamilyParty)
- if state != 1:
+ if state != AnswerState:
return
curFamilyid = curPlayer.GetFamilyID()
@@ -226,11 +227,11 @@
ChContent = GameWorld.CodeToGBK(ChContent)
ChContent = ChContent.strip()
isRight = ChContent in answerList
-# if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
-# if isRight:
-# PlayerControl.FamilyNotify(curFamilyid, 'FamilyPleaseIntoParty')
-# PlayerControl.NotifyCode(curPlayer, 'FamilyNoIntoParty')
-# return
+ if curPlayer.GetMapID() != ChConfig.Def_FBMapID_FamilyParty:
+ if isRight:
+ PlayerControl.FamilyNotify(curFamilyid, 'FamilyPleaseIntoParty')
+ PlayerControl.NotifyCode(curPlayer, 'FamilyNoIntoParty')
+ return
playerID = curPlayer.GetID()
GameWorld.DebugLog(" answer=%s ChContent=%s"%(answerList, ChContent), playerID)
--
Gitblit v1.8.0