From fe9b738b1cb89e3b4d320924fceef70a8e1f6fac Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 04 三月 2021 14:24:50 +0800
Subject: [PATCH] 8650 【主干】【BT2】活动规则优化(多活动支持的改为单表模式,增加活动分组编号字段区分不同的活动编号;常规活动改为不受合服影响,合服活动独立出来;累计充值活动、集字活动适配为新模式 master冲突补同步);
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py | 154 +++++++++++++++++-------------
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 32 +++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py | 3
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 32 +++---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py | 28 +++--
5 files changed, 139 insertions(+), 110 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index f660a05..c4ab40c 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -200,6 +200,13 @@
Def_Notify_WorldKey_AssistBoss = "AssistBoss" # 协助boss
+#活动类型定义
+ActTypeList = (
+ActType_OpenComm, # 开服及常规运营活动 1
+ActType_MixServer, # 合服活动 2
+ActType_Feast, # 节日活动 3
+) = range(1, 1 + 3)
+
#运营活动表名定义
OperationActionName_ExpRate = "ActExpRate" # 多倍经验活动
OperationActionName_CostRebate = "ActCostRebate" # 消费返利活动
@@ -213,14 +220,11 @@
OperationActionName_FlashSale = "ActFlashSale" # 限时抢购活动
OperationActionName_WishingWell = "ActWishingWell" # 许愿池活动
OperationActionName_TotalRecharge = "ActTotalRecharge" # 累计充值活动
-OperationActionName_TotalRecharge2 = "ActTotalRecharge2" # 累计充值活动
-OperationActionName_TotalRecharge3 = "ActTotalRecharge3" # 累计充值活动 - 节日充值领奖
OperationActionName_WeekParty = "ActWeekParty" # 周狂欢活动
OperationActionName_LoginAward = "ActLoginAward" # 登录奖励活动
OperationActionName_FeastWeekParty = "ActFeastWeekParty" # 节日巡礼狂欢活动
OperationActionName_FeastRedPacket = "ActFeastRedPacket" # 节日红包活动
OperationActionName_CollectWords = "ActCollectWords" # 集字活动
-OperationActionName_CollectWords2 = "ActCollectWords2" # 集字活动2
OperationActionName_LuckyTreasure = "ActLuckyTreasure" # 幸运鉴宝活动
OperationActionName_RechargePrize = "ActRechargePrize" # 充值返利活动
OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
@@ -231,7 +235,7 @@
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
- OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
+ OperationActionName_FeastLogin,
OperationActionName_FeastWish, OperationActionName_FeastTravel,
]
#所有的运营活动列表,含节日活动
@@ -239,31 +243,28 @@
OperationActionName_BossReborn,OperationActionName_SpringSale,
OperationActionName_FlashGiftbag, OperationActionName_FairyCeremony,
OperationActionName_RealmPoint, OperationActionName_FlashSale,
- OperationActionName_WishingWell, OperationActionName_TotalRecharge, OperationActionName_TotalRecharge2,
+ OperationActionName_WishingWell, OperationActionName_TotalRecharge,
OperationActionName_WeekParty, OperationActionName_LoginAward,
OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
OperationActionName_DailyGiftbag, OperationActionName_RechargePrize,
- OperationActionName_CollectWords, OperationActionName_CollectWords2] \
+ OperationActionName_CollectWords] \
+ FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
- OperationActionName_BossReborn, OperationActionName_TotalRecharge, OperationActionName_TotalRecharge2,
+ OperationActionName_BossReborn, OperationActionName_TotalRecharge,
OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
OperationActionName_SpringSale, OperationActionName_LuckyTreasure,
OperationActionName_DailyGiftbag, OperationActionName_GrowupBuy,
OperationActionName_WeekParty,
- OperationActionName_CollectWords, OperationActionName_CollectWords2,
- OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
+ OperationActionName_CollectWords,
+ OperationActionName_FeastLogin,
OperationActionName_FeastWish, OperationActionName_FeastTravel,
]
-#所有的累计充值活动
-OperationActionName_TotalRechargeDict = {
- 1:OperationActionName_TotalRecharge,
- 2:OperationActionName_TotalRecharge2,
- 3:OperationActionName_TotalRecharge3,
- }
+#支持多活动分组编号的活动名
+MultiActNumOperationActNameList = [OperationActionName_TotalRecharge, OperationActionName_CollectWords]
+
#跨服运营活动表名定义
CrossActName_CTGBillboard = "CrossActCTGBillboard" # 充值排行榜
@@ -274,6 +275,7 @@
ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
ActKey_State = "State" # 活动状态 0-未开启, >0开启中,也代表当日的第几个时间段
ActKey_CfgID = "CfgID" # 活动表配置ID
+ActKey_ActNum = "ActNum" # 活动分组编号
ActKey_DayIndex = "DayIndex" # 当前活动天索引,0开始,代表第1天
ActKey_TemplateID = "TemplateID" # 当前活动模板ID
ActKey_WorldLV = "WorldLV" # 活动开启时世界等级
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 b286ff9..5dcada6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerActTotalRecharge.py
@@ -29,30 +29,70 @@
import ChConfig
import CommFunc
-def GetTemplateID(cfgID, dayIndex, actNum):
+def GetTemplateID(cfgID, dayIndex):
if cfgID == None or dayIndex == None:
return 0
- if actNum == 1:
- ipyData = IpyGameDataPY.GetIpyGameData("ActTotalRecharge", cfgID)
- else:
- ipyData = IpyGameDataPY.GetIpyGameData("ActTotalRecharge%s" % actNum, cfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActTotalRecharge", cfgID)
if not ipyData:
return 0
templateIDList = ipyData.GetTemplateIDList()
templateID = templateIDList[-1] if dayIndex >= len(templateIDList) else templateIDList[dayIndex]
return templateID
+def GetActInfo(actNum):
+ if ShareDefine.OperationActionName_TotalRecharge not in PyGameData.g_operationActionDict:
+ return {}
+ actNumDict = PyGameData.g_operationActionDict[ShareDefine.OperationActionName_TotalRecharge]
+ if actNum not in actNumDict:
+ return {}
+ return actNumDict[actNum]
+
def OnPlayerLogin(curPlayer):
- for actNum, actName in ShareDefine.OperationActionName_TotalRechargeDict.items():
+ TransferPlayerActDBKeyValue(curPlayer)
+
+ for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_TotalRecharge, {}).values():
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
isReset = __CheckPlayerTotalRechargeAction(curPlayer, actNum)
if not isReset:
- actTotalRechargeInfo = PyGameData.g_operationActionDict.get(actName, {})
# 活动中同步活动信息
- if actTotalRechargeInfo.get(ShareDefine.ActKey_State):
+ if actInfo.get(ShareDefine.ActKey_State):
Sync_TotalRechargeActionInfo(curPlayer, actNum)
Sync_TotalRechargeInfo(curPlayer, actNum)
+ return
+
+def TransferPlayerActDBKeyValue(curPlayer):
+ ## 玩家登录时调用,旧版本玩家活动数据转移到新版本字典,线上版本维护之后的版本可删除此代码,线上版本分支 gt_1.100.4
+
+ # 原: 1-常规单日;2-常规多日;3-节日多日
+ # 新:10 11 31
+ transferActNumDict = {1:10, 2:11, 3:31}
+ for actNumOld, actNumNew in transferActNumDict.items():
+ actID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeID % actNumOld)
+ if not actID:
+ continue
+
+ templateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeTemplateID % actNumOld)
+ rechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold % actNumOld)
+ awardRecord = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeAwardRecord % actNumOld)
+ worldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeWorldLV % actNumOld)
+
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeID % actNumNew, actID)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID % actNumNew, templateID)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold % actNumNew, rechargeGold)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeAwardRecord % actNumNew, awardRecord)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeWorldLV % actNumNew, worldLV)
+
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeID % actNumOld, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID % actNumOld, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold % actNumOld, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeAwardRecord % actNumOld, 0)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeWorldLV % actNumOld, 0)
+
+ GameWorld.Log("累计充值转移玩家活动字典记录: actNumOld=%s,actNumNew=%s,actID=%s,templateID=%s,rechargeGold=%s,awardRecord=%s,worldLV=%s"
+ % (actNumOld, actNumNew, actID, templateID, rechargeGold, awardRecord, worldLV), curPlayer.GetPlayerID())
+
return
def RefreshTotalRechargeActionInfo(actNum):
@@ -69,12 +109,9 @@
## 检查玩家累计充值活动数据信息
playerID = curPlayer.GetPlayerID()
- if actNum not in ShareDefine.OperationActionName_TotalRechargeDict:
- return
- actName = ShareDefine.OperationActionName_TotalRechargeDict[actNum]
- actTotalRechargeInfo = PyGameData.g_operationActionDict.get(actName, {})
- TotalRechargeID = actTotalRechargeInfo.get(ShareDefine.ActKey_ID, 0)
- state = actTotalRechargeInfo.get(ShareDefine.ActKey_State, 0)
+ actInfo = GetActInfo(actNum)
+ TotalRechargeID = actInfo.get(ShareDefine.ActKey_ID, 0)
+ state = actInfo.get(ShareDefine.ActKey_State, 0)
playerTotalRechargeID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeID % actNum) # 玩家身上的活动ID
@@ -82,9 +119,9 @@
if TotalRechargeID == playerTotalRechargeID:
GameWorld.DebugLog("累计充值活动ID不变,不处理!actNum=%s" % actNum, curPlayer.GetPlayerID())
return
- actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
playerWorldLV = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeWorldLV % actNum)
- templateID = GetTemplateID(actTotalRechargeInfo.get(ShareDefine.ActKey_CfgID, 0), actTotalRechargeInfo.get(ShareDefine.ActKey_DayIndex, 0), actNum)
+ templateID = GetTemplateID(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), actNum)
playerTemplateID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeTemplateID % actNum)
GameWorld.DebugLog("累计充值重置! actNum=%s,TotalRechargeID=%s,playerTotalRechargeID=%s,state=%s,templateID=%s,playerTemplateID=%s"
@@ -138,8 +175,8 @@
if batchPlayerIDList:
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeAwardRecord % actNum, awardRecord)
- mailTypeKey = "TotalRechargeMail40" if actNum == 3 else "TotalRechargeMail"
- PlayerControl.SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList)
+ actType = actNum / 10
+ PlayerControl.SendMailBatch("TotalRechargeMail%s" % actType, batchPlayerIDList, batchAddItemList, batchParamList)
return
@@ -153,54 +190,47 @@
return itemInfoDict[str(job)]
-def AddTotalRechargeGold(curPlayer, addGold, actNum):
+def AddTotalRechargeGold(curPlayer, addGold):
if addGold <= 0:
return
-
- if actNum not in ShareDefine.OperationActionName_TotalRechargeDict:
- return
- actName = ShareDefine.OperationActionName_TotalRechargeDict[actNum]
- actTotalRechargeInfo = PyGameData.g_operationActionDict.get(actName, {})
- if not actTotalRechargeInfo.get(ShareDefine.ActKey_State):
- GameWorld.DebugLog("累计充值活动当前未开启! actNum=%s" % actNum)
- return
-
- actID = actTotalRechargeInfo.get(ShareDefine.ActKey_ID)
- templateID = GetTemplateID(actTotalRechargeInfo.get(ShareDefine.ActKey_CfgID, 0), actTotalRechargeInfo.get(ShareDefine.ActKey_DayIndex, 0), actNum)
- if not actID or not templateID:
- GameWorld.ErrLog("累计充值活动数据异常!actID=%s,templateID=%s" % (actID, templateID), curPlayer.GetPlayerID())
- return
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeID % actNum, actID)
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID % actNum, templateID)
-
- curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold % actNum)
- updRechargeGold = curRechargeGold + addGold
- PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold % actNum, updRechargeGold)
- Sync_TotalRechargeInfo(curPlayer, actNum)
- GameWorld.DebugLog("玩家累计充值活动: actNum=%s,actID=%s,templateID=%s,curRechargeGold=%s,addGold=%s,updRechargeGold=%s"
- % (actNum, actID, templateID, curRechargeGold, addGold, updRechargeGold), curPlayer.GetPlayerID())
+ for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_TotalRecharge, {}).values():
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ if not actInfo.get(ShareDefine.ActKey_State):
+ GameWorld.DebugLog("累计充值活动当前未开启! actNum=%s" % actNum)
+ continue
+
+ actID = actInfo.get(ShareDefine.ActKey_ID)
+ templateID = GetTemplateID(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), actNum)
+ if not actID or not templateID:
+ GameWorld.ErrLog("累计充值活动数据异常!actID=%s,templateID=%s" % (actID, templateID), curPlayer.GetPlayerID())
+ continue
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeID % actNum, actID)
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeTemplateID % actNum, templateID)
+
+ curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold % actNum)
+ updRechargeGold = curRechargeGold + addGold
+ PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TotalRechargeGold % actNum, updRechargeGold)
+ Sync_TotalRechargeInfo(curPlayer, actNum)
+ GameWorld.DebugLog("玩家累计充值活动: actNum=%s,actID=%s,templateID=%s,curRechargeGold=%s,addGold=%s,updRechargeGold=%s"
+ % (actNum, actID, templateID, curRechargeGold, addGold, updRechargeGold), curPlayer.GetPlayerID())
return
def OnGetTotalRechargeAward(curPlayer, awardIndex, actNum):
'''OnGetTotalRechargeAward
@param awardIndex: 奖励索引
- @param actNum: 活动编号,如1 或 2 代表不同的活动
+ @param actNum: 活动编号,如11 或 12 代表不同的活动
'''
actNum = GameWorld.ToIntDef(actNum, 0)
if actNum <= 0:
GameWorld.DebugLog("没有指定领取的累充活动编号! actNum=%s" % actNum)
return
playerID = curPlayer.GetPlayerID()
-
- if actNum not in ShareDefine.OperationActionName_TotalRechargeDict:
- return
- actName = ShareDefine.OperationActionName_TotalRechargeDict[actNum]
- actTotalRechargeInfo = PyGameData.g_operationActionDict.get(actName, {})
+ actInfo = GetActInfo(actNum)
- TotalRechargeID = actTotalRechargeInfo.get(ShareDefine.ActKey_ID, 0)
- state = actTotalRechargeInfo.get(ShareDefine.ActKey_State, 0)
- templateID = GetTemplateID(actTotalRechargeInfo.get(ShareDefine.ActKey_CfgID, 0), actTotalRechargeInfo.get(ShareDefine.ActKey_DayIndex, 0), actNum)
+ TotalRechargeID = actInfo.get(ShareDefine.ActKey_ID, 0)
+ 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:
GameWorld.DebugLog("没有累计充值活动,无法领奖!actNum=%s,state=%s,templateID=%s" % (actNum, state, templateID), playerID)
return
@@ -229,7 +259,7 @@
return
needGold = CommFunc.RMBToCoin(awardIpyData.GetNeedGold())
- actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
awardItemList = __GetItemList(ipyData.GetAwardItem(), curPlayer.GetJob(), actWorldLV)
curRechargeGold = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TotalRechargeGold % actNum)
@@ -271,22 +301,12 @@
def Sync_TotalRechargeActionInfo(curPlayer, actNum):
## 通知累计充值活动信息
- if actNum not in ShareDefine.OperationActionName_TotalRechargeDict:
- return
- actName = ShareDefine.OperationActionName_TotalRechargeDict[actNum]
- actTotalRechargeInfo = PyGameData.g_operationActionDict.get(actName, {})
-
- if not actTotalRechargeInfo:
+ actInfo = GetActInfo(actNum)
+ if not actInfo.get(ShareDefine.ActKey_State):
return
- if not actTotalRechargeInfo.get(ShareDefine.ActKey_State):
- return
-
- cfgID = actTotalRechargeInfo.get(ShareDefine.ActKey_CfgID)
- if actNum == 1:
- ipyData = IpyGameDataPY.GetIpyGameData("ActTotalRecharge", cfgID)
- else:
- ipyData = IpyGameDataPY.GetIpyGameData("ActTotalRecharge%s" % actNum, cfgID)
+ cfgID = actInfo.get(ShareDefine.ActKey_CfgID)
+ ipyData = IpyGameDataPY.GetIpyGameData("ActTotalRecharge", cfgID)
if not ipyData:
return
@@ -294,7 +314,7 @@
if not templateIDList:
return
job = curPlayer.GetJob()
- actWorldLV = actTotalRechargeInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ actWorldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
actInfo = ChPyNetSendPack.tagMCActTotalRechargeInfo()
actInfo.ActNum = actNum
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
index e479c6f..37e3e90 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -442,8 +442,7 @@
PlayerNewFairyCeremony.OnFCRecharge(curPlayer)
PlayerGoldGift.OnPlayerChargeGold(curPlayer)
#累积充值X元
- for actNum in ShareDefine.OperationActionName_TotalRechargeDict.keys():
- PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin, actNum)
+ PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin)
PlayerFairyCeremony.AddFCCTGRMB(curPlayer, orderCoin)
PlayerNewFairyCeremony.AddFCCostGold(curPlayer, orderCoin)
#开服活动
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 3b8585b..fde98a9 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerEventCounter.py
@@ -1336,18 +1336,27 @@
if key.startswith(ShareDefine.Def_Notify_WorldKey_OperationActionInfo[:-2]):
keyHead = ShareDefine.Def_Notify_WorldKey_OperationActionInfo[:-2]
actionName = key[len(keyHead):]
- PyGameData.g_operationActionDict[actionName] = eval(msgValue)
-
+ actInfo = eval(msgValue)
+ actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
+ if actionName in ShareDefine.MultiActNumOperationActNameList:
+ if not actNum:
+ GameWorld.ErrLog('MultiActNumOperation can not found actNum. actionName=%s,msg = %s' % (actionName, msg))
+ return
+ if actionName not in PyGameData.g_operationActionDict:
+ PyGameData.g_operationActionDict[actionName] = {}
+ PyGameData.g_operationActionDict[actionName][actNum] = actInfo
+ else:
+ PyGameData.g_operationActionDict[actionName] = actInfo
+
if actionName == ShareDefine.OperationActionName_ExpRate:
PlayerControl.RefreshOperationAction_ExpRate()
elif actionName == ShareDefine.OperationActionName_CostRebate:
PlayerCostRebate.RefreshCostRebateActionInfo()
- elif actionName in ShareDefine.OperationActionName_TotalRechargeDict.values():
- for actNum, actName in ShareDefine.OperationActionName_TotalRechargeDict.items():
- if actionName == actName:
- PlayerActTotalRecharge.RefreshTotalRechargeActionInfo(actNum)
- break
+
+ elif actionName == ShareDefine.OperationActionName_TotalRecharge:
+ PlayerActTotalRecharge.RefreshTotalRechargeActionInfo(actNum)
+
elif actionName == ShareDefine.OperationActionName_SpringSale:
PlayerSpringSale.RefreshSpringSaleActionInfo()
@@ -1373,10 +1382,7 @@
PlayerWishingWell.RefreshWishingWellAction()
elif actionName == ShareDefine.OperationActionName_CollectWords:
- PlayerActCollectWords.RefreshActCollectWordsInfo(1)
-
- elif actionName == ShareDefine.OperationActionName_CollectWords2:
- PlayerActCollectWords.RefreshActCollectWordsInfo(2)
+ PlayerActCollectWords.RefreshActCollectWordsInfo(actNum)
elif actionName == ShareDefine.OperationActionName_WeekParty:
PlayerWeekParty.RefreshOperationAction_WeekParty()
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index f660a05..c4ab40c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -200,6 +200,13 @@
Def_Notify_WorldKey_AssistBoss = "AssistBoss" # 协助boss
+#活动类型定义
+ActTypeList = (
+ActType_OpenComm, # 开服及常规运营活动 1
+ActType_MixServer, # 合服活动 2
+ActType_Feast, # 节日活动 3
+) = range(1, 1 + 3)
+
#运营活动表名定义
OperationActionName_ExpRate = "ActExpRate" # 多倍经验活动
OperationActionName_CostRebate = "ActCostRebate" # 消费返利活动
@@ -213,14 +220,11 @@
OperationActionName_FlashSale = "ActFlashSale" # 限时抢购活动
OperationActionName_WishingWell = "ActWishingWell" # 许愿池活动
OperationActionName_TotalRecharge = "ActTotalRecharge" # 累计充值活动
-OperationActionName_TotalRecharge2 = "ActTotalRecharge2" # 累计充值活动
-OperationActionName_TotalRecharge3 = "ActTotalRecharge3" # 累计充值活动 - 节日充值领奖
OperationActionName_WeekParty = "ActWeekParty" # 周狂欢活动
OperationActionName_LoginAward = "ActLoginAward" # 登录奖励活动
OperationActionName_FeastWeekParty = "ActFeastWeekParty" # 节日巡礼狂欢活动
OperationActionName_FeastRedPacket = "ActFeastRedPacket" # 节日红包活动
OperationActionName_CollectWords = "ActCollectWords" # 集字活动
-OperationActionName_CollectWords2 = "ActCollectWords2" # 集字活动2
OperationActionName_LuckyTreasure = "ActLuckyTreasure" # 幸运鉴宝活动
OperationActionName_RechargePrize = "ActRechargePrize" # 充值返利活动
OperationActionName_RechargeRebateGold = "ActRechargeRebateGold" # 充值返利仙玉活动(活动结束邮件发放,节日活动)
@@ -231,7 +235,7 @@
#节日活动类型列表 - 该类型无视开服天,日期到了就开启
FeastOperationActionNameList = [OperationActionName_FeastWeekParty, OperationActionName_FeastRedPacket,
OperationActionName_RechargeRebateGold, OperationActionName_GrowupBuy,
- OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
+ OperationActionName_FeastLogin,
OperationActionName_FeastWish, OperationActionName_FeastTravel,
]
#所有的运营活动列表,含节日活动
@@ -239,31 +243,28 @@
OperationActionName_BossReborn,OperationActionName_SpringSale,
OperationActionName_FlashGiftbag, OperationActionName_FairyCeremony,
OperationActionName_RealmPoint, OperationActionName_FlashSale,
- OperationActionName_WishingWell, OperationActionName_TotalRecharge, OperationActionName_TotalRecharge2,
+ OperationActionName_WishingWell, OperationActionName_TotalRecharge,
OperationActionName_WeekParty, OperationActionName_LoginAward,
OperationActionName_NewFairyCeremony, OperationActionName_LuckyTreasure,
OperationActionName_DailyGiftbag, OperationActionName_RechargePrize,
- OperationActionName_CollectWords, OperationActionName_CollectWords2] \
+ OperationActionName_CollectWords] \
+ FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
OperationActionName_NewFairyCeremony, OperationActionName_FlashSale,
- OperationActionName_BossReborn, OperationActionName_TotalRecharge, OperationActionName_TotalRecharge2,
+ OperationActionName_BossReborn, OperationActionName_TotalRecharge,
OperationActionName_CostRebate, OperationActionName_FlashGiftbag,
OperationActionName_SpringSale, OperationActionName_LuckyTreasure,
OperationActionName_DailyGiftbag, OperationActionName_GrowupBuy,
OperationActionName_WeekParty,
- OperationActionName_CollectWords, OperationActionName_CollectWords2,
- OperationActionName_FeastLogin, OperationActionName_TotalRecharge3,
+ OperationActionName_CollectWords,
+ OperationActionName_FeastLogin,
OperationActionName_FeastWish, OperationActionName_FeastTravel,
]
-#所有的累计充值活动
-OperationActionName_TotalRechargeDict = {
- 1:OperationActionName_TotalRecharge,
- 2:OperationActionName_TotalRecharge2,
- 3:OperationActionName_TotalRecharge3,
- }
+#支持多活动分组编号的活动名
+MultiActNumOperationActNameList = [OperationActionName_TotalRecharge, OperationActionName_CollectWords]
+
#跨服运营活动表名定义
CrossActName_CTGBillboard = "CrossActCTGBillboard" # 充值排行榜
@@ -274,6 +275,7 @@
ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
ActKey_State = "State" # 活动状态 0-未开启, >0开启中,也代表当日的第几个时间段
ActKey_CfgID = "CfgID" # 活动表配置ID
+ActKey_ActNum = "ActNum" # 活动分组编号
ActKey_DayIndex = "DayIndex" # 当前活动天索引,0开始,代表第1天
ActKey_TemplateID = "TemplateID" # 当前活动模板ID
ActKey_WorldLV = "WorldLV" # 活动开启时世界等级
--
Gitblit v1.8.0