| | |
| | | awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_OpenSererDailyAward)
|
| | | if awardState:
|
| | | Sync_RewardGetRecordInfo(curPlayer, ChConfig.Def_RewardType_OpenServerDailyAward, awardState)
|
| | | #累充每日奖励
|
| | | awardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_RechargeDayAward)
|
| | | if awardState:
|
| | | Sync_RewardGetRecordInfo(curPlayer, ChConfig.Def_RewardType_RechargeDayAward, awardState)
|
| | |
|
| | | curPlayer.SetState(0) # 脱机挂恢复为正常上线
|
| | | curPlayer.SetCountryLastWeekHornor(0) # 通知数据库是否保存还是下线,做一次恢复,1为保存 0为正常下线
|
| | |
| | | openServerDayLimit = IpyGameDataPY.GetFuncCfg("OpenServerDailyAward", 1)
|
| | | if openServerDay >= openServerDayLimit:
|
| | | OnGiveAwardByClient(curPlayer, rewardType, ChConfig.Def_PDict_OpenSererDailyAward, IpyGameDataPY.GetFuncEvalCfg("OpenServerDailyAward", 2), "OpenServerDailyAward")
|
| | | #累充每日奖励
|
| | | elif rewardType == ChConfig.Def_RewardType_RechargeDayAward:
|
| | | OnGetRechargeDayAward(curPlayer, rewardType)
|
| | | return
|
| | |
|
| | | def OnGetRechargeDayAward(curPlayer, rewardType):
|
| | | ## 领取累充每日奖励,取最高档
|
| | | realTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CTGRealTotal)
|
| | | awardCoin = 0
|
| | | awardItemList = []
|
| | | dayAwardDict = IpyGameDataPY.GetFuncEvalCfg("RechargeDayAward", 1, {})
|
| | | for needCoinStr, itemList in dayAwardDict.items():
|
| | | needCoin = int(needCoinStr)
|
| | | if realTotal >= needCoin and needCoin > awardCoin:
|
| | | awardCoin = needCoin
|
| | | awardItemList = itemList
|
| | | GameWorld.DebugLog("领取累充每日最高档奖励: realTotal=%s,awardCoin=%s,%s" % (realTotal, awardCoin, awardItemList), curPlayer.GetPlayerID())
|
| | | if not awardItemList:
|
| | | return
|
| | | OnGiveAwardByClient(curPlayer, rewardType, ChConfig.Def_PDict_RechargeDayAward, awardItemList, "RechargeDayAward")
|
| | | return
|
| | |
|
| | | ## 领取创角奖励
|
| | | def OnGetCreateRoleAward(curPlayer):
|
| | | if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_CreateRoleAwardState):
|