| | |
| | | import NetPackCommon
|
| | | import GameWorld
|
| | | import ChConfig
|
| | | import CommFunc
|
| | |
|
| | | Max_ActDays = 7 # 支持最大活动持续天
|
| | |
|
| | |
| | | if awardRecord & pow(2, awardIndex):
|
| | | continue
|
| | |
|
| | | needRechargeValue = ipyData.GetNeedRecharge()
|
| | | needRechargeValue = CommFunc.RMBToCoin(ipyData.GetNeedRMB())
|
| | | needDays = ipyData.GetNeedDays()
|
| | | finishDays = 0
|
| | | for dayIndex in xrange(Max_ActDays):
|
| | |
| | |
|
| | | batchPlayerIDList.append([playerID])
|
| | | batchAddItemList.append(awardItemList)
|
| | | batchParamList.append([needDays, needRechargeValue])
|
| | | batchParamList.append([needDays, str(ipyData.GetNeedRMB())])
|
| | | GameWorld.Log("多日连充活动补发奖励! actNum=%s,playerTemplateID=%s,awardIndex=%s" % (actNum, playerTemplateID, awardIndex))
|
| | |
|
| | | if batchPlayerIDList:
|
| | |
| | | GameWorld.DebugLog("找不到该多日连充活动档位索引奖励!actNum=%s,templateID=%s,awardIndex=%s" % (actNum, templateID, awardIndex), playerID)
|
| | | return
|
| | |
|
| | | needRechargeValue = awardIpyData.GetNeedRecharge()
|
| | | needRechargeValue = CommFunc.RMBToCoin(awardIpyData.GetNeedRMB())
|
| | | needDays = awardIpyData.GetNeedDays()
|
| | |
|
| | | dayRechargeValueDict = {}
|
| | |
| | | GameWorld.DebugLog(" 领取成功! actNum=%s,templateID=%s,awardIndex=%s,needRechargeValue=%s,needDays=%s %s"
|
| | | % (actNum, templateID, awardIndex, needRechargeValue, needDays, dayRechargeValueDict))
|
| | | if notifyKey:
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), needDays, needRechargeValue])
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), needDays, str(awardIpyData.GetNeedRMB())])
|
| | |
|
| | | for itemID, itemCount, isAuctionItem in awardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
|
| | |
| | | for awardIpyData in ipyDataList:
|
| | | awardInfo = ChPyNetSendPack.tagMCActManyDayRechargeAward()
|
| | | awardInfo.AwardIndex = awardIpyData.GetAwardIndex()
|
| | | awardInfo.NeedRecharge = awardIpyData.GetNeedRecharge()
|
| | | awardInfo.NeedRecharge = CommFunc.RMBToCoin(awardIpyData.GetNeedRMB())
|
| | | awardInfo.NeedDays = awardIpyData.GetNeedDays()
|
| | | awardInfo.AwardItemList = []
|
| | | awardItemList = GameWorld.GetDictValueByRangeKey(awardIpyData.GetAwardItemInfo(), actWorldLV, [])
|