From c2f66e6ffcc1bfa9b919c92bfee8729158ac5426 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 19 九月 2018 14:44:23 +0800
Subject: [PATCH] 3681 【后端】神兽基础战斗力

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py
index 5e300bb..fb1100f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py
@@ -59,6 +59,7 @@
     actBossRebornInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_BossReborn, {})
     bossRebornID = actBossRebornInfo.get(ShareDefine.ActKey_ID, 0)
     state = actBossRebornInfo.get(ShareDefine.ActKey_State, 0)
+    cfgID = actBossRebornInfo.get(ShareDefine.ActKey_CfgID, 0)
     
     playerBossRebornID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BossRebornID)  # 玩家身上的活动ID
     
@@ -66,10 +67,11 @@
     if bossRebornID == playerBossRebornID:
         #GameWorld.DebugLog("BOSS复活活动ID不变,不处理!", curPlayer.GetPlayerID())
         return
-    actBossIpyData = IpyGameDataPY.GetIpyGameData("ActBossReborn", actBossRebornInfo.get(ShareDefine.ActKey_CfgID, 0))
-    if not actBossIpyData:
-        return
-    templateID = actBossIpyData.GetTemplateID()
+    
+    templateID = 0
+    if cfgID:
+        actBossIpyData = IpyGameDataPY.GetIpyGameData("ActBossReborn", cfgID)
+        templateID = 0 if not actBossIpyData else actBossIpyData.GetTemplateID()
     playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BossRebornTemplateID)
     
     GameWorld.DebugLog("BOSS复活重置! costRebateID=%s,playerCostRebateID=%s,state=%s,templateID=%s,playerTemplateID=%s" 
@@ -210,9 +212,10 @@
 def SyncBossRebornInfo(curPlayer):
     actBossRebornInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_BossReborn, {})
     state = actBossRebornInfo.get(ShareDefine.ActKey_State, 0)
-    if not state:
+    cfgID = actBossRebornInfo.get(ShareDefine.ActKey_CfgID, 0)
+    if not state or not cfgID:
         return
-    actBossIpyData = IpyGameDataPY.GetIpyGameData("ActBossReborn", actBossRebornInfo.get(ShareDefine.ActKey_CfgID, 0))
+    actBossIpyData = IpyGameDataPY.GetIpyGameData("ActBossReborn", cfgID)
     if not actBossIpyData:
         return
     templateID = actBossIpyData.GetTemplateID()
@@ -225,6 +228,7 @@
     actInfo.Clear()
     actInfo.StartDate = actBossIpyData.GetStartDate()
     actInfo.EndtDate = actBossIpyData.GetEndDate()
+    actInfo.ResetType = actBossIpyData.GetResetType()
     actInfo.LimitLV = actBossIpyData.GetLVLimit()
     actInfo.TaskInfo = []
     for ipyData in ipyDataList:

--
Gitblit v1.8.0