10284 【后端】 仙宝奇缘新版本-倒贴版本(增加时效代币; 增加终身卡特权;)
12个文件已修改
183 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py 59 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -1150,7 +1150,9 @@
CDBPlayerRefresh_HorsePetTrainScore, # 骑宠养成积分 265
CDBPlayerRefresh_GubaoTrainScore, # 古宝养成积分 266
CDBPlayerRefresh_TiandaoFruit, # 天道果 267
) = range(146, 268)
CDBPlayerRefresh_Tuijinbi, # 推金币 268
CDBPlayerRefresh_PayCoinDay, # 代币时效 269
) = range(146, 270)
TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1186,6 +1188,7 @@
TYPE_Price_HorsePetTrainScore = 45    # 骑宠养成积分
TYPE_Price_GubaoTrainScore = 46    # 古宝养成积分
TYPE_Price_TiandaoFruit = 47    # 天道果
TYPE_Price_PayCoinDay = 98    # 代币时效,每日过天重置
TYPE_Price_PayCoin = 99    # 代币
#key可用于遍历所有货币,value仅GM相关会用到
@@ -1193,7 +1196,8 @@
                 1:"仙玉", 2:"绑玉", 3:"铜钱", 6:"战盟贡献度", 10:"战盟仓库积分", 13:"境界修行点", 14:"符印融合石", 15:"仙盟活跃令", 
                 16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘", 
                 29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值", 33:"GM令", 34:"古神币", 35:"功德点", 
                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 47:"天道果", 99:"代币"
                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 47:"天道果",
                 98:"代币时效", 99:"代币"
                 }
#需要记录累计消耗的货币类型
@@ -1233,6 +1237,7 @@
                           TYPE_Price_HorsePetTrainScore:CDBPlayerRefresh_HorsePetTrainScore,
                           TYPE_Price_GubaoTrainScore:CDBPlayerRefresh_GubaoTrainScore,
                           TYPE_Price_TiandaoFruit:CDBPlayerRefresh_TiandaoFruit,
                           TYPE_Price_PayCoinDay:CDBPlayerRefresh_PayCoinDay,
                           }
# 支持负值的货币及对应0418刷新类型
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/ClearInvest.py
@@ -32,12 +32,22 @@
    if not msgList:
        GameWorld.DebugAnswer(curPlayer, "重置所有投资: ClearInvest 0")
        GameWorld.DebugAnswer(curPlayer, "重置指定投资: ClearInvest 类型")
        GameWorld.DebugAnswer(curPlayer, "激活指定投资: ClearInvest A 类型")
        GameWorld.DebugAnswer(curPlayer, "类型:7-永久卡;8-周卡;9-登录卡;10-等级卡;11-boss卡;;12-终身卡;")
        return
    
    investType = msgList[0]
    if not investType:
        investTypeList = ChConfig.InvestTypeList
    elif investType == "A":
        investType = msgList[1] if len(msgList) > 1 else 0
        if investType not in ChConfig.InvestTypeList:
            GameWorld.DebugAnswer(curPlayer, "不存在该投资类型!")
            return
        PlayerGoldInvest.__DoLogicInvest(curPlayer, investType)
        GameWorld.DebugAnswer(curPlayer, "激活投资: %s" % investType)
        return
    elif investType not in ChConfig.InvestTypeList:
        GameWorld.DebugAnswer(curPlayer, "不存在该投资类型!")
        return
@@ -50,6 +60,6 @@
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestReward % (itype, keyNum), 0)
            PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_InvestProgress % (itype, keyNum), 0)
        PlayerGoldInvest.Sync_InvestInfo(curPlayer, itype)
    PlayerControl.Sync_ExpRateChange(curPlayer)
    return
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GM/Commands/SetMoney.py
@@ -73,6 +73,8 @@
        return
    isOK = False
    playerMoney = PlayerControl.GetMoneyReal(curPlayer, moneyType)
    if moneyType == ShareDefine.TYPE_Price_PayCoin:
        playerMoney = PlayerControl.GetPayCoinTotal(curPlayer)
    if playerMoney > moneyCount:
        isOK = PlayerControl.PayMoney(curPlayer, moneyType, playerMoney - moneyCount, ChConfig.Def_Cost_GM, {ChConfig.Def_Cost_Reason_SonKey:"SetMoney"}, isMinus=True)
    elif playerMoney < moneyCount:
