hxp
2018-12-07 cd4cb929ce5566f67371d74783760ce563b35ad9
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerFlashSale.py
@@ -73,7 +73,8 @@
        isReset = True
        if cfgID:
            flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
            startDate = flashSaleIpyData.GetStartDate()
            openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
            startDate = GameWorld.GetOperationActionDateStr(flashSaleIpyData.GetStartDate(), openServerDay)
            startTimeNum = GameWorld.ChangeTimeStrToNum(startDate, timeFormat=ChConfig.TYPE_Time_Format_Day)
        else:
            startTimeNum = 0
@@ -116,8 +117,9 @@
    LVLimit = flashSaleIpyData.GetLVLimit()
    if not mailKey or curPlayer.GetLV() < LVLimit:
        return
    startDate = flashSaleIpyData.GetStartDate()
    endDate = flashSaleIpyData.GetEndDate()
    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
    startDate = GameWorld.GetOperationActionDateStr(flashSaleIpyData.GetStartDate(), openServerDay)
    endDate = GameWorld.GetOperationActionDateStr(flashSaleIpyData.GetEndDate(), openServerDay)
    startTimeList = flashSaleIpyData.GetStartTimeList()
    endTimeList = flashSaleIpyData.GetEndTimeList()
    if not startTimeList or not endTimeList:
@@ -127,7 +129,8 @@
    endTime = datetime.datetime.strptime("%s %s:00" % (endDate, endTimeList[-1]), ChConfig.TYPE_Time_Format)
    curDateTime = GameWorld.GetCurrentTime()
    if startTime <= curDateTime <= endTime:
        PlayerControl.SendMailByKey(mailKey, [curPlayer.GetID()], flashSaleIpyData.GetMailItemPrize())
        paramList = [startDate.replace('-','/'), endDate.replace('-','/'), GameWorld.GbkToCode('、').join(startTimeList)]
        PlayerControl.SendMailByKey(mailKey, [curPlayer.GetID()], flashSaleIpyData.GetMailItemPrize(), paramList)
        startTimeNum = GameWorld.ChangeTimeStrToNum(startDate, timeFormat=ChConfig.TYPE_Time_Format_Day)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleMailState, startTimeNum, ChConfig.Def_PDictType_FlashSale)
        GameWorld.DebugLog("    发送新限时抢购邮件提醒!", curPlayer.GetID())