1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
#!/usr/bin/python
# -*- coding: GBK -*-
#-------------------------------------------------------------------------------
#
##@package Player.PlayerFlashSale
#
# @todo:ÏÞʱÇÀ¹º»î¶¯
# @author xdh
# @date 2018-7-17
# @version 1.0
#
# ÏêϸÃèÊö: ÏÞʱÇÀ¹º»î¶¯
#
#-------------------------------------------------------------------------------
#"""Version = 2018-7-17 12:00"""
#-------------------------------------------------------------------------------
 
import PyGameData
import ShareDefine
import PlayerControl
import IpyGameDataPY
import FunctionNPCCommon
import ChPyNetSendPack
import NetPackCommon
import GameWorld
import ChConfig
 
import datetime
 
 
def GetShopTypeList(cfgID, dayIndex, state, woldLV):
    if cfgID == 0 or state == 0:
        return []
    ipyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
    if not ipyData:
        return []
    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]]
 
 
def OnPlayerLogin(curPlayer):
    
    TransferPlayerActDBKeyValue(curPlayer)
    
    for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FlashSale, {}).values():
        actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
        __CheckPlayerflashSaleAction(curPlayer, actNum)
        
    return
 
def TransferPlayerActDBKeyValue(curPlayer):
    ## Íæ¼ÒµÇ¼ʱµ÷Óã¬¾É°æ±¾Íæ¼Ò»î¶¯Êý¾Ý×ªÒÆµ½Ð°汾×ֵ䣬ÏßÉϰ汾ά»¤Ö®ºóµÄ°æ±¾¿Éɾ³ý´Ë´úÂ룬ÏßÉϰ汾·ÖÖ§ gt_1.100.4
    
    #ÏÞʱÇÀ¹º»î¶¯
    Def_PDict_FlashSaleID = "FlashSaleID"  # Íæ¼ÒÉíÉϵÄÏÞʱÇÀ¹º»î¶¯ID£¬Î¨Ò»±êʶ£¬È¡»î¶¯¿ªÊ¼ÈÕÆÚtime
    Def_PDict_FlashSaleState = "FlashSaleState"  # Íæ¼ÒÉíÉϵÄÏÞʱÇÀ¹º»î¶¯state
    Def_PDict_FlashSaleMailState = "FlashSaleMailState"  # Íæ¼ÒÉíÉϵĻ¸üÐÂÌáÐÑÓʼþ״̬
    Def_PDict_FlashSaleYY = "FlashSaleYY_%s"  # Íæ¼ÒÔ¤Ô¼ÏÞʱÇÀ¹ºÉÌÆ·
    
    playerActID = curPlayer.NomalDictGetProperty(Def_PDict_FlashSaleID, 0, ChConfig.Def_PDictType_FlashSale)
    if not playerActID:
        return
    
    tagActNum = 10
    
    playerState = curPlayer.NomalDictGetProperty(Def_PDict_FlashSaleState, 0, ChConfig.Def_PDictType_FlashSale)
    playerMailState = curPlayer.NomalDictGetProperty(Def_PDict_FlashSaleMailState, 0, ChConfig.Def_PDictType_FlashSale)
    
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleID % tagActNum, playerActID, ChConfig.Def_PDictType_FlashSale)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleState % tagActNum, playerState, ChConfig.Def_PDictType_FlashSale)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleMailState % tagActNum, playerMailState, ChConfig.Def_PDictType_FlashSale)
    
    PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashSaleID, 0, ChConfig.Def_PDictType_FlashSale)
    PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashSaleState, 0, ChConfig.Def_PDictType_FlashSale)
    PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashSaleMailState, 0, ChConfig.Def_PDictType_FlashSale)
    
    GameWorld.Log("ÏÞʱÇÀ¹º×ªÒÆÍæ¼Ò»î¶¯×Öµä¼Ç¼: tagActNum=%s,playerActID=%s,playerState=%s,playerMailState=%s" 
                  % (tagActNum, playerActID, playerState, playerMailState), curPlayer.GetPlayerID())
    
    for dayIndex in xrange(7): # Ö§³Ö7Ìì
        for timeIndex in xrange(2): # Ö§³Ö2¸öʱ¶Î
            for i in xrange(10): # Ö§³Ö10¸öÎïÆ·
                goodsMark = dayIndex * 10000 + timeIndex * 100 + i  #ÉÌÆ·±êʶ
                isAppointment = curPlayer.NomalDictGetProperty(Def_PDict_FlashSaleYY % goodsMark, 0, ChConfig.Def_PDictType_FlashSale)
                if not isAppointment:
                    continue
                
                PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleYY % (tagActNum, goodsMark), isAppointment, ChConfig.Def_PDictType_FlashSale)
                
                PlayerControl.NomalDictSetProperty(curPlayer, Def_PDict_FlashSaleYY % goodsMark, 0, ChConfig.Def_PDictType_FlashSale)
                
                GameWorld.Log("    ×ªÒÆÔ¤Ô¼×´Ì¬: dayIndex=%s,timeIndex=%s,i=%s,goodsMark=%s, %s" 
                              % (dayIndex, timeIndex, i, goodsMark, isAppointment), curPlayer.GetPlayerID())
                
    return
 
