10287 【英文】1折活动(增加购买超级推板每日奖励抽奖次数逻辑;修改激活逻辑;)
3个文件已修改
34 ■■■■ 已修改文件
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -4297,6 +4297,7 @@
Def_PDict_InvestKeyCount = 3 # key编号数
# 至尊卡1折折扣,英文版专用
Def_PDict_TuiJinbiBanTime = "TuiJinbiBanTime"  # 推金币超级推板购买时间戳
Def_PDict_TuiJinbiMoney = "TuiJinbiMoney_%s"  # 推金币累计获得货币数,参数(货币类型)
# 成就 Def_PDictType_Success
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -108,6 +108,7 @@
import PlayerFlashGiftbag
import PlayerDailyGiftbag
import PlayerFairyCeremony
import PlayerSuperDiscount
import PlayerNewFairyCeremony
import PlayerActHorsePetFeast
import PlayerFeastRedPacket
@@ -564,6 +565,7 @@
        PlayerLove.DoPlayerOnDay(curPlayer)
        #仙宫
        PlayerXiangong.PlayerOnDay(curPlayer)
        PlayerSuperDiscount.PlayerOnDay(curPlayer)
        #玩法前瞻奖励
        gameNoticeAwardState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_GameNoticeAwardState)
        if gameNoticeAwardState:
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py
@@ -20,6 +20,22 @@
import PlayerControl
import ShareDefine
import ChConfig
import time
def PlayerOnDay(curPlayer):
    GiveTuijinbiByDay(curPlayer)
    return
def GiveTuijinbiByDay(curPlayer):
    tuibanTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TuiJinbiBanTime)
    tuibanDayAwardInfo = IpyGameDataPY.GetFuncEvalCfg("EnSuperDiscount", 4)
    if tuibanTime and tuibanDayAwardInfo and len(tuibanDayAwardInfo) == 2:
        diffDays = GameWorld.GetDiff_Day(int(time.time()), tuibanTime) + 1
        giveMoney, maxDays = tuibanDayAwardInfo
        if diffDays <= maxDays:
            GameWorld.DebugLog("按天给推金币次数! diffDays=%s, maxDays=%s" % (diffDays, maxDays), curPlayer.GetPlayerID())
            PlayerControl.GiveMoney(curPlayer, ShareDefine.TYPE_Price_Tuijinbi, giveMoney, "tuibanonday")
    return
def GetSuperDiscountState(curPlayer):
    ## 至尊折扣卡激活状态
@@ -27,25 +43,28 @@
def ActSuperDiscountByCTG(curPlayer, ctgID):
    ## 充值激活
    ctgList = IpyGameDataPY.GetFuncEvalCfg("EnSuperDiscount", 1)
    if ctgID in ctgList:
        __DoActiveSuperDiscount(curPlayer, ctgID)
    if ctgID and ctgID == IpyGameDataPY.GetFuncCfg("EnSuperDiscount", 1):
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TuiJinbiBanTime, int(time.time()))
        GameWorld.DebugLog("标记已购买超级推板时间戳!", curPlayer.GetPlayerID())
        GiveTuijinbiByDay(curPlayer) # 给第一天奖励
    return
def __DoActiveSuperDiscount(curPlayer, ctgID=0):
def __DoActiveSuperDiscount(curPlayer):
    ## 激活至尊卡
    if GetSuperDiscountState(curPlayer):
        GameWorld.DebugLog("至尊卡已激活!")
        return
    
    if not ctgID:
    # 没有购买超级推板的,验证免费激活
    tuibanTime = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TuiJinbiBanTime)
    if not tuibanTime:
        needCreateRoleDays = IpyGameDataPY.GetFuncCfg("EnSuperDiscount", 2)
        createRoleDays = GameWorld.GetCreateRoleDays(curPlayer)
        if createRoleDays < needCreateRoleDays:
            GameWorld.ErrLog("创角天数不足,无法免费激活至尊卡! createRoleDays=%s < %s" % (createRoleDays, needCreateRoleDays), curPlayer.GetPlayerID())
            return
        
    GameWorld.DebugLog("激活至尊卡: ctgID=%s" % (ctgID), curPlayer.GetPlayerID())
    GameWorld.DebugLog("激活至尊卡: tuibanTime=%s" % (tuibanTime), curPlayer.GetPlayerID())
    curPlayer.SetLV2(1)
    return