xdh
2019-02-21 92eee67f85cbd29feb1287ae5a15ad0c787e95cb
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
x{[c@sÄdZddlZddlZddlZddlZddlZddlZddlZd„Zd„Z    d„Z
d„Z d„Z d„Z d    „Zd
„Zd „Zd „Zdd „ZdS(sVersion = 2015-04-28 17:00iÿÿÿÿNc        Csítƒ}xQt|jƒƒD]=}|j|ƒ}|jƒ}||kr|jdƒqqWdtj|g}tj    ƒ}xjtd|j
ƒƒD]S}|j |ƒ}|dks’|j ƒ rÆq’n|jddd|t|ƒƒq’WdS(Nis%stShopItem(t__GetShopItemRecDatatrangetCounttAtt    GetValue1t    SetValue3t ShareDefinetDef_ShopItem_ClearBuyCntt    GameWorldtGetPlayerManagertGetPlayerCounttGetPlayerByIndextNonet    GetInitOKtMapServer_QueryPlayerResulttlen(    tshopIDtrecTypeListDatatindextrecDatat    curShopIDt
resultNamet playerManagertit    curPlayer((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pytDoShopItemClearBuyCnt#s       #c    CsÒ|d}g}|tjkrT|d}|d}t||ƒ}|||g}nz|tjkrÎ|d}|d}|d}|d}    t||gƒ}|j|dƒ}
|
||    krÅdnd} tjd|
||    | fƒ| r³t|||ƒ}
dtj|||
g} tj    ƒ} x‹t
d| j ƒƒD]q}| j |ƒ}|dks;|jƒ roq;n|jƒ|jƒkrq;n|jddd| t| ƒƒq;Wn||||| |
g}n|S(    Niiiiis?¹ºÂòÈ«·þÏÞ¹ºÎïÆ·£ºÈ«·þÒѹºÂò=%s,Óû¹ºÂò=%s,×î´ó¹ºÂò=%s,canBuy=%ss%sR(RtDef_ShopItem_QueryServerBuyCntt__GetShopItemServerBuyCntDicttDef_ShopItem_BuyItemtgetR    tDebugLogt__AddShopItemServerBuyCnttDef_ShopItem_SyncServerBuyCntR
RR R R Rt GetPlayerIDRR(RtmsgListt    queryTypetresultRtlimitIndexListt
buyCntDictt itemShopIndextbuyCounttserverMaxBuyCntt serverBuyCnttcanBuytsyncInfoRRtplayer((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pytDoShopItemQueryResult@s>
 
 
 
 
 
 
       &c
CsÝtƒ}d}xbt|jƒƒD]N}|j|ƒ}|jƒ}|jƒ}||kr"||kr"|}q"q"W|dkr¶|jƒ}|j|ƒ|j    |ƒ|j
dƒn|j ƒ}    |    |7}    |j
|    ƒ|    S(Ni( RR RRRRt    GetValue2tAddRect    SetValue1t    SetValue2Rt    GetValue3(
RR(t addBuyCountRt shopItemRecRRRtcurItemShopIndextbuyCnt((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyR vs"            
 c
Cs®d}i}tƒ}x’t|jƒƒD]~}|j|ƒ}|jƒ}|jƒ}|jƒ}    ||kr(||kr(|    ||<|d7}|t|ƒkr¦Pq¦q(q(W|S(Nii(RRRRRR0R4R(
Rt    indexListtfindCntR'RRRRR(R8((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyR’s       
 
 cCs(tj}tjƒ}|j|ƒ}|S(N(Rt!Def_UniversalGameRecType_ShopItemR    tGetUniversalRecMgrt GetTypeList(trecTypetuniversalRecMgrR((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyR¨s     cCsœtjdƒ}tjƒ}xz|jƒD]l}|jtj|ƒ}|sPq(n|jtj|ƒ}tj    tj||ƒtj    tj||ƒq(WdS(NtTimeShopRefresh(
t ReadChConfigtGetEvalChConfigR    t GetGameWorldtkeyst GetDictByKeyRtDef_Notify_WorldKey_ShopStatet'Def_Notify_WorldKey_TimeShopRefreshTimetSendMapServerMsgEx(tTimeShopRefreshDictt    gameWorldRtisOpentlastRefreshTime((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pytOnMapServerInitOK±s cCst|ƒdS(N(tSync_TimeShopRefreshTime(R((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyt OnPlayerLoginÈs
cCs||ttjƒd}yt|ƒ}Wn#tk
rLtjd|ƒdSXtjdƒ}||krxt    ||ƒndS(NisÉ̵êIDÅäÖÃkey´íÎó, key=%sR@(
RRRFtintt BaseExceptionR    tErrLogRARBt__DoTimeShopStateChange(tdictNameRKRRI((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pytOnShopStateChangeÐs  cCsa|s
dSttjƒƒ}tjƒ}|jtj||ƒtjtj||ƒtƒdS(N(    RPttimeR    RCtSetDictRRGRHRN(RRKtcurTimeRJ((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyRSãs c
Cstjtj|ƒsdStjdƒ}t}ttjƒƒ}tj    ƒ}x´|j
ƒD]¦\}}|j t j |ƒ}|s‡qYn|j t j|ƒ}|s©qYntd||ƒ}    |    |krY|jt j||ƒtjt j||ƒt}qYqYW|rtƒndS(NR@i(R    tSetWorldDictKeytChConfigtTYPE_TimeShopProcessTickRARBtFalseRPRVRCtitemsRERRFRGtmaxRWRHtTrueRN(
ttickRItisNeedSyncTimeRXRJRtrefreshIntervalRKRLtpastTime((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pytDispose_ShopItemRefreshôs*   
c Cs¶tjƒ}|jƒg|_tjdƒ}tjƒ}tt    j    ƒƒ}x¶|j
ƒD]¨\}}|j t j |ƒ}|s‡qYn|j t j|ƒ}|s©qYntd||ƒ}    tjƒ}
|
jƒ||
_td||    ƒ|
_|jj|
ƒqYWt|jƒ|_|jdkr*dS|s¢tjƒ} xstd| jƒƒD]I} | j| ƒ}|dksR|jƒdkr‹qRntj||ƒqRWntj||ƒdS(NR@i(tChPyNetSendPackttagGCShopRefreshTimeListtCleartShopTimeInfoListRARBR    RCRPRVR]RERRFRGR^ttagGCShopRefreshTimetShopIDt RemainSecondtappendRtShopCntR
RR R R R"t NetPackCommont SendFakePack( RtrefreshTimeListPackRIRJRXRRbRKRLtpassTimetrefreshShopTimeRR((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyRNs> 
      
     (t__doc__R    ReRnRARRZRVRR/R RRRMRORURSRdR RN(((sT.\ServerPython\CoreServerGroup\GameServer\Script\GameWorldLogic\GameWorldShopItem.pyt<module>s$               6                                    '