@@ -81,6 +83,8 @@
        isOK = True
    if not isOK:
        GameWorld.DebugAnswer(curPlayer, "设置玩家货币失败,详见日志或流向")
    else:
        GameWorld.DebugAnswer(curPlayer, "设置%s%s=%s" % (moneyType, moneyNameDict.get(moneyType, moneyType), PlayerControl.GetMoneyReal(curPlayer, moneyType)))
        
    return
        
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/GameWorldLogic/FBProcess/FBCommon.py
@@ -1973,11 +1973,15 @@
    ipyData = GetFBIpyData(mapID)
    if not ipyData:
        return
    canBuyCnt = 0
    buyTimesVIPPriID = ipyData.GetBuyTimesVIPPriID()
    if not buyTimesVIPPriID:
    if buyTimesVIPPriID:
        canBuyCnt += PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID)
    canBuyCnt += PlayerGoldInvest.GetAddFBBuyCnt(curPlayer, mapID)
    GameWorld.DebugLog("购买副本进入次数: mapID=%s,canBuyCnt=%s" % (mapID, canBuyCnt))
    if canBuyCnt <= 0:
        GameWorld.DebugLog("mapID:%s 不可以购买进入次数"%mapID)
        return
    canBuyCnt = PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID)
    
    hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_BuyFbCntDay % mapID)
    maxDayTimes = ipyData.GetDayTimes()
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -6361,6 +6361,7 @@
    if not buyTimesVIPPriID:
        return
    canBuyCnt = PlayerVip.GetPrivilegeValue(curPlayer, buyTimesVIPPriID)
    canBuyCnt += PlayerGoldInvest.GetAddBossBuyCnt(curPlayer, killBossMark)
    hasBuyCnt = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_Boss_KillCntBuyCnt%killBossMark, 0)
    playerID = curPlayer.GetPlayerID()
    if hasBuyCnt >= canBuyCnt:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -461,8 +461,8 @@
                    return
        #直接扣,类似充值扣钱,这里是发放物品,可能会有发放失败的当做 CTGError 处理
        if not PlayerControl.PayMoney(curPlayer, ShareDefine.TYPE_Price_PayCoin, orderCoin, eventName, {ChConfig.Def_Cost_Reason_SonKey:orderInfo, "orderInfo":orderInfo}):
            GameWorld.ErrLog("代币不足! appID=%s,orderInfo=%s,orderCoin=%s,curPayCoin=%s"
                             % (appID, orderInfo, orderCoin, PlayerControl.GetPayCoin(curPlayer)), curPlayer.GetPlayerID())
            GameWorld.ErrLog("代币不足! appID=%s,orderInfo=%s,orderCoin=%s,curPayCoinTotal=%s"
                             % (appID, orderInfo, orderCoin, PlayerControl.GetPayCoinTotal(curPlayer)), curPlayer.GetPlayerID())
            return
        
    addDRDict["payOrderType"] = payOrderType
@@ -584,12 +584,15 @@
    giveItemList += GetCTGGiveItemList(ipyData)
    giveItemList += selectItemList
    
    payType = ipyData.GetPayType()
    moneyType = ipyData.GetMoneyType() # 获得货币类型
    addGold = ipyData.GetGainGold() # 获得货币数
    gainGoldPrize = ipyData.GetGainGoldPrize() # 赠送货币数,首次充值赠送仙玉时,此仙玉不给
    firstGoldPrize = ipyData.GetFirstGoldPrize() # 首次充值赠送的仙玉
    prizeGold = firstGoldPrize if (not totalBuyCount and firstGoldPrize) else gainGoldPrize
    if moneyType == IPY_GameWorld.TYPE_Price_Gold_Money:
        if payType in [PayType_Gold, PayType_GoldPlus] and PlayerGoldInvest.GetInvestState(curPlayer, ChConfig.InvestType_Life):
            prizeGold = addGold # bt tqxbqy 版本,永久卡仙玉直充固定双倍
        actPrizeGold = PlayerActRechargePrize.DoAddPlayerActRechargePrizeCount(curPlayer, recordID)
        if actPrizeGold:
            prizeGold += actPrizeGold
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerControl.py
@@ -88,6 +88,7 @@
import PlayerTongTianLing
import PlayerCrossRealmPK
import FunctionNPCCommon
import PlayerGoldInvest
import IPY_PlayerDefine
import CrossRealmPlayer
import CrossPlayerData
@@ -3081,7 +3082,7 @@
        
    #代币支付
    elif TYPE_Price == ShareDefine.TYPE_Price_PayCoin:
        needMoneyCount = GetPayCoin(curPlayer)
        needMoneyCount = GetPayCoinTotal(curPlayer)
        
    #自定义货币
    elif TYPE_Price in ShareDefine.TYPE_Price_CurrencyDict:
