From 7d7da6a8246577a11c38219eaedb451178769ec8 Mon Sep 17 00:00:00 2001 From: hxp <ale99527@vip.qq.com> Date: 星期五, 14 九月 2018 17:15:52 +0800 Subject: [PATCH] 3494 【后端】开服前14天运营活动定制 3443 【后端】Boss复活活动,时间段支持日期跨天或日期支持重置时间点设置(如0点或5点) 1972 【后端】运营活动支持循环广播 --- ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py index 02507ad..3526621 100644 --- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py +++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerSpringSale.py @@ -25,6 +25,15 @@ import GameWorld import ChConfig +def GetShopTypeList(cfgID, dayIndex): + if cfgID == None or dayIndex == None: + return [] + ipyData = IpyGameDataPY.GetIpyGameData("ActSpringSale", cfgID) + if not ipyData: + return [] + shopTypeList = ipyData.GetShopTypeList() + todayShopType = shopTypeList[-1] if dayIndex >= len(shopTypeList) else shopTypeList[dayIndex] + return todayShopType def OnPlayerLogin(curPlayer): isReset = __CheckPlayerSpringSaleAction(curPlayer) @@ -53,9 +62,6 @@ actInfo = PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_SpringSale, {}) actID = actInfo.get(ShareDefine.ActKey_ID, 0) state = actInfo.get(ShareDefine.ActKey_State, 0) - shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, []) - #if not state or not shopTypeList: - # return playerActID = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_SpringSaleID) # 玩家身上的活动ID @@ -64,6 +70,7 @@ GameWorld.DebugLog("限时特惠活动ID不变,不处理!", curPlayer.GetPlayerID()) return + shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0)) PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_SpringSaleID, actID) FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList) @@ -82,7 +89,7 @@ return cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0) - shopTypeList = actInfo.get(ShareDefine.ActKey_ShopTypeList, 0) + shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0)) if not cfgID or not shopTypeList: return -- Gitblit v1.8.0