| | |
| | | import ChPyNetSendPack
|
| | | import ItemControler
|
| | | import PlayerControl
|
| | | import PlayerGubao
|
| | | import PlayerMail
|
| | | import ChConfig
|
| | |
|
| | |
| | | addMax += addCnt
|
| | | return addMax
|
| | |
|
| | | def GetTreeEnergyAdd(curPlayer):
|
| | | ## 祝福树能量额外上限
|
| | | addMax = 0
|
| | | arenaCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 4, {})
|
| | | for investType, addCnt in arenaCntDict.items():
|
| | | if not GetInvestState(curPlayer, int(investType)):
|
| | | continue
|
| | | addMax += addCnt
|
| | | return addMax
|
| | |
|
| | | def GetTravelEnergyAdd(curPlayer):
|
| | | ## 游历体力增加上限
|
| | | addMax = 0
|
| | | addDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 5, {})
|
| | | for investType, addValue in addDict.items():
|
| | | if not GetInvestState(curPlayer, int(investType)):
|
| | | continue
|
| | | addMax += addValue
|
| | | return addMax
|
| | |
|
| | | #// A5 41 领取投资理财回报 #tagCMGetInvestReward
|
| | | #
|
| | | #struct tagCMGetInvestReward
|
| | |
| | |
|
| | | dayAwardDict = IpyGameDataPY.GetFuncEvalCfg("InvestDay", 3, {})
|
| | | if str(investType) in dayAwardDict:
|
| | | rewardItemList = dayAwardDict[str(investType)]
|
| | | rewardItemList += dayAwardDict[str(investType)]
|
| | |
|
| | | if not rewardItemList:
|
| | | return
|
| | |
|
| | | exItemGubaoPowerDict = {ChConfig.InvestType_Month:PlayerGubao.GubaoPowerType_InvestMonthAwardPer,
|
| | | ChConfig.InvestType_Life:PlayerGubao.GubaoPowerType_InvestLifeAwardPer}
|
| | | if investType in exItemGubaoPowerDict:
|
| | | gubaoPowerType = exItemGubaoPowerDict[investType]
|
| | | # 古宝月卡奖励双倍特权
|
| | | exItemList = []
|
| | | gubaoExSign = 10 # 标记古宝额外奖励
|
| | | for itemInfo in rewardItemList:
|
| | | itemID, itemCount = itemInfo[:2]
|
| | | addPer = PlayerGubao.GetGubaoPowerValue(curPlayer, gubaoPowerType, itemID)
|
| | | if not addPer:
|
| | | continue
|
| | | countEx = int(itemCount * addPer / 100.0)
|
| | | if not countEx:
|
| | | continue
|
| | | exItemList.append([itemID, countEx, gubaoExSign])
|
| | | if exItemList:
|
| | | rewardItemList += exItemList
|
| | | |
| | | if rewardIndex == 0:
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestRewardTime % (investType), int(time.time()))
|
| | | GameWorld.DebugLog("更新领奖:investType=%s,rewardItemList=%s" % (investType, rewardItemList))
|