@@ -3245,10 +3246,21 @@
    #代币支付
    elif type_Price == ShareDefine.TYPE_Price_PayCoin:
        curPlayerPayCoin = GetPayCoin(curPlayer)
        if curPlayerPayCoin < price:
        curPayCoinDay = GetPlayerCurrency(curPlayer, ShareDefine.TYPE_Price_PayCoinDay)
        payCoinTotal = curPlayerPayCoin + curPayCoinDay
        if payCoinTotal < price:
            return False
        #有足够的钱支付
        SetPayCoin(curPlayer, curPlayerPayCoin - price)
        costPayCoinDay = price if (curPayCoinDay >= price) else curPayCoinDay
        costPayCoin = price
        if costPayCoinDay:
            GameWorld.DebugLog("先扣代币时效: curPayCoinDay=%s,price=%s,costPayCoinDay=%s" % (curPayCoinDay, price, costPayCoinDay))
            SetPlayerCurrency(curPlayer, ShareDefine.TYPE_Price_PayCoinDay, curPayCoinDay - costPayCoinDay)
            costPayCoin -= costPayCoinDay
            GameWorld.DebugLog("再扣代币: costPayCoin=%s" % (costPayCoin))
        #时效不够扣除,再扣非时效
        if costPayCoin > 0:
            SetPayCoin(curPlayer, curPlayerPayCoin - costPayCoin)
        
    #自定义货币
    elif type_Price in ShareDefine.TYPE_Price_CurrencyDict:
@@ -3345,17 +3357,19 @@
        and costType == ChConfig.Def_Cost_Unknown:
        #GameWorld.DebugLog("该货币没有指定消费类型不记录!type_Price=%s,costType=%s" % (type_Price, costType))
        return
    if type_Price == ShareDefine.TYPE_Price_PayCoin:
        playerID = curPlayer.GetPlayerID()
        nowMoney = GetMoneyReal(curPlayer, type_Price)
        payCoinDay = GetMoney(curPlayer, ShareDefine.TYPE_Price_PayCoinDay)
        infoDict["PlayerMoneyCount2"] = payCoinDay
        orderInfo = infoDict.get("orderInfo", "")
        GameWorld.Log("记录消耗代币: eventName=%s,price=%s,nowMoney=%s,payCoinDay=%s,orderInfo=%s" % (eventName, price, nowMoney, payCoinDay, orderInfo), playerID)
        GameWorld.AddPlayerRec(playerID, ShareDefine.Def_PlayerRecType_PayCoin, [2, price, nowMoney, payCoinDay], orderInfo, 1)
    # 流向用 eventName
    #if eventName:
    DataRecordPack.DR_UseMoney(curPlayer, eventName, type_Price, price, infoDict) # 流向
    EventReport.WriteEvent_virtual_resource(curPlayer, type_Price, reason_name, quantity,
                                            unitPrice, ShareDefine.Def_UserAction_Money_Use, infoDict)
    if type_Price == ShareDefine.TYPE_Price_PayCoin:
        playerID = curPlayer.GetPlayerID()
        nowMoney = GetMoneyReal(curPlayer, type_Price)
        orderInfo = infoDict.get("orderInfo", "")
        GameWorld.Log("记录消耗代币: eventName=%s,price=%s,nowMoney=%s,orderInfo=%s" % (eventName, price, nowMoney, orderInfo), playerID)
        GameWorld.AddPlayerRec(playerID, ShareDefine.Def_PlayerRecType_PayCoin, [2, price, nowMoney], orderInfo, 1)
    #===========================================================================
    # if type_Price == IPY_GameWorld.TYPE_Price_Gold_Money:
    #    EventReport.WriteEvent_virtual_cost(curPlayer, quantity, unitPrice, reason_name)
@@ -3544,6 +3558,10 @@
        DataRecordPack.DR_GiveMoneyError(curPlayer, priceType, value, giveType, addDataDict)
        return
    
    # 时效代币后续处理均视为代币,包含系统提示、记录、流向等
    if priceType == ShareDefine.TYPE_Price_PayCoinDay:
        priceType = ShareDefine.TYPE_Price_PayCoin
    if isSysHint and priceType != ShareDefine.TYPE_Price_BourseMoney:
        #通知客户端得到金钱
        NotifyCode(curPlayer, "GetMoney", [priceType, value])
