| | |
| | | # 红包,直接给奖励
|
| | | if drawType == PrizeType_Redpack:
|
| | | randMoneyList = IpyGameDataPY.GetFuncEvalCfg("PushCoin", 3)
|
| | | randMoney = random.choice(randMoneyList)
|
| | | GameWorld.DebugLog("红包直接给: %s" % str(randMoney), playerID)
|
| | | GameWorld.DebugLog("红包直接给: %s" % str(randMoneyList), playerID)
|
| | | for randMoney in randMoneyList:
|
| | | if randMoney and len(randMoney) == 2:
|
| | | __GiveMoney(curPlayer, randMoney[0], randMoney[1], True)
|
| | | __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)
|
| | | 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
|
| | |
| | | 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):
|