def RefreshflashSaleActionInfo(actNum):
    ## ÊÕµ½GameServerͬ²½µÄ»î¶¯ÐÅÏ¢£¬Ë¢Ð»ÐÅÏ¢
    playerManager = GameWorld.GetPlayerManager()
    for index in xrange(playerManager.GetPlayerCount()):
        curPlayer = playerManager.GetPlayerByIndex(index)
        if curPlayer.GetID() == 0:
            continue
        __CheckPlayerflashSaleAction(curPlayer, actNum)
    return
 
 
def __CheckPlayerflashSaleAction(curPlayer, actNum):
    ## ¼ì²éÍæ¼ÒÏÞʱÇÀ¹º»î¶¯Êý¾ÝÐÅÏ¢
    
    playerID = curPlayer.GetPlayerID()
    
    actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_FlashSale, actNum)
    actID = actInfo.get(ShareDefine.ActKey_ID, 0)
    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 % actNum, 0, ChConfig.Def_PDictType_FlashSale)  # Íæ¼ÒÉíÉϵĻID
    playerActState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleState % actNum, 0, ChConfig.Def_PDictType_FlashSale)  # Íæ¼ÒÉíÉϵĻState
    playerMailState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleMailState % actNum, 0, ChConfig.Def_PDictType_FlashSale)  # Íæ¼ÒÉíÉϵĻÌáÐÑÓʼþ״̬
    isReset = False
    if actID != playerActID or (state != playerActState):
        isReset = True
        if cfgID:
            flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
            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
        if playerMailState != startTimeNum:
            GameWorld.DebugLog('    ÏÞʱÇÀ¹º»î¶¯ÖØÖÃ!')
            curPlayer.ClearNomalDict(ChConfig.Def_PDictType_FlashSale)
        
        shopTypeList = GetShopTypeList(cfgID, dayIndex, state, woldLV)
        if shopTypeList:
            FunctionNPCCommon.ResetShopItemBuyCountByShopType(curPlayer, shopTypeList)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleID % actNum, actID, ChConfig.Def_PDictType_FlashSale)
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleState % actNum, state, ChConfig.Def_PDictType_FlashSale)
        #Sync_flashSaleActionInfo(curPlayer)
        GameWorld.DebugLog("ÏÞʱÇÀ¹ºµ¥³¡ÖØÖÃ! actNum=%s,actID=%s,playerActID=%s,dayIndex=%s,state=%s,playerActState=%s,shopTypeList=%s,playerMailState=%s" % (actNum, actID, playerActID, dayIndex, state, playerActState, shopTypeList,playerMailState), playerID)
    else:
        GameWorld.DebugLog("ÏÞʱÇÀ¹º»î¶¯ID²»±ä£¬²»´¦Àí£¡actNum=%s,actID=%s,state=%s" % (actNum, actID, state), playerID)
        
    if cfgID:
        Sync_flashSaleActionInfo(curPlayer, actNum)
        Sync_FlashSaleAppointmentInfo(curPlayer, actNum)
    return isReset
 
def IsFlashSaleShopType(shopType):
    ## ÅжÏÊÇ·ñ»î¶¯ÖеÄÉ̵ê
    for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FlashSale, {}).values():
        actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
        
        state = actInfo.get(ShareDefine.ActKey_State, 0)
        if not state:
            continue
        shopTypeList = GetShopTypeList(actInfo.get(ShareDefine.ActKey_CfgID, 0), actInfo.get(ShareDefine.ActKey_DayIndex, 0), state, actInfo.get(ShareDefine.ActKey_WorldLV, 0))
        if not shopTypeList:
            continue
        actShopType = shopTypeList[0]
        if shopType == actShopType:
            GameWorld.DebugLog("ÏÞʱÇÀ¹º»î¶¯ÖеÄÉ̵êÀàÐÍ: actNum=%s,shopType=%s" % (actNum, shopType))
            return True
        
    GameWorld.DebugLog("ÏÞʱÇÀ¹º·Ç»î¶¯Öлò·Ç»î¶¯ÖеÄÉ̵êÀàÐÍ£¡shopType=%s" % (shopType))
    return False
 