@@ -3566,16 +3584,19 @@
        eventName = ChConfig.Def_GetType_Dict[giveType]
        addDataDict["eventName"] = eventName
        
    if priceType == ShareDefine.TYPE_Price_PayCoin:
        playerID = curPlayer.GetPlayerID()
        nowMoney = GetMoneyReal(curPlayer, priceType)
        payCoinDay = GetMoney(curPlayer, ShareDefine.TYPE_Price_PayCoinDay)
        addDataDict["PlayerMoneyCount2"] = payCoinDay
        orderInfo = addDataDict.get("orderInfo", "")
        GameWorld.Log("记录获得代币: eventName=%s,value=%s,nowMoney=%s,payCoinDay=%s,orderInfo=%s" % (eventName, value, nowMoney, payCoinDay, orderInfo), playerID)
        GameWorld.AddPlayerRec(playerID, ShareDefine.Def_PlayerRecType_PayCoin, [1, value, nowMoney, payCoinDay], orderInfo, 1)
    DataRecordPack.DR_GiveMoney(curPlayer, eventName, priceType, value, addDataDict)
    EventReport.WriteEvent_virtual_resource(curPlayer, priceType, giveType, 1, value,
                                            ShareDefine.Def_UserAction_Money_Get, addDataDict)
    
    if priceType == ShareDefine.TYPE_Price_PayCoin:
        playerID = curPlayer.GetPlayerID()
        nowMoney = GetMoneyReal(curPlayer, priceType)
        orderInfo = addDataDict.get("orderInfo", "")
        GameWorld.Log("记录获得代币: eventName=%s,value=%s,nowMoney=%s,orderInfo=%s" % (eventName, value, nowMoney, orderInfo), playerID)
        GameWorld.AddPlayerRec(playerID, ShareDefine.Def_PlayerRecType_PayCoin, [1, value, nowMoney], orderInfo, 1)
#===============================================================================
#    reason_name = "Unknown" if not giveType else giveType
#    eventName = reason_name
@@ -6216,6 +6237,7 @@
    fightExpRate = curPlayer.GetFightExpRate() # 系统及功能累加
    fightExpRate += PlayerWorldAverageLv.GetWorldAverageLvExpRate(curPlayer) # 世界等级
    fightExpRate += PlayerVip.GetPrivilegeValue(curPlayer, ChConfig.VIPPrivilege_FightExpRate) # VIP加成
    fightExpRate += PlayerGoldInvest.GetAddFightExpRate(curPlayer)
    
    actExpRateInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_ExpRate, {})# 多倍经验活动加成
    if not PlayerTJG.GetIsTJG(curPlayer) and actExpRateInfo.get(ShareDefine.ActKey_State):
@@ -6433,8 +6455,15 @@
def SetChatBubbleBox(curPlayer, value): return curPlayer.SetExAttr10(value, False, True)
##游戏充值支付代币
def GetPayCoinTotal(curPlayer): return GetPayCoin(curPlayer) + GetPlayerCurrency(curPlayer, ShareDefine.TYPE_Price_PayCoinDay)
def GetPayCoin(curPlayer): return curPlayer.GetExAttr11()
def SetPayCoin(curPlayer, value): return curPlayer.SetExAttr11(min(value, ChConfig.Def_UpperLimit_DWord), False, False)
def PayCoinOnDay(curPlayer):
    # 每日过天清除时效代币
    payCoinDay = GetPlayerCurrency(curPlayer, ShareDefine.TYPE_Price_PayCoinDay)
    if payCoinDay > 0:
        PayMoney(curPlayer, ShareDefine.TYPE_Price_PayCoin, payCoinDay, "PayCoinOnDay")
    return
## 获取佩戴的称号ID
def GetTitleID(curPlayer):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -564,6 +564,7 @@
        PlayerLove.DoPlayerOnDay(curPlayer)
        #仙宫
        PlayerXiangong.PlayerOnDay(curPlayer)
        PlayerControl.PayCoinOnDay(curPlayer)
        #玩法前瞻奖励
        gameNoticeAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GameNoticeAwardState)
        if gameNoticeAwardState:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerGoldInvest.py
