|  |  |  | 
|---|
|  |  |  | 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: | 
|---|
|  |  |  | 
|---|
|  |  |  | % (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: | 
|---|
|  |  |  | 
|---|
|  |  |  | return True | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | def __SendBossRebornMail(curPlayer, playerTemplateID): | 
|---|
|  |  |  | def __SendBossRebornMail(curPlayer, playerTemplateID, playerWorldLV): | 
|---|
|  |  |  | # 未领取的奖励邮件发放 | 
|---|
|  |  |  | ipyDataList = IpyGameDataPY.GetIpyGameDataByCondition("BossReborn", {'TemplateID':playerTemplateID}, True) | 
|---|
|  |  |  | if not ipyDataList: | 
|---|
|  |  |  | 
|---|
|  |  |  | canGotCnt = (curTimes - gotTimes) / singleTimes | 
|---|
|  |  |  | if not canGotCnt: | 
|---|
|  |  |  | continue | 
|---|
|  |  |  | itemDict = __GetAwardItem(curPlayer, ipyData, canGotCnt) | 
|---|
|  |  |  | itemDict = __GetAwardItem(curPlayer, ipyData, playerWorldLV, canGotCnt) | 
|---|
|  |  |  | GameWorld.AddDictValue(totalItemDict, itemDict) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #去掉复活点道具 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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) | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 | 
|---|
|  |  |  | 
|---|
|  |  |  | 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() | 
|---|
|  |  |  | 
|---|
|  |  |  | 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 | 
|---|