def ProcessFlashSaleMail(curPlayer, tick):
    if not GameWorld.SetPlayerTickTime(curPlayer, ChConfig.TYPE_Player_Tick_FlashSale, tick):
        return
    
    for actInfo in PyGameData.g_operationActionDict.get(ShareDefine.OperationActionName_FlashSale, {}).values():
        actNum = actInfo.get(ShareDefine.ActKey_ActNum, 0)
        if not actInfo:
            continue
        cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
        if not cfgID:
            continue
        playerMailState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleMailState % actNum, 0, ChConfig.Def_PDictType_FlashSale)  # Íæ¼ÒÉíÉϵĻÌáÐÑÓʼþ״̬
        if playerMailState:
            continue
        flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
        if not flashSaleIpyData:
            continue
        mailKey = flashSaleIpyData.GetMailKey()
        LVLimit = flashSaleIpyData.GetLVLimit()
        if not mailKey or curPlayer.GetLV() < LVLimit:
            continue
        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:
            continue
        advanceMinutes = flashSaleIpyData.GetAdvanceMinutes()
        startTime = datetime.datetime.strptime("%s %s:00" % (startDate, startTimeList[0]), ChConfig.TYPE_Time_Format) + datetime.timedelta(minutes=-advanceMinutes)
        endTime = datetime.datetime.strptime("%s %s:00" % (endDate, endTimeList[-1]), ChConfig.TYPE_Time_Format)
        curDateTime = GameWorld.GetCurrentTime()
        if startTime <= curDateTime <= endTime:
            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 % actNum, startTimeNum, ChConfig.Def_PDictType_FlashSale)
            GameWorld.DebugLog("    ·¢ËÍÐÂÏÞʱÇÀ¹ºÓʼþÌáÐÑ!", curPlayer.GetID())
    #    else:
    #        GameWorld.DebugLog("    ·¢ËÍÐÂÏÞʱÇÀ¹ºÓʼþÌáÐÑ  Ê±¼äûµ½!startTime=%s,endTime=%s,curDateTime=%s"%(startTime,endTime,curDateTime), curPlayer.GetID())
    return
 
 
def Sync_flashSaleActionInfo(curPlayer, actNum):
    ## Í¨ÖªÏÞʱÇÀ¹º»î¶¯ÐÅÏ¢
    actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_FlashSale, actNum)
    if not actInfo:
        return
    
    #ÐèÒªÌáǰ֪ͨ£¬ËùÒÔÈ¥µô´ËÏÞÖÆ
    #if not actInfo.get(ShareDefine.ActKey_State):
    #    return
    
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
    if not cfgID:
        return
 
    flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
    if not flashSaleIpyData:
        return
    woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
    shopTypeList = GameWorld.GetDictValueByRangeKey(flashSaleIpyData.GetShopTypeList(), woldLV, [])
    startTimeList = flashSaleIpyData.GetStartTimeList()
    endTimeList = flashSaleIpyData.GetEndTimeList()
    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.ActNum = actNum
    packInfo.StartDate = GameWorld.GetOperationActionDateStr(flashSaleIpyData.GetStartDate(), openServerDay)
    packInfo.EndtDate = GameWorld.GetOperationActionDateStr(flashSaleIpyData.GetEndDate(), openServerDay)
    packInfo.AdvanceMinutes = flashSaleIpyData.GetAdvanceMinutes()
    packInfo.ActivityTime = []
    for i, startTime in enumerate(startTimeList):
        timeInfo = ChPyNetSendPack.tagMCFlashSaleTime()
        timeInfo.StartTime = startTime
        timeInfo.EndtTime = endTimeList[i]
        packInfo.ActivityTime.append(timeInfo)
    packInfo.ActivityTimeCount = len(packInfo.ActivityTime)
    packInfo.IsDayReset = flashSaleIpyData.GetIsDayReset()
    packInfo.LimitLV = flashSaleIpyData.GetLVLimit()
    packInfo.ShopInfo = []
    for dayIndex, shopList in enumerate(shopTypeList):
        for timeIndex, shopType in enumerate(shopList): 
            shopItemIpyDataList = IpyGameDataPY.GetIpyGameDataByCondition("Store", {"ShopType":shopType}, True, True)
            if not shopItemIpyDataList:
                continue
            
            shop = ChPyNetSendPack.tagMCFlashSaleShop()
            shop.DayIndex = dayIndex
            shop.TimeIndex = timeIndex
            shop.GiftbagInfo = []
            
            for itemIpyData in shopItemIpyDataList:
                giftBag = ChPyNetSendPack.tagMCFlashSaleGiftbag()
                giftBag.GiftID = itemIpyData.GetID()
                giftBag.BuyCountLimit = 0 if not itemIpyData.GetLimitCnt() else itemIpyData.GetLimitCnt()[0]
                giftBag.ServerBuyCountLimit = itemIpyData.GetServerLimitCnt()
                giftBag.MoneyType = itemIpyData.GetMoneyType()
                giftBag.MoneyNumber = itemIpyData.GetMoneyNum()
                giftBag.MoneyOriginal = itemIpyData.GetMoneyOriginal()
                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)
                
            shop.GiftbagCount = len(shop.GiftbagInfo)
            packInfo.ShopInfo.append(shop)
        
    packInfo.ShopCount = len(packInfo.ShopInfo)
    NetPackCommon.SendFakePack(curPlayer, packInfo)
    return
 
 
