xdh
2019-01-14 e7e1e93c2d2237f5fdcb94e4053e7c7584dbc7bf
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())
@@ -159,7 +162,7 @@
    if len(startTimeList) != len(endTimeList):
        GameWorld.ErrLog("限时抢购开关时间时分配置错误!cfgID=%s" % cfgID)
        return
    job = curPlayer.GetJob()
    openServerDay = GameWorld.GetGameWorld().GetGameWorldDictByKey(ShareDefine.Def_Notify_WorldKey_ServerDay) + 1
    packInfo = ChPyNetSendPack.tagMCFlashSaleInfo()
    packInfo.StartDate = GameWorld.GetOperationActionDateStr(flashSaleIpyData.GetStartDate(), openServerDay)
@@ -194,7 +197,10 @@
                giftBag.MoneyType = itemIpyData.GetMoneyType()
                giftBag.MoneyNumber = itemIpyData.GetMoneyNum()
                giftBag.MoneyOriginal = itemIpyData.GetMoneyOriginal()
                giftBag.ItemID = itemIpyData.GetItemID()
                itemID = itemIpyData.GetItemID()
                jobItemList = itemIpyData.GetJobItem()
                jobItemID = FunctionNPCCommon.GetShopJobItem(job, itemID, jobItemList)
                giftBag.ItemID = jobItemID
                giftBag.ItemCount = itemIpyData.GetItemCnt()
                giftBag.IsBind = itemIpyData.GetIsBind()
                shop.GiftbagInfo.append(giftBag)