From 87de8ad7ed5c10277275fd8657bd28729c36ecf1 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期五, 20 十二月 2024 12:07:55 +0800
Subject: [PATCH] 10348 【英语】累充福缘奖励修改
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py | 44 ++++++++++++++++++++++++++++++++++++++++++++
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 1 +
2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index 4501ce2..46ee1a5 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3928,6 +3928,7 @@
Def_PDict_CostRebateWorldLV = "CostRebateWorldLV_%s" #消费返利活动开启时世界等级,参数(活动编号)
#累计充值活动
+Def_PDict_FnFortuneCompensate = "FnFortuneCompensate" #英文版福缘累充奖励补发状态
Def_PDict_TotalRechargeID = "TotalRechargeID_%s" # 玩家身上的累计充值活动ID,唯一标识,取活动开始日期time值,参数:(活动编号)
Def_PDict_TotalRechargeTemplateID = "TotalRechargeTemplateID_%s" # 玩家身上的累计充值模板ID,参数:(活动编号)
Def_PDict_TotalRechargeGold = "TotalRechargeGold_%s" # 消费返利总累计充值X元,参数:(活动编号)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
index 9ac3712..b1c7218 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
@@ -29,6 +29,49 @@
import ChConfig
import CommFunc
+def __DoFnFortuneCompensate(curPlayer):
+ ## 英文版福缘累充奖励补发,后续可删除
+ if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FnFortuneCompensate):
+ return
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FnFortuneCompensate, 1)
+
+ actNum = 35
+ actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_TotalRecharge, actNum)
+ state = actInfo.get(ShareDefine.ActKey_State, 0)
+ templateID = GetTemplateID(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0))
+ if not state or not templateID:
+ return
+
+ curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold % actNum)
+ if not curRechargeGold:
+ return
+
+ ipyDataList = IpyGameDataPY.GetIpyGameDataList("TotalRechargeTemplate", templateID)
+ if not ipyDataList:
+ return
+
+ compensateItemDict = IpyGameDataPY.GetFuncEvalCfg("FortuneCompensate", 1, {})
+ playerID = curPlayer.GetPlayerID()
+ awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeAwardRecord % actNum)
+ #GameWorld.Log("福缘累充奖励补发! curRechargeGold=%s,awardRecord=%s" % (curRechargeGold, awardRecord), playerID)
+ for ipyData in ipyDataList:
+ awardIndex = ipyData.GetAwardIndex()
+ if not awardRecord & pow(2, awardIndex):
+ #GameWorld.Log("福缘累充奖励未领取,不补发! awardIndex=%s" % awardIndex, playerID)
+ continue
+ if awardIndex not in compensateItemDict:
+ continue
+ #needGold = CommFunc.RMBToCoin(ipyData.GetNeedGold())
+ addItemList = compensateItemDict[awardIndex]
+ needRMB = str(ipyData.GetNeedGold())
+ if needRMB.endswith(".0"):
+ needRMB = needRMB[:-2]
+ paramList = [needRMB]
+ PlayerControl.SendMailByKey("FortuneCompensate", [playerID], addItemList, paramList)
+ GameWorld.Log("福缘累充奖励已领取,补发! awardIndex=%s, %s" % (awardIndex, addItemList), playerID)
+
+ return
+
def GetTemplateID(cfgID, dayIndex):
if cfgID == None or dayIndex == None:
return 0
@@ -50,6 +93,7 @@
Sync_TotalRechargeActionInfo(curPlayer, actNum)
Sync_TotalRechargeInfo(curPlayer, actNum)
+ __DoFnFortuneCompensate(curPlayer)
return
def RefreshTotalRechargeActionInfo(actNum):
--
Gitblit v1.8.0