xdh
2018-10-13 a435173f3522ff1260ab5ba4e8d8db984c39c371
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
½Á[c@sÄddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    d„Z
d„Z d„Z d„Z d„Zd„Zd„Zd    „ZdS(
iÿÿÿÿNcCs™|dks|dkrgStjd|ƒ}|s8gS|jƒ}|t|ƒkr`|dn||}|dt|ƒkrŽ||dn|dgS(Nit ActFlashSaleiÿÿÿÿi(t IpyGameDataPYtGetIpyGameDatatGetShopTypeListtlen(tcfgIDtdayIndextstatetipyDatat shopTypeListttodayShopTypeList((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pyRs &cCst|ƒdS(N(t__CheckPlayerflashSaleAction(t    curPlayer((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pyt OnPlayerLogin*s
cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}|jƒdkrLqnt|ƒqWdS(Ni(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextGetIDR (t playerManagertindexR ((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pytRefreshflashSaleActionInfo/s c
Cs|jƒ}tjjtjiƒ}|jtjdƒ}|jtjdƒ}|jtjdƒ}|jtj    dƒ}|j
t j dt j ƒ}|j
t jdt j ƒ}|j
t jdt j ƒ}    t}
||ksç||krít}
|r,tjd|ƒ} | jƒ} tj| dt jƒ} nd} |    | kr^tjdƒ|jt j ƒnt|||ƒ}|r‰tj||ƒntj|t j |t j ƒtj|t j|t j ƒtjd|||||||    f|ƒntjd|ƒ|rt|ƒt |ƒn|
S(NiRt
timeFormats    ÏÞʱÇÀ¹º»î¶¯ÖØÖÃ!ssÏÞʱÇÀ¹ºµ¥³¡ÖØÖÃ! actID=%s,playerActID=%s,dayIndex=%s,state=%s,playerActState=%s,shopTypeList=%s,playerMailState=%ssÏÞʱÇÀ¹º»î¶¯ID²»±ä£¬²»´¦Àí£¡(!t GetPlayerIDt
PyGameDatatg_operationActionDicttgett ShareDefinetOperationActionName_FlashSalet    ActKey_IDt ActKey_Statet ActKey_CfgIDtActKey_DayIndextNomalDictGetPropertytChConfigtDef_PDict_FlashSaleIDtDef_PDictType_FlashSaletDef_PDict_FlashSaleStatetDef_PDict_FlashSaleMailStatetFalsetTrueRRt GetStartDateRtChangeTimeStrToNumtTYPE_Time_Format_DaytDebugLogtClearNomalDictRtFunctionNPCCommontResetShopItemBuyCountByShopTypet PlayerControltNomalDictSetPropertytSync_flashSaleActionInfotSync_FlashSaleAppointmentInfo(R tplayerIDtactInfotactIDRRRt playerActIDtplayerActStatetplayerMailStatetisResettflashSaleIpyDatat    startDatet startTimeNumR    ((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pyR :s>    ,
 cCstj|tj|ƒsdS|jtjdtjƒ}|rAdStjj    t
j iƒ}|scdS|j    t
j dƒ}|s‚dSt jd|ƒ}|sždS|jƒ}|jƒ}| sÏ|jƒ|krÓdS|jƒ}|jƒ}    |jƒ}
|jƒ} |
s| rdS|jƒ} tjjd||
dftjƒtjd| ƒ} tjjd|    | dftjƒ}tjƒ}| |ko¡|knrtj||jƒg|jƒƒtj |dtj!ƒ}tj"|tj|tjƒtj#d|jƒƒndS(NiRs%s %s:00tminutesiÿÿÿÿRs    ·¢ËÍÐÂÏÞʱÇÀ¹ºÓʼþÌáÐÑ!($RtSetPlayerTickTimeR#tTYPE_Player_Tick_FlashSaleR"R'R%RRRRRR RRt
GetMailKeyt
GetLVLimittGetLVR*t
GetEndDatetGetStartTimeListtGetEndTimeListtGetAdvanceMinutestdatetimetstrptimetTYPE_Time_Formatt    timedeltatGetCurrentTimeR1t SendMailByKeyRtGetMailItemPrizeR+R,R2R-(R ttickR:R6RR<tmailKeytLVLimitR=tendDatet startTimeListt endTimeListtadvanceMinutest    startTimetendTimet curDateTimeR>((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pytProcessFlashSaleMaildsD       7& "cCsJtjjtjiƒ}|s"dS|jtjdƒ}|sAdStjd|ƒ}|s]dS|jƒ}|j    ƒ}|j
ƒ}t |ƒt |ƒkr®t j d|ƒdSt jƒjtjƒd}tjƒ}t j|jƒ|ƒ|_t j|jƒ|ƒ|_|jƒ|_g|_xLt|ƒD]>\}    }
tjƒ} |
| _||    | _|jj| ƒq1Wt |jƒ|_ |j!ƒ|_"|j#ƒ|_$g|_%xut|ƒD]g\} } xXt| ƒD]J\}}tj&di|d6t't'ƒ}|s    qÒntj(ƒ}| |_)||_*g|_+xÇ|D]¿}tj,ƒ}|j-ƒ|_.|j/ƒsjdn |j/ƒd|_0|j1ƒ|_2|j3ƒ|_4|j5ƒ|_6|j7ƒ|_8|j9ƒ|_:|j;ƒ|_<|j=ƒ|_>|j+j|ƒq7Wt |j+ƒ|_?|j%j|ƒqÒWq¹Wt |j%ƒ|_@tAjB||ƒdS(NiRs%ÏÞʱÇÀ¹º¿ª¹ØÊ±¼äʱ·ÖÅäÖôíÎó!cfgID=%sitStoretShopType(CRRRRRR RRRRFRGRRtErrLogt GetGameWorldtGetGameWorldDictByKeytDef_Notify_WorldKey_ServerDaytChPyNetSendPackttagMCFlashSaleInfotGetOperationActionDateStrR*t    StartDateREtEndtDateRHtAdvanceMinutest ActivityTimet    enumeratettagMCFlashSaleTimet    StartTimetEndtTimetappendtActivityTimeCountt GetIsDayResett
IsDayResetRCtLimitLVtShopInfotGetIpyGameDataByConditionR)ttagMCFlashSaleShoptDayIndext    TimeIndext GiftbagInfottagMCFlashSaleGiftbagRtGiftIDt GetLimitCntt BuyCountLimittGetServerLimitCnttServerBuyCountLimitt GetMoneyTypet    MoneyTypet GetMoneyNumt MoneyNumbertGetMoneyOriginalt MoneyOriginalt    GetItemIDtItemIDt
GetItemCntt    ItemCountt    GetIsBindtIsBindt GiftbagCountt    ShopCountt NetPackCommont SendFakePack(R R6RR<R    RTRUt openServerDaytpackInfotiRWttimeInfoRtshopListt    timeIndextshopTypetshopItemIpyDataListtshopt itemIpyDatatgiftBag((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pyR3‹sp                                 %cCs†tjƒj|ƒ}|j}tjjtjiƒ}|s@dS|jtj    dƒ}|s_dSt
j |t j ||jt jƒdS(Ni(RRRtGoodsIDRRRRRR R1R2R#tDef_PDict_FlashSaleYYtStateR%(RtpackDataRPR tgoodsIDR6R((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pytOnFlashSaleAppointmentÚs    #cCsttjjtjiƒ}|s"dS|jtjdƒ}|sAdStjd|ƒ}|s]dStj    ƒ}g|_
|j ƒ}xÍt |ƒD]¿\}}x°t |ƒD]¢\}}    tj di|    d6ttƒ}
|
sÛq¤nxhtt|
ƒƒD]T} |d|d| } |jtj| dtjƒ} | rî|j
j| ƒqîqîWq¤Wq‹Wt|j
ƒ|_tj||ƒdS(NiRR[R\i'id(RRRRRR RRRattagMCFlashSaleAppointmentInfot    GoodsListRRhRrR)RRR"R#R™R%Rlt
GoodsCountR‹RŒ(R R6RR<RŽR    RR‘R’R“R”Rt    goodsMarkt isAppointment((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pyR4ès2      (RRR1RR/RaR‹RR#RIRR RR RZR3RR4(((s_.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerFlashSale.pyt<module>s"                            *    '    O