From 0e9130c0a399fb72da75e6065350cd8fc8a4bf77 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 26 七月 2019 15:42:21 +0800
Subject: [PATCH] 860312 去除23点会再广播一次 答题结算
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py | 6 ++++--
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py | 10 ++++++----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index 1dfac90..1cff4a0 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -1095,11 +1095,12 @@
# GameWorld.DebugLog(" 副本可否进入已经是该值: dataMapID=%s,updCanEnter=%s,canEnterKey=%s" % (dataMapID, updCanEnter, canEnterKey))
fbFuncStateKey = ShareDefine.Def_Notify_WorldKey_FBFuncState % dataMapID
- if gameWorld.GetDictByKey(fbFuncStateKey) != updStateValue:
+ beforeState = gameWorld.GetDictByKey(fbFuncStateKey)
+ if beforeState != updStateValue:
GameWorld.SendMapServerMsgEx(fbFuncStateKey, updStateValue) #通知Mapserver,设置字典
gameWorld.SetDict(fbFuncStateKey, updStateValue) #更新字典值
GameWorld.Log("副本状态变更: dataMapID=%s,updStateValue=%s,fbFuncStateKey=%s" % (dataMapID, updStateValue, fbFuncStateKey))
- __DoLogic_GameServer_ActionState(fbFuncStateKey, updStateValue)
+ __DoLogic_GameServer_ActionState(fbFuncStateKey, updStateValue, beforeState)
#else:
# GameWorld.DebugLog(" 副本状态已经是该值: dataMapID=%s,updStateValue=%s,fbFuncStateKey=%s" % (dataMapID, updStateValue, fbFuncStateKey))
@@ -1245,12 +1246,13 @@
##处理GameServer活动状态
# @param dictName 字典名
# @param isOpen 是否开启
+# @param beforeState 状态变更前的值,部分判断处理
# @return 返回值无意义
# @remarks
-def __DoLogic_GameServer_ActionState(dictName, isOpen):
+def __DoLogic_GameServer_ActionState(dictName, isOpen, beforeState=0):
#仙盟宴会
if dictName == ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_FamilyParty:
- PlayerFamilyParty.FamilyPartyStateChange(isOpen)
+ PlayerFamilyParty.FamilyPartyStateChange(isOpen, beforeState)
#仙盟联赛
elif dictName == ShareDefine.Def_Notify_WorldKey_FBFuncState % ChConfig.Def_FBMapID_FamilyWar:
GameWorldFamilyWar.OnFamilyWarStateChange(isOpen)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
index 06275cc..39e15f0 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerFamilyParty.py
@@ -66,7 +66,7 @@
PlayerControl.NotifyCode(curPlayer, 'Party_Topic', [questionID])
return
-def FamilyPartyStateChange(state):
+def FamilyPartyStateChange(state, beforeState=0):
#活动状态变更
if state == 1:
@@ -101,7 +101,9 @@
if not family:
continue
PlayerFamilyRedPacket.CreatNewFamilyRedPacket(family, family.GetLeaderID(), redPackID)
- PlayerControl.WorldNotify(0, 'Party_TopThree', topfamilyNameList)
+
+ if beforeState == AnswerState:
+ PlayerControl.WorldNotify(0, 'Party_TopThree', topfamilyNameList)
if PyGameData.g_familyPartyTopInfo:
--
Gitblit v1.8.0