From 3abbce4e81bf7f359c1db9380a9569aaa0c3da76 Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期一, 28 一月 2019 17:21:45 +0800
Subject: [PATCH] 5956 【后端】【1.5.200】限时抢购支持对应不同的世界等级
---
ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py | 14 ++++++++++----
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py | 16 +++++++++++-----
ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py | 4 ++--
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py | 2 +-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py | 3 ++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py | 2 +-
ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py | 3 ++-
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py | 8 +++++---
8 files changed, 34 insertions(+), 18 deletions(-)
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
index 87ed0f0..993ca3f 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/GameWorldLogic/GameWorldActionControl.py
@@ -446,7 +446,7 @@
dbOperationActIDKey = PlayerDBGSEvent.Def_OperationActID % actName
curActID = sendMapServerMsgDict.get(ShareDefine.ActKey_ID)
- if state >= 1 and curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
+ if curActID and PlayerDBGSEvent.GetDBGSTrig_ByKey(dbOperationActIDKey) != curActID:
PlayerDBGSEvent.SetDBGSTrig_ByKey(dbOperationActIDKey, curActID)
if actName in ShareDefine.NeedWorldLVOperationActNameList:
#记录开启时世界等级
@@ -465,7 +465,7 @@
PlayerNewFairyCeremony.ResetNewFairyCeremony()
- if state >= 1 and actName in ShareDefine.NeedWorldLVOperationActNameList:
+ if actName in ShareDefine.NeedWorldLVOperationActNameList:
actWorldLV = PlayerDBGSEvent.GetDBGSTrig_ByKey(PlayerDBGSEvent.Def_OActWorldLV % actName)
sendMapServerMsgDict[ShareDefine.ActKey_WorldLV] = actWorldLV
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py
index c816767..551d2aa 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/Player/PlayerStore.py
@@ -99,10 +99,16 @@
#重置限时抢购商店全服购买次数
if state == 0:
return
- shopTypeList = ipyData.GetShopTypeList()
- dayShopList = shopTypeList[dayIndex] if dayIndex < len(shopTypeList) else shopTypeList[-1]
- shopType = dayShopList[state-1] if state-1 < len(dayShopList) else dayShopList[-1]
- DoResetStoreServerBuyCnt([shopType])
+ dayShopRangeDict = ipyData.GetShopTypeList()
+
+ resetTypeList = []
+ for shopTypeList in dayShopRangeDict.values():
+ dayShopList = shopTypeList[dayIndex] if dayIndex < len(shopTypeList) else shopTypeList[-1]
+ shopType = dayShopList[state-1] if state-1 < len(dayShopList) else dayShopList[-1]
+ if shopType not in resetTypeList:
+ resetTypeList.append(shopType)
+ if resetTypeList:
+ DoResetStoreServerBuyCnt(resetTypeList)
return
def SyncStoreServerBuyInfo(curPlayer, syncCntDict={}):
diff --git a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
index adf7808..162ff22 100644
--- a/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
+++ b/ServerPython/CoreServerGroup/GameServer/Script/ShareDefine.py
@@ -245,7 +245,8 @@
OperationActionName_NewFairyCeremony, ] \
+ FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
-NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, OperationActionName_NewFairyCeremony]
+NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
+ OperationActionName_NewFairyCeremony, OperationActionName_FlashSale]
#活动信息字典key定义
ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
index bb4a99f..3eb8943 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ChConfig.py
@@ -3646,7 +3646,9 @@
Def_Player_Dict_TrialTower_PassLV = "TrialTower_PassLV" # 试炼之塔通关层数
Def_Player_Dict_TrialTower_LastDayPassLV = "Tower_LastDayPassLV" # 试炼之塔昨日通关层数
#诛仙塔
-Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV" # 诛仙塔通关层数
+Def_Player_Dict_ZhuXianTowerPassLV = "ZhuXianTowerPassLV" # 诛仙塔已通关层数
+Def_Player_Dict_ZhuXianTowerLastFloor = "ZhuXianTowerLastFloor" # 诛仙塔上次挑战层数
+
#古神禁地
Def_Player_Dict_GodArea_Anger = "GodArea_Anger" # 古神禁地怒气值
Def_Player_Dict_GodArea_LastAddAngerTime = "GodArea_LastAddAngerTime" # 古神禁地上一次增加怒气值的时间
@@ -5213,8 +5215,8 @@
Def_RewardType_ActLoginAwardAct, # 领取登录奖励活动奖励22
Def_RewardType_NewFairyCRecharge, # 新仙界盛典充值大礼23
Def_RewardType_NewFairyCParty, # 新仙界盛典全民来嗨24
-Def_RewardType_FeastWeekPartyAct, # 领取周狂欢活动奖励25
-Def_RewardType_FeastWeekPartyPoint, # 领取周狂欢积分奖励26
+Def_RewardType_FeastWeekPartyAct, # 领取节日巡礼活动奖励25
+Def_RewardType_FeastWeekPartyPoint, # 领取节日巡礼积分奖励26
)= range(27)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
index e352709..2e88be0 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Event/EventSrc/FunctionNPCCommon.py
@@ -422,7 +422,7 @@
if not state:
GameWorld.DebugLog("限时抢购非活动中!state=%s" % (state), curPlayer.GetPlayerID())
return
- shopTypeList = PlayerFlashSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state)
+ shopTypeList = PlayerFlashSale.GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state, actInfo.get(ShareDefine.ActKey_WorldLV, 0))
if not shopTypeList:
return
actShopType = shopTypeList[0]
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
index dcc2219..44ae1ea 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/ChPlayer.py
@@ -5358,7 +5358,7 @@
PlayerNewFairyCeremony.GetFCPartyAward(curPlayer, dataEx)
# 领取节日巡礼活动奖励
elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyAct:
- PlayerWeekParty.GetWeekPartyActionAward(curPlayer, dataEx, dataExStr)
+ PlayerFeastWeekParty.GetFeastWeekPartyActionAward(curPlayer, dataEx, dataExStr)
# 领取节日巡礼积分奖励
elif rewardType == ChConfig.Def_RewardType_FeastWeekPartyPoint:
PlayerFeastWeekParty.GetFeastWeekPartyPointAward(curPlayer, dataEx, dataExStr)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py
index 8b42cff..646fc9c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py
@@ -28,13 +28,15 @@
import datetime
-def GetShopTypeList(cfgID, dayIndex, state):
+def GetShopTypeList(cfgID, dayIndex, state, woldLV):
if cfgID == 0 or state == 0:
return []
ipyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
if not ipyData:
return []
- shopTypeList = ipyData.GetShopTypeList()
+ shopTypeList = GameWorld.GetDictValueByRangeKey(ipyData.GetShopTypeList(), woldLV, [])
+ if not shopTypeList:
+ return []
todayShopTypeList = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex]
return [todayShopTypeList[state - 1] if state - 1 < len(todayShopTypeList) else todayShopTypeList[-1]]
@@ -65,6 +67,7 @@
state = actInfo.get(ShareDefine.ActKey_State, 0)
cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
dayIndex = actInfo.get(ShareDefine.ActKey_DayIndex, 0)
+ woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleID, 0, ChConfig.Def_PDictType_FlashSale) # 玩家身上的活动ID
playerActState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleState, 0, ChConfig.Def_PDictType_FlashSale) # 玩家身上的活动State
playerMailState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleMailState, 0, ChConfig.Def_PDictType_FlashSale) # 玩家身上的活动提醒邮件状态
@@ -82,7 +85,7 @@
GameWorld.DebugLog(' 限时抢购活动重置!')
curPlayer.ClearNomalDict(ChConfig.Def_PDictType_FlashSale)
- shopTypeList = GetShopTypeList(cfgID, dayIndex, state)
+ shopTypeList = GetShopTypeList(cfgID, dayIndex, state, woldLV)
if shopTypeList:
FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleID, actID, ChConfig.Def_PDictType_FlashSale)
@@ -156,7 +159,8 @@
flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
if not flashSaleIpyData:
return
- shopTypeList = flashSaleIpyData.GetShopTypeList()
+ woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+ shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
startTimeList = flashSaleIpyData.GetStartTimeList()
endTimeList = flashSaleIpyData.GetEndTimeList()
if len(startTimeList) != len(endTimeList):
@@ -247,11 +251,13 @@
flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
if not flashSaleIpyData:
return
+ woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
+
packInfo = ChPyNetSendPack.tagMCFlashSaleAppointmentInfo()
packInfo.GoodsList = []
if goodsID == 0:
packInfo.IsAll = 1
- shopTypeList = flashSaleIpyData.GetShopTypeList()
+ shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
for dayIndex, shopList in enumerate(shopTypeList):
for timeIndex, shopType in enumerate(shopList):
shopItemIpyDataList = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ShopType":shopType}, True, True)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
index adf7808..162ff22 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/ShareDefine.py
@@ -245,7 +245,8 @@
OperationActionName_NewFairyCeremony, ] \
+ FeastOperationActionNameList
#需要记录开启活动时的世界等级的运营活动
-NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell, OperationActionName_NewFairyCeremony]
+NeedWorldLVOperationActNameList = [OperationActionName_FairyCeremony, OperationActionName_WishingWell,
+ OperationActionName_NewFairyCeremony, OperationActionName_FlashSale]
#活动信息字典key定义
ActKey_ID = "ID" # 活动ID,唯一标识的ID,一般是活动开启的time值
--
Gitblit v1.8.0