From 6e66e9cf06adc9b94158a8a2d8eae94acb782b84 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 21 十月 2024 15:56:54 +0800
Subject: [PATCH] 10287 【英文】1折活动(增加购买超级推板每日奖励抽奖次数逻辑;修改激活逻辑;)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 2 ++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py | 31 +++++++++++++++++++++++++------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1 +
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index c5d4d4e..7c15244 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/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
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
index 5a9fdb2..0054e03 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/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:
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py
index bafc2e9..bc319cc 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSuperDiscount.py
+++ b/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
--
Gitblit v1.8.0