From f3fd1d3c52fc2c3c49254db83a8fba108f3acc8b Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 19 四月 2019 16:12:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 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 fb1100f..0457521 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerBossReborn.py
@@ -67,6 +67,8 @@
     if bossRebornID == playerBossRebornID:
         #GameWorld.DebugLog("BOSS复活活动ID不变,不处理!", curPlayer.GetPlayerID())
         return
+    actWorldLV = actBossRebornInfo.get(ShareDefine.ActKey_WorldLV, 0)
+    playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BRActionWorldLV)
     
     templateID = 0
     if cfgID:
@@ -78,8 +80,8 @@
                        % (bossRebornID, playerBossRebornID, state, templateID, playerTemplateID), playerID)
     
     # 未领取的奖励邮件发放
-    __SendBossRebornMail(curPlayer, playerTemplateID)
-    
+    __SendBossRebornMail(curPlayer, playerTemplateID, playerWorldLV)
+    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BRActionWorldLV, actWorldLV)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BossRebornID, bossRebornID)
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BossRebornTemplateID, templateID)
     for brid in ChConfig.BossRebornActIDList:
@@ -91,7 +93,7 @@
     return True
 
 
-def __SendBossRebornMail(curPlayer, playerTemplateID):
+def __SendBossRebornMail(curPlayer, playerTemplateID, playerWorldLV):
     # 未领取的奖励邮件发放
     ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("BossReborn", {'TemplateID':playerTemplateID}, True)
     if not ipyDataList:
@@ -106,7 +108,7 @@
         canGotCnt = (curTimes - gotTimes) / singleTimes
         if not canGotCnt:
             continue
-        itemDict = __GetAwardItem(curPlayer, ipyData, canGotCnt)
+        itemDict = __GetAwardItem(curPlayer, ipyData, playerWorldLV, canGotCnt)
         GameWorld.AddDictValue(totalItemDict, itemDict)
     
     #去掉复活点道具
@@ -152,9 +154,9 @@
     gotTimes = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BRActionGotTimes % actionID)
     if curTimes - gotTimes < singleTimes:
         return
-    
+    playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_BRActionWorldLV)
     #给奖励
-    awardDict = __GetAwardItem(curPlayer, ipyData)
+    awardDict = __GetAwardItem(curPlayer, ipyData, playerWorldLV)
     # 检查背包
     needSpace = len(awardDict)
     packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
@@ -167,14 +169,16 @@
     #GameWorld.Log('  actionID=%s,curTimes=%s,gotTimes=%s,singleTimes=%s,newGotTimes=%s'%(actionID, curTimes, gotTimes,singleTimes, newGotTimes))
     PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_BRActionGotTimes % actionID, newGotTimes)
     for itemID, itemCnt in awardDict.items():
-        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 1, [IPY_GameWorld.rptItem])
+        ItemControler.GivePlayerItem(curPlayer, itemID, itemCnt, 0, [IPY_GameWorld.rptItem])
     SyncBossRebornPlayerInfo(curPlayer, actionID)
     return
 
 
-def __GetAwardItem(curPlayer, ipyData, times=1):
+def __GetAwardItem(curPlayer, ipyData, worldLV, times=1):
     awardDict = {}
-    for itemID, itemCnt, isbind in ipyData.GetReward():
+
+    awardList = GameWorld.GetDictValueByRangeKey(ipyData.GetReward(), worldLV, [])
+    for itemID, itemCnt, isbind in awardList:
         if not itemID or not itemCnt:
             continue
         awardDict[itemID] = awardDict.get(itemID, 0) + itemCnt * times
@@ -224,10 +228,12 @@
     ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("BossReborn", {'TemplateID':templateID}, True)
     if not ipyDataList:
         return
+    worldLV = actBossRebornInfo.get(ShareDefine.ActKey_WorldLV, 0)
+    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
     actInfo = ChPyNetSendPack.tagMCBossRebornInfo()
     actInfo.Clear()
-    actInfo.StartDate = actBossIpyData.GetStartDate()
-    actInfo.EndtDate = actBossIpyData.GetEndDate()
+    actInfo.StartDate = GameWorld.GetOperationActionDateStr(actBossIpyData.GetStartDate(), openServerDay)
+    actInfo.EndtDate = GameWorld.GetOperationActionDateStr(actBossIpyData.GetEndDate(), openServerDay)
     actInfo.ResetType = actBossIpyData.GetResetType()
     actInfo.LimitLV = actBossIpyData.GetLVLimit()
     actInfo.TaskInfo = []
@@ -237,7 +243,8 @@
         taskInfo.TotalTimes = ipyData.GetTotalTimes()
         taskInfo.SingleTimes = ipyData.GetSingleTimes()
         taskInfo.AwardItem = []
-        for itemID, itemCnt, isBind in ipyData.GetReward():
+        awardList = GameWorld.GetDictValueByRangeKey(ipyData.GetReward(), worldLV, [])
+        for itemID, itemCnt, isBind in awardList:
             awardItem = ChPyNetSendPack.tagMCBossRebornAwardItem()
             awardItem.ItemID = itemID
             awardItem.ItemCount = itemCnt

--
Gitblit v1.8.0