From e334d90099846d5eaf0ec42fb294b63db3932468 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期五, 10 八月 2018 18:01:52 +0800
Subject: [PATCH] On master: boss复活

---
 ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index b33131c..3662c3e 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -71,11 +71,7 @@
         ipyData = operationActionDict[ShareDefine.OperationActionName_ExpRate][0]
         if ipyData:
             Sync_OperationAction_ExpRate(ipyData, curPlayer)
-    # BOSS复活活动进行中
-    if ShareDefine.OperationActionName_BossReborn in operationActionDict:
-        ipyData = operationActionDict[ShareDefine.OperationActionName_BossReborn][0]
-        if ipyData:
-            GameWorldBoss.Sync_OperationAction_BossReborn(ipyData, curPlayer)
+
     # 仙界盛典活动进行中
     if ShareDefine.OperationActionName_FairyCeremony in operationActionDict:
         ipyData = operationActionDict[ShareDefine.OperationActionName_FairyCeremony][0]
@@ -327,7 +323,7 @@
                              ShareDefine.ActKey_ShopTypeList:todayShopType}
     # Boss复活活动
     elif actName == ShareDefine.OperationActionName_BossReborn:
-        mapServerInfoDict = {ShareDefine.ActKey_ID:actID}
+        mapServerInfoDict = {ShareDefine.ActKey_ID:actID,ShareDefine.ActKey_TemplateID:ipyData.GetTemplateID()}
     # 限时礼包活动
     elif actName == ShareDefine.OperationActionName_FlashGiftbag:
         isDayReset = ipyData.GetIsDayReset()
@@ -397,7 +393,8 @@
                 PlayerControl.WorldNotify(0, notifyKey, paramList)
                 
         dictName = ChConfig.Def_WorldKey_OperationActionState % actName
-        if not isReload and gameWorld.GetDictByKey(dictName) == state:
+        preState = gameWorld.GetDictByKey(dictName)
+        if not isReload and preState == state:
             #已经是这个状态了
             continue
         #更新字典值
@@ -408,6 +405,11 @@
         curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
         if state >= 1 and curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
             PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
+            if actName in ShareDefine.NeedWorldLVOperationActNameList:
+                #记录开启时世界等级
+                worldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
+                PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName, worldLV)
+                
             #此处为活动开启时
             if actName == ShareDefine.OperationActionName_BossReborn:
                 #重置BOSS复活点
@@ -416,10 +418,7 @@
                 #重置仙界盛典
                 PlayerFairyCeremony.ResetFairyCeremony()
             
-            if actName in ShareDefine.NeedWorldLVOperationActNameList:
-                #记录开启时世界等级
-                worldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(ShareDefine.Def_Notify_WorldKey_WorldAverageLv)
-                PlayerDBGSEvent.SetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName, worldLV)
+            
                 
         if state == 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
             actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
@@ -434,11 +433,12 @@
                 pass
         elif actName == ShareDefine.OperationActionName_BossReborn:
             if isReload and ipyData:
-                GameWorldBoss.Sync_OperationAction_BossReborn(ipyData)
+                GameWorldBoss.SetBossRebornNeedPoint(True)
+
         elif actName == ShareDefine.OperationActionName_FairyCeremony:
             if isReload and ipyData:
                 PlayerFairyCeremony.Sync_OperationAction_FairyCeremony(ipyData)
-            if state == 0:
+            if preState != state and state == 0:
                 PlayerFairyCeremony.OnFairyCeremonyEnd()
         elif actName == ShareDefine.OperationActionName_RealmPoint:
             if isReload and ipyData:
@@ -449,7 +449,7 @@
         sendMapServerMsgDict[ShareDefine.ActKey_State] = state
         GameWorld.SendMapServerMsgEx(ShareDefine.Def_Notify_WorldKey_OperationActionInfo % actName, sendMapServerMsgDict)
         
-        GameWorld.Log("运营活动变更: actName=%s,state=%s,dictName=%s, %s" % (actName, state, dictName, sendMapServerMsgDict))
+        GameWorld.Log("运营活动变更: actName=%s,preState=%s,state=%s,dictName=%s, %s" % (actName, preState, state, dictName, sendMapServerMsgDict))
     return
 
 def Sync_OperationAction_ExpRate(ipyData, curPlayer=None):

--
Gitblit v1.8.0