hxp
2024-12-16 d78648ee92862e8d7e9993f658b6906ead62daaf
10345 【英文】推金币优化(红包及超级奖励改为给所有;)
1个文件已修改
22 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py
@@ -174,19 +174,19 @@
    # 红包,直接给奖励
    if drawType == PrizeType_Redpack:
        randMoneyList = IpyGameDataPY.GetFuncEvalCfg("PushCoin", 3)
        randMoney = random.choice(randMoneyList)
        GameWorld.DebugLog("红包直接给: %s" % str(randMoney), playerID)
        if randMoney and len(randMoney) == 2:
            __GiveMoney(curPlayer, randMoney[0], randMoney[1], True)
        GameWorld.DebugLog("红包直接给: %s" % str(randMoneyList), playerID)
        for randMoney in randMoneyList:
            if randMoney and len(randMoney) == 2:
                __GiveMoney(curPlayer, randMoney[0], randMoney[1])
            
    # 超级奖励
    elif drawType == PrizeType_Super:
        randPrizeList = IpyGameDataPY.GetFuncEvalCfg("PushCoin", 2)
        randPrize = random.choice(randPrizeList)
        GameWorld.DebugLog("超级奖励: %s" % str(randPrize), playerID)
        if randPrize and len(randPrize) == 2:
            randPrizeType, randValue = randPrize
            addPoolPrizeInfo[randPrizeType] = addPoolPrizeInfo.get(randPrizeType, 0) + randValue
        GameWorld.DebugLog("超级奖励: %s" % str(randPrizeList), playerID)
        for randPrize in randPrizeList:
            if randPrize and len(randPrize) == 2:
                randPrizeType, randValue = randPrize
                addPoolPrizeInfo[randPrizeType] = addPoolPrizeInfo.get(randPrizeType, 0) + randValue
    else:
        GameWorld.DebugLog("添加奖池: drawType=%s,drawCount=%s" % (drawType, drawCount), playerID)
        addPoolPrizeInfo[drawType] = addPoolPrizeInfo.get(drawType, 0) + drawCount
@@ -221,15 +221,13 @@
    SyncTuijinbiInfo(curPlayer)
    return
def __GiveMoney(curPlayer, moneyType, moneyValue, notifyAward=False):
def __GiveMoney(curPlayer, moneyType, moneyValue):
    moneyTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TuiJinbiMoney % moneyType)
    updMoneyTotal = min(moneyTotal + moneyValue, ChConfig.Def_UpperLimit_DWord)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TuiJinbiMoney % moneyType, updMoneyTotal)
    GameWorld.DebugLog("更新推金币累计奖励货币: moneyType=%s,moneyValue=%s,updMoneyTotal=%s" 
                       % (moneyType, moneyValue, updMoneyTotal), curPlayer.GetPlayerID())
    PlayerControl.GiveMoney(curPlayer, moneyType, moneyValue, "Tuijinbi")
    if notifyAward:
        ItemControler.NotifyGiveAwardInfo(curPlayer, [], "Tuijinbi", moneyInfo={moneyType:moneyValue})
    return
def SyncTuijinbiInfo(curPlayer, drawNum=0):