#// AA 05 ÏÞʱÇÀ¹ºÔ¤Ô¼ #tagCMFlashSaleAppointment
#
#struct     tagCMFlashSaleAppointment
#{
#    tagHead        Head;
#    BYTE        ActNum;        //»î¶¯±àºÅ
#    DWORD        GoodsID;         // ÇÀ¹ºÉÌÆ·±êʶ
#    BYTE        State;         // 1-Ô¤Ô¼ 0-È¡Ïû
#};
def OnFlashSaleAppointment(index, packData, tick):
    curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
    actNum = packData.ActNum
    goodsID = packData.GoodsID
    
    actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_FlashSale, actNum)
    if not actInfo:
        return
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
    if not cfgID:
        return
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FlashSaleYY % (actNum, goodsID), packData.State, ChConfig.Def_PDictType_FlashSale)
    Sync_FlashSaleAppointmentInfo(curPlayer, actNum, goodsID)
    return
 
 
def Sync_FlashSaleAppointmentInfo(curPlayer, actNum, goodsID=0):
    ##֪ͨÏÞʱÇÀ¹ºÔ¤Ô¼Çé¿ö
    actInfo = GameWorld.GetActInfo(ShareDefine.OperationActionName_FlashSale, actNum)
    if not actInfo:
        return
    cfgID = actInfo.get(ShareDefine.ActKey_CfgID, 0)
    if not cfgID:
        return
    flashSaleIpyData = IpyGameDataPY.GetIpyGameData("ActFlashSale", cfgID)
    if not flashSaleIpyData:
        return
    woldLV = actInfo.get(ShareDefine.ActKey_WorldLV, 0)
    
    packInfo = ChPyNetSendPack.tagMCFlashSaleAppointmentInfo()
    packInfo.ActNum = actNum
    packInfo.GoodsList = []
    if goodsID == 0:
        packInfo.IsAll = 1
        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)
                if not shopItemIpyDataList:
                    continue
                for i in xrange(len(shopItemIpyDataList)):
                    goodsMark = dayIndex * 10000 + timeIndex * 100 + i  #ÉÌÆ·±êʶ
                    isAppointment = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleYY % (actNum, goodsMark), 0, ChConfig.Def_PDictType_FlashSale)
                    if isAppointment:
                        appoinetmentPack = ChPyNetSendPack.tagMCFlashSaleAppointmentState()
                        appoinetmentPack.GoodsMark = goodsMark
                        appoinetmentPack.State = 1
                        packInfo.GoodsList.append(appoinetmentPack)
    else:
        packInfo.IsAll = 0
        isAppointment = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_FlashSaleYY % (actNum, goodsID), 0, ChConfig.Def_PDictType_FlashSale)
        appoinetmentPack = ChPyNetSendPack.tagMCFlashSaleAppointmentState()
        appoinetmentPack.GoodsMark = goodsID
        appoinetmentPack.State = isAppointment
        packInfo.GoodsList.append(appoinetmentPack)
    packInfo.GoodsCount = len(packInfo.GoodsList)
    NetPackCommon.SendFakePack(curPlayer, packInfo)
    return