@@ -28,45 +28,8 @@
import time
def __TransferPlayerInvestDBKey(curPlayer):
    ## 转换玩家存储字典,换key名
    # 旧版key
    # 投资理财 Def_PDictType_GoldInvest
    Def_PDict_GoldInvest_Time = "Invest_Time_%s"  # 投资时的时间,参数为投资类型
    #Def_PDict_GoldInvest_Gold = "Invest_Gold_%s"  # 投资的额度,参数为投资类型                                             标记是否已投资,可用投资时间即可,不处理
    #Def_PDict_GoldInvest_AwardData = "Invest_AwardData_%s"  # 投资时的数据,参数为投资类型                                 默认1,无用,可不管
    Def_PDict_GoldInvest_GotRewardValue = "Invest_GotRewardValue_%s_%s"  # 等级回报已领取数值,参数为投资类型 索引
    playerID = curPlayer.GetPlayerID()
    for investType in [ChConfig.InvestType_NewMonth, ChConfig.InvestType_Month1]:
        investTimeKeyOld = Def_PDict_GoldInvest_Time % investType
        investTime = curPlayer.NomalDictGetProperty(investTimeKeyOld, 0, ChConfig.Def_PDictType_GoldInvest)
        if not investTime:
            continue
        investTimeKeyNew = ChConfig.Def_PDict_InvestTime % investType
        PlayerControl.NomalDictSetProperty(curPlayer, investTimeKeyNew, investTime)
        PlayerControl.NomalDictSetProperty(curPlayer, investTimeKeyOld, 0, ChConfig.Def_PDictType_GoldInvest)
        GameWorld.Log("转换投资key: investType=%s,investTimeKeyNew=%s,investTime=%s,investTimeKeyOld=%s"
                      % (investType, investTimeKeyNew, investTime, investTimeKeyOld), playerID)
        maxDay = __GetInvestMaxDays(investType)
        for i in xrange(1, maxDay + 1):
            rewardKeyOld = Def_PDict_GoldInvest_GotRewardValue % (investType, i)
            reward = curPlayer.NomalDictGetProperty(rewardKeyOld, 0, ChConfig.Def_PDictType_GoldInvest)
            if not reward:
                continue
            GameWorld.SetDictValueByBit(curPlayer, ChConfig.Def_PDict_InvestReward, i, 1, True, [investType])
            PlayerControl.NomalDictSetProperty(curPlayer, rewardKeyOld, 0, ChConfig.Def_PDictType_GoldInvest)
            GameWorld.Log("    转换投资已领取记录: i=%s,rewardKeyOld=%s" % (i, rewardKeyOld), playerID)
    return
## 登录
def OnLogin(curPlayer):
    __TransferPlayerInvestDBKey(curPlayer)
    for investType in ChConfig.InvestTypeList:
        if not curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_InvestTime % investType):
            continue
@@ -204,6 +167,7 @@
    
    GameWorld.DebugLog("投资理财成功: investType=%s" % (investType))
    Sync_InvestInfo(curPlayer, investType)
    PlayerControl.Sync_ExpRateChange(curPlayer)
    return
def __GetTotalGetGold(investType):
@@ -239,6 +203,31 @@
        addFBCnt += lifeCardAddCnt
    return addFBCnt
def GetAddBossBuyCnt(curPlayer, bossFuncIndex):
    ## 获取增加的boss购买次数上限
    addBossBuyCnt = 0
    if GetInvestState(curPlayer, ChConfig.InvestType_Life):
        lifeCardAddBossCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 4, {})
        lifeCardAddCnt = lifeCardAddBossCntDict.get(str(bossFuncIndex), 0)
        addBossBuyCnt += lifeCardAddCnt
    return addBossBuyCnt
def GetAddFBBuyCnt(curPlayer, mapID):
    ## 获取增加的副本购买次数上限
    addFBBuyCnt = 0
    if GetInvestState(curPlayer, ChConfig.InvestType_Life):
        lifeCardAddFBCntDict = IpyGameDataPY.GetFuncEvalCfg("InvestPower", 5, {})
        lifeCardAddCnt = lifeCardAddFBCntDict.get(str(mapID), 0)
        addFBBuyCnt += lifeCardAddCnt
    return addFBBuyCnt
