hwj35
2025-06-23 aa0f971ae9a59f0fd98d57b6c1d1663a270be92c
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
¤9gc@sÙddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z dZ d„Z d„Zd„Zd„Zd„Zd„Zd    „ZdS(
iÿÿÿÿNi
cCs‡x€tjjtjiƒjƒD]`}|jtjdƒ}t||ƒ}| r|jtjƒrt    ||ƒt
||ƒqqWdS(Ni( t
PyGameDatatg_operationActionDicttgett ShareDefinetOperationActionName_BuyOnetvaluest ActKey_ActNumt__CheckPlayerBuyOneActiont ActKey_StatetSync_BuyOneActionInfotSync_BuyOnePlayerInfo(t    curPlayertactInfotactNumtisReset((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pyt OnPlayerLogin!s% cCs^tjƒ}xKt|jƒƒD]7}|j|ƒ}tj|ƒsIqnt||ƒqWdS(N(t    GameWorldtGetPlayerManagertxrangetGetPlayerCounttGetPlayerByIndextIsNormalPlayerR(R t playerManagertindexR ((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pytRefreshBuyOneActionInfo-s cCs-|jƒ}tjtj|ƒ}|jtjdƒ}|jtjdƒ}|jt    j
|ƒ}||kr‹tj d||jƒƒdStj d|||f|ƒt j |t    j
||ƒx4ttƒD]&}t j |t    j||fdƒqÏW|r)t||ƒt||ƒt||ƒntS(Nis%ÂòÒ»ËͶà»î¶¯ID²»±ä£¬²»´¦Àí£¡ actID=%ss2ÂòÒ»ËͶà»î¶¯ÖØÖÃ! actID=%s,playerActID=%s,state=%s(t GetPlayerIDRt
GetActInfoRRRt    ActKey_IDRtNomalDictGetPropertytChConfigtDef_PDict_BuyOneIDtDebugLogt PlayerControltNomalDictSetPropertytrangetRecordIndexMaxtDef_PDict_BuyOneFreeItemStatet__ResetCTGIDCountR    R
tTrue(R R tplayerIDR tactIDtstatet playerActIDti((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pyR8s"  $  c    Cs¿|jtjƒ}|jtjdƒ}tjd|ƒ}|sCdStj|||ƒ}|sbdStjd|ƒ}|s~dSg}x!|D]}|j    |j
ƒƒq‹Wt j |d|ƒdS(Nit    ActBuyOnetActBuyOneTemplate( RRt ActKey_CfgIDtActKey_DayIndext IpyGameDataPYtGetIpyGameDataRt GetTemplateIDtGetIpyGameDataListtappendt GetNeedCTGIDt
PlayerCointDoResetCTGCountByIDList(    R R tcfgIDtdayIndextipyDatat
templateIDttempIpyDataListtresetCTGIDListt tempIpyData((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pyR%Xs  c    CsC|jƒ}tj|dƒ}|dkrBtjd||ƒdS|d}|d}tjtj|ƒ}|jtjƒs•tjd||ƒdS|jtj    ƒ}|jtj
dƒ}t j d|ƒ}    |    sØdStj |    ||ƒ}
|
s÷dSt jd|
ƒ} | sdSd} g} xQ| D]I}||jƒkrDq&n|jƒ} |jƒ}|j|gƒ} Pq&W| s| r¨tjd|||
||f|ƒdS|jtj| ƒ}|sëtjd    |||
|| f|ƒdS|jtj||fƒ}|td
|ƒ@rAtjd |||
||f|ƒdStj|| ƒsWdS|td
|ƒO}tj|tj||f|ƒt||ƒx6| D].\}}}tj||||tjgƒqžWi|
d 6|d 6|d6|d6t | ƒd6|d6}t!j"|d|ƒtjd|||
||| f|ƒdS(s‡»î¶¯Ãâ·Ñ½±Àø
    @param awardIndex: ½±ÀøË÷Òý = recordIndex*100 + freeIndex
    @param actNum: »î¶¯±àºÅ£¬Èç11 »ò  12 ´ú±í²»Í¬µÄ»î¶¯
    is!ûÓÐÖ¸¶¨ÁìÈ¡µÄ»î¶¯±àºÅ! actNum=%sNids'ÂòÒ»ËÍÒ»·Ç»î¶¯ÖÐÎÞ·¨ÁìÈ¡½±Àø! actNum=%sR,R-sXÂòÒ»ËÍÒ»»î¶¯Ã»Óиý±ÀøÐÅÏ¢! actNum=%s,cfgID=%s,templateID=%s,recordIndex=%s,freeIndex=%ssdÂòÒ»ËÍÒ»»î¶¯¸Ã½±ÀøÎ´³äÖµ£¬ÎÞ·¨Ãâ·ÑÁìÈ¡! actNum=%s,cfgID=%s,templateID=%s,recordIndex=%s,needCTGID=%sis^ÂòÒ»ËÍÒ»»î¶¯ÒѾ­ÁìÈ¡¹ý¸ÃÃâ·Ñ½±Àø! actNum=%s,cfgID=%s,templateID=%s,recordIndex=%s,freeIndex=%sR;R8t recordIndext    freeIndext freeItemListR sfÂòÒ»ËÍÒ»»î¶¯ÁìÈ¡Ãâ·Ñ½±Àø! actNum=%s,cfgID=%s,templateID=%s,recordIndex=%s,freeIndex=%s,freeItemList=%s(#RRtToIntDeftLogRRRRRR.R/R0R1R2R3tGetRecordIndexR5tGetFreeItemInfotErrLogRRtDef_PDict_CTGGoodsBuyCountR$tpowt ItemControlertCheckPackSpaceEnoughR R!R
tGivePlayerItemt IPY_GameWorldtrptItemtstrtDataRecordPacktDR_FuncGiveItem(R t
awardIndexR R'R?R@R R8R9R:R;R<t    needCTGIDRAR>t freeItemInfot totalBuyCountt awardRecordtitemIDt    itemCountt isAuctionItemt addDataDict((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pytGetBuyOneFreeAwardjst  
 
                 #    cCs‡tjƒ}||_g|_x@ttƒD]2}|jtj||fƒ}|jj    |ƒq+Wt
|jƒ|_ t j ||ƒdS(N(tChPyNetSendPackttagMCActBuyOnePlayerInfotActNumtFreeRecordListR"R#RRR$R4tlentFreeRecordCountt NetPackCommont SendFakePack(R R t
clientPackR+RU((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pyR
¹s         cCs{tjtj|ƒ}|jtjƒs+dS|jtjƒ}|jtjdƒ}tj    d|ƒ}|sndStj
|||ƒ}|sdStj d|ƒ}|s©dStj |ƒ\}}    |jtj |ƒ}
tjƒ}||_|
|_|    |_|jƒ|_|jƒ|_g|_x1|D])} tjƒ} | jƒ| _| jƒ| _g| _| jƒ} | jƒ}|j ƒx©|D]¡}tj!ƒ}||_"g|_#| |}xN|D]F\}}}tj$ƒ}||_%||_&||_'|j#j(|ƒq¿Wt)|j#ƒ|_*| jj(|ƒqŠWt)| jƒ| _+|jj(| ƒq(Wt)|jƒ|_,t-j.||ƒdS(NiR,R-(/RRRRRRR.R/R0R1R2R3tGetOperationActionDateStrtActKey_StartDateSyncR[ttagMCActBuyOneInfoR]t    StartDatetEndtDatet
GetLVLimittLimitLVt GetIsDayResett
IsDayResett GiftbagListttagMCActBuyOneInfoGiftbagR5tCTGIDRDt RecordIndext FreeGiftListREtkeystsortttagMCActBuyOneInfoFreeGiftt    FreeIndext FreeItemListttagMCActBuyOneInfoFreeItemtItemIDt    ItemCounttIsBindR4R_t FreeItemCountt FreeGiftCountt GiftbagCountRaRb(R R R R8R9R:R;R<t startDateStrt
endDateStrt startDateSyncR>tgiftbagRSt freeIndexListR@tfreeGiftRARVRWRXtfreeItem((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pyR    Åsb                         
          
             (RRR R0R[RORaRIRLR6RRR#RRRR%RZR
R    (((soE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerActBuyOne.pyt<module>s&                                   O