xdh
2019-07-17 fd94cf4a58cb44cc2c34e711a2d48a3ec60789ff
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -30,6 +30,7 @@
import PlayerFamilyRedPacket
import time
import re
## 获取投资理财玩家数据库字典信息值
@@ -56,6 +57,7 @@
#  @return
def OnLogin(curPlayer):
    CheckOldInvestMail(curPlayer)
    __CheckInvestReset(curPlayer)
    for iType in ChConfig.GoldInvestTypeList:
        Sync_GoldInvestInfo(curPlayer, iType)
    return
@@ -82,7 +84,7 @@
    for investType in ChConfig.CanRepeatInvestType:
        investGoldRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_GoldInvest_Gold % investType)
        if not investGoldRecord:
            return
            continue
        curDay = __GetInvestCurDay(curPlayer, investType)
        investMaxDayDict = IpyGameDataPY.GetFuncEvalCfg('InvestMaxDay')
        maxDay = investMaxDayDict.get(str(investType), 0)
@@ -297,10 +299,10 @@
        PlayerControl.WorldNotify(0, 'VIPInvestmentRadio', [curPlayer.GetName()])
    elif investType in ChConfig.InvestGoldTypeList:
        PlayerControl.WorldNotify(0, 'JadeInvestmentRadio', [curPlayer.GetName(), investGold])
    elif investType == ChConfig.GoldInvestType_NewMonth:
        PlayerControl.WorldNotify(0, 'MonthInvestment', [curPlayer.GetName()])
    elif investType == ChConfig.GoldInvestType_Week:
        PlayerControl.WorldNotify(0, 'WeekInPInvestment', [curPlayer.GetName()])
#    elif investType == ChConfig.GoldInvestType_NewMonth:
#        PlayerControl.WorldNotify(0, 'MonthInvestment', [curPlayer.GetName(), __GetTotalGetGold(investType)])
    elif investType == ChConfig.GoldInvestType_Month1:
        PlayerControl.WorldNotify(0, 'WeekInPInvestment', [curPlayer.GetName(), __GetTotalGetGold(investType)])
        
    # 更新投资时时间,投资金额,重置回报记录
    curTime = GameWorld.GetCurrentTime()
@@ -325,7 +327,22 @@
    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
#