xdh
2019-06-11 fb96193c327bcd8bca652018034f457d7ce6bf9b
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -77,7 +77,7 @@
def __CheckInvestReset(curPlayer):
    ##检查vip投资重置 超过28天或28天奖励已领取可重置
    investType = ChConfig.GoldInvestType_VIP
    for investType in ChConfig.CanRepeatInvestType:
    investGoldRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_GoldInvest_Gold % investType)
    if not investGoldRecord:
        return
@@ -107,8 +107,6 @@
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    investType = clientData.InvestType
    investGold = clientData.InvestGold
    GameWorld.DebugLog("投资理财:investType=%s,investGold=%s" % (investType, investGold))
    investCostDict = IpyGameDataPY.GetFuncEvalCfg('InvestCost')
    if str(investType) not in investCostDict:
        return
@@ -116,10 +114,26 @@
    if investGold not in costList:
        GameWorld.DebugLog('    投资理财 投资额度不存在 investGold=%s, investType=%s'%(investGold, investType))
        return
    awardData = costList.index(investGold) + 1
    if investType == ChConfig.GoldInvestType_VIP:
        awardData = __GetInvestLVData(curPlayer)
    __DoLogicInvest(curPlayer, investType, investGold, awardData)
    return
def InvestByCTG(curPlayer, ctgID):
    ## 充值投资
    ctgInvestDict = IpyGameDataPY.GetFuncEvalCfg('InvestCost', 3, {})
    for investType, ctgIDList in ctgInvestDict.items():
        if ctgID in ctgIDList:
            __DoLogicInvest(curPlayer, int(investType), ctgID, 1)
            GameWorld.Log('投资理财 investType=%s,ctgID=%s'%(investType, ctgID), curPlayer.GetID())
            break
    return
def __DoLogicInvest(curPlayer, investType, investGold, awardData):
    GameWorld.DebugLog("投资理财:investType=%s,investGold=%s, awardData=%s" % (investType, investGold, awardData))
    needVIPLVDict = IpyGameDataPY.GetFuncEvalCfg('InvestCost', 2, {})
    needVIPLV = needVIPLVDict.get(str(investType), 0)
    if curPlayer.GetVIPLv() < needVIPLV:
@@ -128,6 +142,8 @@
    
        
    deductGold = investGold
    if str(investType) in IpyGameDataPY.GetFuncEvalCfg('InvestCost', 3, {}):
        deductGold = 0 #充钱的不用扣仙玉
    investGoldRecord = __GetPDictValue(curPlayer, ChConfig.Def_PDict_GoldInvest_Gold % investType)
    if investGoldRecord:
        curDay = __GetInvestCurDay(curPlayer, investType)