| | |
| | | import PlayerFamilyRedPacket
|
| | |
|
| | | import time
|
| | | import re
|
| | |
|
| | |
|
| | | ## 获取投资理财玩家数据库字典信息值
|
| | |
| | | elif investType in ChConfig.InvestGoldTypeList:
|
| | | PlayerControl.WorldNotify(0, 'JadeInvestmentRadio', [curPlayer.GetName(), investGold])
|
| | | elif investType == ChConfig.GoldInvestType_NewMonth:
|
| | | PlayerControl.WorldNotify(0, 'MonthInvestment', [curPlayer.GetName()])
|
| | | PlayerControl.WorldNotify(0, 'MonthInvestment', [curPlayer.GetName(), __GetTotalGetGold(investType)])
|
| | | elif investType == ChConfig.GoldInvestType_Month1:
|
| | | PlayerControl.WorldNotify(0, 'WeekInPInvestment', [curPlayer.GetName()])
|
| | | PlayerControl.WorldNotify(0, 'WeekInPInvestment', [curPlayer.GetName(), __GetTotalGetGold(investType)])
|
| | |
|
| | | # 更新投资时时间,投资金额,重置回报记录
|
| | | curTime = GameWorld.GetCurrentTime()
|
| | |
| | | GameWorld.DebugLog(" 投资成功!扣除钻石=%s" % deductGold)
|
| | | return
|
| | |
|
| | |
|
| | | def __GetTotalGetGold(investType):
|
| | | investMaxDayDict = IpyGameDataPY.GetFuncEvalCfg('InvestMaxDay')
|
| | | newMaxDay = investMaxDayDict.get(str(investType), 0)
|
| | | newTotalGold = 0
|
| | | for day in xrange(1, newMaxDay+1): |
| | | ipyData = IpyGameDataPY.GetIpyGameData('Invest', investType*100+day)
|
| | | if not ipyData:
|
| | | continue
|
| | | rewardDict = ipyData.GetReward()
|
| | | awardData = 1 #__GetPDictValue(curPlayer, ChConfig.Def_PDict_GoldInvest_AwardData % newInvestType, 1)
|
| | | if str(awardData) not in rewardDict:
|
| | | continue
|
| | | rewardList = rewardDict[str(awardData)]
|
| | | gold = rewardList[0][1]
|
| | | newTotalGold+=gold
|
| | | return newTotalGold
|
| | |
|
| | | #// A5 41 领取投资理财回报 #tagCMGetInvestReward
|
| | | #
|