hxp
2024-05-28 e990ceeb00e653f95308d0636245c412afd581b2
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -88,6 +88,11 @@
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestProgress % (investType, 0), progressValue)
                GameWorld.DebugLog("更新登录投资可领奖天数进度: %s" % progressValue)
                
        # 终身卡
        elif investType == ChConfig.InvestType_Life:
            for keyNum in range(ChConfig.Def_PDict_InvestKeyCount):
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestReward % (investType, keyNum), 0)
        Sync_InvestInfo(curPlayer, investType)
    return
@@ -175,6 +180,31 @@
                if itemID in [20, 30]: # 单位1的仙玉、灵石
                    totalGold += itemCount
    return totalGold
def GetAddBossCnt(curPlayer, bossFuncIndex):
    ## 获取增加的boss次数上限
    addBossCnt = 0
    if GetInvestState(curPlayer, ChConfig.InvestType_Life):
        lifeCardAddBossCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 1, {})
        lifeCardAddCnt = lifeCardAddBossCntDict.get(str(bossFuncIndex), 0)
        addBossCnt += lifeCardAddCnt
    return addBossCnt
def GetAddFBCnt(curPlayer, mapID):
    ## 获取增加的副本次数上限
    addFBCnt = 0
    if GetInvestState(curPlayer, ChConfig.InvestType_Life):
        lifeCardAddFBCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 2, {})
        lifeCardAddCnt = lifeCardAddFBCntDict.get(str(mapID), 0)
        addFBCnt += lifeCardAddCnt
    return addFBCnt
def CanQuickFinishMissionFree(curPlayer):
    ## 可否免费快速完成任务
    for investType in IpyGameDataPY.GetFuncEvalCfg("InvestPower", 3):
        if GetInvestState(curPlayer, investType):
            return True
    return False
def OnKillBoss(curPlayer, npcID):
    ## 参与击杀boss
@@ -275,6 +305,10 @@
            GameWorld.DebugLog("    Boss投资无参与击杀该boss,无法领取! rewardIndex=%s" % (rewardIndex))
            return
        
    # 终身卡
    elif investType == ChConfig.InvestType_Life:
        pass
    else:
        return