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