| | |
| | | import ItemCommon
|
| | | import GameWorld
|
| | | import ChConfig
|
| | | import CommFunc
|
| | |
|
| | | def GetTemplateID(cfgID, dayIndex, actNum):
|
| | | if cfgID == None or dayIndex == None:
|
| | |
| | | if awardRecord & pow(2, awardIndex):
|
| | | continue
|
| | |
|
| | | needGold = ipyData.GetNeedGold()
|
| | | needGold = CommFunc.RMBToCoin(ipyData.GetNeedGold())
|
| | | if curRechargeGold < needGold:
|
| | | continue
|
| | | awardRecord |= pow(2, awardIndex)
|
| | |
| | | awardItemList = __GetItemList(ipyData.GetAwardItem(), job, playerWorldLV)
|
| | | batchPlayerIDList.append([playerID])
|
| | | batchAddItemList.append(awardItemList)
|
| | | batchParamList.append([needGold])
|
| | | batchParamList.append([str(ipyData.GetNeedGold())]) # 钱支持小数,显示参数传字符串
|
| | |
|
| | | if batchPlayerIDList:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeAwardRecord % actNum, awardRecord)
|
| | |
| | | GameWorld.DebugLog("找不到该返利活动档位索引奖励!actNum=%s,templateID=%s,awardIndex=%s" % (actNum, templateID, awardIndex), playerID)
|
| | | return
|
| | |
|
| | | needGold = awardIpyData.GetNeedGold()
|
| | | needGold = CommFunc.RMBToCoin(awardIpyData.GetNeedGold())
|
| | | actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
|
| | | awardItemList = __GetItemList(ipyData.GetAwardItem(), curPlayer.GetJob(), actWorldLV)
|
| | |
|
| | |
| | |
|
| | | notifyKey = awardIpyData.GetNotifyKey()
|
| | | if notifyKey:
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), needGold])
|
| | | PlayerControl.WorldNotify(0, notifyKey, [curPlayer.GetPlayerName(), str(awardIpyData.GetNeedGold())]) # 钱支持小数,显示参数传字符串
|
| | |
|
| | | for itemID, itemCount, _ in awardItemList:
|
| | | ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, 0, [IPY_GameWorld.rptItem])
|
| | |
| | | for ipyData in ipyDataList:
|
| | | awardInfo = ChPyNetSendPack.tagMCTotalRechargeAward()
|
| | | awardInfo.AwardIndex = ipyData.GetAwardIndex()
|
| | | awardInfo.NeedGold = ipyData.GetNeedGold()
|
| | | awardInfo.NeedGold = CommFunc.RMBToCoin(ipyData.GetNeedGold())
|
| | | awardInfo.AwardItem = []
|
| | | awardItemList = __GetItemList(ipyData.GetAwardItem(), job, actWorldLV)
|
| | | for awardItemInfo in awardItemList:
|