def GetAddFightExpRate(curPlayer):
    ## 杀怪经验加成
    fightExpRate = 0
    if GetInvestState(curPlayer, ChConfig.InvestType_Life):
        fightExpRate += IpyGameDataPY.GetFuncCfg("InvestPower2", 1)
    return fightExpRate
def CanQuickFinishMissionFree(curPlayer):
    ## 可否免费快速完成任务
    for investType in IpyGameDataPY.GetFuncEvalCfg("InvestPower", 3):
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GetPlayerInfo.py
@@ -66,7 +66,7 @@
    
    # 需要额外同步的自定义货币
    CurrencyValueDict = {}
    for moneyType in [ShareDefine.TYPE_Price_PayCoin]:
    for moneyType in [ShareDefine.TYPE_Price_PayCoin, ShareDefine.TYPE_Price_PayCoinDay]:
        CurrencyValueDict['PlayerCurrency_%s' % moneyType] = PlayerControl.GetMoneyReal(curPlayer, moneyType)
    playerInfo.update(CurrencyValueDict)
    
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -1150,7 +1150,9 @@
CDBPlayerRefresh_HorsePetTrainScore, # 骑宠养成积分 265
CDBPlayerRefresh_GubaoTrainScore, # 古宝养成积分 266
CDBPlayerRefresh_TiandaoFruit, # 天道果 267
) = range(146, 268)
CDBPlayerRefresh_Tuijinbi, # 推金币 268
CDBPlayerRefresh_PayCoinDay, # 代币时效 269
) = range(146, 270)
TYPE_Price_Gold_Paper_Money = 5    # 金钱类型,(先用礼券,再用金子)
TYPE_Price_Family_Contribution = 6 # 战盟贡献度(活跃度转换得来)
@@ -1186,6 +1188,7 @@
TYPE_Price_HorsePetTrainScore = 45    # 骑宠养成积分
TYPE_Price_GubaoTrainScore = 46    # 古宝养成积分
TYPE_Price_TiandaoFruit = 47    # 天道果
TYPE_Price_PayCoinDay = 98    # 代币时效,每日过天重置
TYPE_Price_PayCoin = 99    # 代币
#key可用于遍历所有货币,value仅GM相关会用到
@@ -1193,7 +1196,8 @@
                 1:"仙玉", 2:"绑玉", 3:"铜钱", 6:"战盟贡献度", 10:"战盟仓库积分", 13:"境界修行点", 14:"符印融合石", 15:"仙盟活跃令", 
                 16:"助战积分", 18:"荣誉", 19:"Boss积分", 23:"符印精华", 24:"符印碎片", 25:"寻宝积分", 26:"集市额度", 27:"丹精", 28:"魂尘", 
                 29:"聚魂碎片", 30:"核心环", 31:"功能特权令", 32:"环保值", 33:"GM令", 34:"古神币", 35:"功德点", 
                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 47:"天道果", 99:"代币"
                 39:"成就积分", 40:"万界积分", 43:"凭证积分", 44:"聚魂精华", 45:"骑宠养成积分", 46:"古宝养成积分", 47:"天道果",
                 98:"代币时效", 99:"代币"
                 }
#需要记录累计消耗的货币类型
@@ -1233,6 +1237,7 @@
                           TYPE_Price_HorsePetTrainScore:CDBPlayerRefresh_HorsePetTrainScore,
                           TYPE_Price_GubaoTrainScore:CDBPlayerRefresh_GubaoTrainScore,
                           TYPE_Price_TiandaoFruit:CDBPlayerRefresh_TiandaoFruit,
                           TYPE_Price_PayCoinDay:CDBPlayerRefresh_PayCoinDay,
                           }
# 支持负值的货币及对应0418刷新类型
ServerPython/db/PyMongoDataServer/GMToolLogicProcess/Commands/GMT_GetPlayerInfo.py
@@ -154,8 +154,12 @@
    
    # 需要额外同步的自定义货币
    CurrencyValueDict = {}
    for moneyType in [99]:
        CurrencyValueDict['PlayerCurrency_%s' % moneyType] = roleDict.get("PlayerCurrency_%s" % moneyType, 0)
    for moneyType in [99, 98]:
        if moneyType == 99:
            moneyValue = dbPlayer.ExAttr11
        else:
            moneyValue = roleDict.get("PlayerCurrency_%s" % moneyType, 0)
        CurrencyValueDict['PlayerCurrency_%s' % moneyType] = moneyValue
    playerInfo.update(CurrencyValueDict)
    return GMCommon.Def_Success, playerInfo