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
w¼fc@s¶ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZdZiad„Zd„Zd„Zd„Zged„Zd„Zd    „Zd
„Z d „Z!d „Z"d „Z#d„Z$d„Z%d„Z&d„Z'd„Z(d„Z)d„Z*d„Z+d„Z,ej-iedd„Z/d„Z0dd„Z1d„Z2d„Z3d„Z4d„Z5d„Z6d„Z7d „Z8d!„Z9d"„Z:d#„Z;d$„Z<d%„Z=d&„Z>d'„Z?d(„Z@d)„ZAd*„ZBd+„ZCid,„ZDd-„ZEdS(.iÿÿÿÿNicCs|jƒ}|dkrdS|jƒtjkr5dStjƒj|jƒƒ}|j    ƒ}|j
t j |ƒ|j dƒ|jtjƒtS(Ni(t GetActionObjtNonetGetGameObjTypet IPY_GameWorldtgotNPCt    GameWorldt GetNPCManagert GetNPCByIndextGetIndextGetNPCIDtSetDicttChConfigtDef_PlayerKey_TradeTagNPCtSetForbiddenResetItemtBeginSpecialEventt ShareDefinetTYPE_Event_ShoptTrue(t    curPlayerttickt curActionObjt curActionNPCtcurActionNPCID((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt
StartTradeTs    cCsdS(Ni((((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetDirectNpcIDlscCstj|ƒtS(N(t
EventShellt DoExitEventR(RR((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt    ExitEventus cCs¡tjƒj|ƒ}||jtjƒtjtjkr?dS|jtj|ƒ|j}tj    ƒj
|ƒtj    ƒj ƒ}|dkrdS|j |ƒdS(Ni( RtGetPlayerManagertGetPlayerByIndext GetTickByTypeR tTYPE_Player_Tick_QueryFuncDatatTYPE_Player_Tick_Timet SetTickByTypet    NPCShopIDt GetGameDatatFilterShopItemByShopTypetGetFilterShopItemCountt BeginShopEx(t playerIndext
clientDataRRt tradeTagNPCt shopItemCount((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytQueryNPCShopItems      c
Cstjƒ}g|_|rExÁ|D]}t|||j|ƒq"Wnštjƒ}x‹t|jƒƒD]w}|j|ƒ}|j    ƒs‹qdnt
j |j ƒ}|j |ƒ}    |    dkr¿qdnt||j ƒ|j|ƒqdWt|jƒ|_tj||ƒdS(Ni(tChPyNetSendPackttagMCShopItemDayBuyCntInfot DayBuyCntListt__AppendShopItemDayBuyCntInfot IpyGameDataPYtIPY_Datatxranget GetStoreCounttGetStoreByIndext GetLimitCntR tDef_PDict_ShopItemDayBuyCnttGetIDtNomalDictGetPropertytlentCountt NetPackCommont SendFakePack(
Rt itemIndexListtisResett dayBuyCntInfot    itemIndext
ipyDataMgrtitshopItemt dayBuyCntKeyt curDayBuyCnt((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytSyncShopItemTodayBuyCount¡s$          cCsZtjƒ}||_tj|}|j|ƒ}||_t|ƒ|_|j    |ƒdS(N(
R,ttagMCShopItemDayBuyCntt    ItemIndexR R6R8tBuyCnttinttIsResettappend(RR@t dayBuyCntListR>t itemDayBuyCntRDRE((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR/¼s           cCsWt|ƒt|ƒ|jtjdƒsIt|ttjƒj    ƒƒnt
|ƒdS(Ni( tSyncMysticalLimitShopInfoRFR8R tDef_PDict_MysticalShopGoodst__DoMysticalShopRefreshRRt GetGameWorldtGetTicktSyncMysticalShopInfo(R((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnLoginÇs 
 
 
cCs|tjkrEt|ƒdg}tj|tjdƒt|ƒn°|tjkrñdg}t    j
ƒj tj ƒ}t    j
ƒj tj ƒ}|rÎt    j
ƒj tjƒ}|ddkrî|jdƒqîqõ|ddkrõ|jdƒqõndSt||ƒdS(Niiii(RtDef_OnEventTypetOSSaleOpenMailt PlayerControltNomalDictSetPropertyR t Def_PDict_MysticalShopRefreshCntRTtDef_OnEventTypeExRRRtGetGameWorldDictByKeytDef_Notify_WorldKey_ServerDaytDef_Notify_WorldKey_IsMixServert Def_Notify_WorldKey_MixServerDayRLtResetShopItemBuyCount(Rt onEventTypet refreshTypet openServerDayt isMixServert mixServerDay((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt ShopItemOnDayÒs$
          cCsK|tjkrdg}n|tjkr6dg}ndSt||ƒdS(Nii(RRVR[R`(RRaRb((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnWeekìs   cCsH|tjkrd}n|tjkr0d}ndSt||gƒdS(Nii(RRVR[R`(RRaRb((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnMonthùs        cCsd}t||gƒdS(Ni(R`(RRb((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnCrossPKSeasonChangescCsû|s
dSg}tjƒ}x¿t|jƒƒD]«}|j|ƒ}|jƒsVq/n|jƒrhq/n|jƒ|kr€q/ntj    |j
ƒ}|j |ƒ}|dkr´q/nt j ||dƒ|j|j
ƒƒq/W|r÷t||tƒndS(Ni(R0R1R2R3R4R5tGetRefreshLimittGetRefreshTypeR R6R7R8RXRYRLRFR(Rt resetTypeListt syncIndexListRARBRCRDRE((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR`    s*    cCsñg}tjƒ}x¿t|jƒƒD]«}|j|ƒ}|jƒsLq%n|jƒr^q%n|jƒ|krvq%ntj    |j
ƒ}|j |ƒ}|dkrªq%nt j ||dƒ|j|j
ƒƒq%W|rít||tƒndS(Ni(R0R1R2R3R4R5Rjt GetShopTypeR R6R7R8RXRYRLRFR(Rt shopTypeListRmRARBRCRDRE((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytResetShopItemBuyCountByShopType$s&    c    CsÚtjdidd6tƒ}|s&dSttjƒƒ}g}x‚|D]z}|jƒ}||krE||krE|jƒ}tj|t    j
||ƒ|j |ƒt j d||jƒƒqEqEW|rÖt|ƒndS(NtStoreitShopTypesÉñÃØÏÞ¹ºÉÌÆ·%s ¿ªÂô(R0tGetIpyGameDataByConditionRRJttimet
GetLimitLVR7RXRYR tDef_PDict_ShopItemStartTimeRLRtDebugLogRO(    RtbefLVtaftLVt ipyDataListtcurTimet syncGoodsListtipyDatatlimitLVtgoodsID((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytMysticalLimitShopOpen:s    ! cCstjƒ}g|_tjdidd6tƒ}ttjƒƒ}x|D]•}|jƒ}|j    t
j |ƒ}|s~qJn|||j ƒkr±t j|t
j |dƒqJtjƒ}||_||_|jj|ƒqJW|jsðdSt|jƒ|_tj||ƒdS(NRqiRri(R,ttagMCMysticalShopTimeInfot ShopTimeListR0RsRRJRtR7R8R Rvt GetLimitValueRXRYttagMCMysticalShopTimetGoodsIDt    StartTimeRLR9R:R;R<(RtpackDataRzR{R}Rt    startTimet    goodsTime((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyROLs(                    cCs†|jƒ}tjƒtj|tjƒ}|jddd|j}tj    ddƒ}|r‚||dkr‚t
|t |ƒndS(Nii<tMysteryShopRefreshii( tGetCreateRoleTimeRtGetCurrentTimetGetDateTimeByStrR tTYPE_Time_FormattdaystsecondsR0t
GetFuncCfgRQR(RRtcreateRoleTimetdiffTimet pastSecondst refreshTime((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckMysticalShopRefreshes cCs)tjƒj|ƒ}t|t|ƒdS(N(RRRRQtFalse(tindexR(RR((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytOnMysticalShopRefreshtsc,    Csµtjddƒ}|sdS|jtjƒ}|rH||dkrHdS|jtj|ƒts…tjƒ}xt|j    ƒƒD]þ}|j
|ƒ}|j ƒ}|j ƒ}    tj d|    ƒ}
|
sËq€n|
jƒ} |
jƒ} t|ƒ} | tkr| digt| <i}n| t| dkrAgt| d| <n|j| dƒ| || <t| d| j|| |    gƒq€WntsdS|jƒ}tjt|ƒ\}}|s½dStjddƒ}tjtjddƒƒ}|sôdSd}|s|jƒjtjƒ}tjddƒ}tjddƒ}|jtjƒ}g|jƒD]}t|ƒ^q[}|j ƒ|t!|d    ƒ}x.|D]&}||kr˜|t!|ƒ}Pq˜q˜Wt"j#|||ƒ\}}}}d} |s*|tjdd
ƒ} t$j%|tj&| tj'ƒs*dSnt"j(||||t)dƒ|jtj*ƒ}!|!d |!d }"}#||#krdn|"d}$t+|$d |tj,ƒ}%t$j-|tj*|%ƒtjdd ƒ}&||&krü|$|&|dkrü|&|d}nt$j-|tj|dƒnt+||ƒ}||}'g}(|ri|(tj.|jtj&gƒ|gƒ7}(n|'rš|(tj.|jtj/gƒ|'gƒ7}(n|rÓ||(krÓ||(d<tj0d ||$|fƒntj0d|||'|(fƒg})x•t|ƒD]‡}|t1|(ƒkr%|(|nd}    t$j-|tj2||    ƒtj3|    }*|j|*ƒ}+|+rt$j-||*dƒ|)j|    ƒqqW|)r§t4||)t5ƒnt6|ƒdS(NRŠiièRqiitMysteryShopGoodsiiÿÿÿÿii'isEÉñÃØÉ̵êË¢ÐÂÌØÊâ¹æÔò£¬µÈ¼¶¶Î£º%s,updLVRefreshCnt=%s,specialGoodsID=%ssJÉñÃØÉ̵êË¢ÐÂisFree=%s,goldGoodsCnt=%s,sliverGoodsCnt=%s,goodsResultList=%s(7R0R‘t GetDictByKeyR t"Def_PlayerKey_MysticalShopLastTimeR
tg_mysticalShopDictR1R2tGetMysteryShopCounttGetMysteryShopByIndext
GetLVRanget
GetGoodsIDtGetIpyGameDatat GetMoneyTypeRƒttupletgetRLtGetLVRtGetDictValueByRangeKeytGetResultByRandomListtGetFuncEvalCfgtGetItemManagertGetPackRtrptItemR8RZtkeysRJtsorttstrt
ItemCommontGetItem_FromPack_ByID_ExExRXtPayMoneytTYPE_Price_Gold_MoneytDef_Cost_MysteryShopRefresht
ReduceItemR—t"Def_PDict_MysticalShopLVRefreshCnttmintDef_UpperLimit_DWordRYtGetResultByRandomListExtTYPE_Price_Silver_MoneyRwR9RPR6RFRRT(,RtisFreeRR•tlastTimetipyMgrRBR}tlvRangeRt goodsIpyDatat    moneyTypetweighttlvkeyt
weightDicttplayerLVtcurLVDantshopDicttmaxCntt goldGoodsCnttspecialGoodsIDtitemPackt
costItemIDtcostItemCntDictt curRefreshCnttcnttcntListt costItemCnttenought    indexListthasBindtlackCnttcostGoldtcurLVRefreshDatatcurLVRefreshCnttlvDantupdLVRefreshCnttupdLVRefreshDatatspecialRefreshCfgtsliverGoodsCnttgoodsResultListRmRDRE((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRQys²           * %
  ! 
++
" 
cCs´tjƒ}|jtjƒ|_g|_tjddƒ}xOt    |ƒD]A}|jtj
|ƒ}tj ƒ}||_ |jj |ƒqIWt|jƒ|_tj||ƒdS(NRši(R,ttagMCMysticalShopInfoR8R RZt
RefreshCntt    GoodsListR0R‘R2RPttagMCMysticalShopGoodsR…RLR9R:R;R<(RR‡RÇRBRt    goodsInfo((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRTÜs          c     Cs¶|j}|jƒjtjƒ}||jƒkr7dS|j|ƒ}| sY|jƒr]dS|jƒ}tj    |ƒ}|j
tj |j ƒ||j ƒƒs¼tj|dtj gƒdSt||ƒ\}}    t|ƒ|}|     sï| ródSi|j ƒtj6}
tj||    |tj|
ƒs+dS|jtj |ddtigƒt|jtjƒƒ} | jt|dƒdƒ} | dkr–d} ntj|tjt| ƒƒdS(NtGeRen_chenxin_676165teventt BuyItemBackitt0(tIndexRªR«Rt
rptRecycletGetCounttGetAttIsEmptyt ItemControlertPlayerItemControlert CanPutInItemR¬t GetItemTypeIDt    GetIsBindRXt
NotifyCodet__GetItemSellPriceRJR tDef_Cost_Reason_SonKeyR²tDef_Cost_BuyItemBackt    PutInItemR—R¯R8tDef_Player_Dict_DelPackIndextreplaceRY( Rt
clientPackRR˜tbackPacktcurItemt realPutCountt itemControlt    itemPricet    priceTypetinfoDictt
itemIndexs((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRåîs:          "     c Csei}d}xg|jƒD]Y\}    }
|
dkr7qntjƒj|    ƒ} | sVdS|r‡|    |kr‡||    } tjd| ƒ} ntj|    |ƒ} | s£dS| jƒ} | j    ƒ}| j
ƒ}| j ƒ}| j ƒ}|rd|d}|j tj| ƒ}td||ƒ}||
krWtjd|| |    ||||
f|jƒƒdS|
|| <n||
|7}qW|dkr†dS|rŸtj|||ƒStjd|||||f|jƒƒtj|||||ƒsçdS|rag}x[|jƒD]M\} }
|j tj| ƒ}tj|tj| ||
ƒ|j| ƒqWt||ƒntS(s/ Ö§¸¶×Ô¶¯¹ºÂòÎïÆ·ÏûºÄ£¬´ÓÉ̳ÇÖйºÂò£¬Ö±½Ó¿ÛÇ®£¬²»²úÉúÎïÆ·
            Ò»°ãÓÃÓÚ»ù´¡É̵ê×Ô¶¯¹ºÂòÎïÆ·£¬²»¿¼ÂǸ´ÔÓµÄÏÞ¹ºÂß¼­
    @param isCheck: ÊÇ·ñÖ»ÊǼì²é£¬²»Ö´ÐÐʵ¼ÊÏûºÄÂß¼­
    @param shopItemIndexDict: Ö¸¶¨¹ºÂòµÄÉÌÆ·¶ÔÓ¦É̳DZíÉÌÆ·IDË÷Òý×ֵ䣬Èç¹ûûÓÐÖ¸¶¨ÉÌÆ·Ë÷Òý£¬Ôò°´ÏûºÄµÄ¼Û¸ñÀàÐÍ×Ô¶¯ËÑË÷É̳DZí
    iNRqse×Ô¶¯¹ºÂò´ÎÊý²»×㣡shopType=%s,itemIndex=%s,itemID=%s,limitBuyCnt=%s,curDayBuyCnt=%s,canBuyCnt=%s < %ss]¿Û³ý×Ô¶¯¹ºÂòÏûºÄ: lackItemDict=%s,priceType=%s,totalMoney=%s,costType=%s,addLimitCountInfo=%s(titemsRR#tGetItemByTypeIDR0R¢R°tGetShopItemPriceIpyDataR7RnR£t GetMoneyNumR5R8R R6tmaxtLogt GetPlayerIDRXt    HaveMoneyRwR²RYRLRFR(Rt lackItemDictRÿtcostTypeRtisChecktshopItemIndexDicttaddLimitCountInfot
totalMoneytitemIDRÔRûR@R}tshopTypet    itemMoneyt limitCntListt limitBuyCntREt    canBuyCntRm((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytPayAutoBuyItemsZ 
 
     &       c+ CsƒtjƒrdStjƒ}|jƒ}|dkr8dS|jƒ}|sNdStjd|ƒ}|sjdS|jƒ}|j    ƒ}|dkr¤t
j |ƒsÆdSn"|dkrÆt j |ƒsÆdSn|jƒ}|rî|jƒ|krîdS|jƒ}    |jƒ}
d} |    s|
rÒ|    s*dg}    n|
s<dg}
nt|    ƒt|
ƒkretjdƒdS|jƒ} d} x4t|    ƒD]&\} }| |kr Pn|
| } q„W| dkrÒtjd|ƒdSnd}tj|}| dkro|j|ƒ}td| |ƒ}|dkr:tjd||fƒdS||krotjd    ||||fƒ|}qon|jƒ}|dkr™t||ƒ}n|jƒ|jƒ|jƒ}}}|j ƒ}|j!ƒ|j"ƒ}}||9}|j#ƒ}|j$ƒ}g}|rAt%|||ƒ}|j&||||gƒnxC|D];\}}}t%|||ƒ}|j&||||gƒqHW|s«tj'd
|||fƒdSd} i}!x·t|ƒD]©\} }"|"d}|"d}#tj(ƒj)|ƒ}$|$stj'd ||fƒdStj*|$ƒ}%t+j,|%|$|#ƒ}&|!j-|%dƒ|&|!|%<| dkrÄ|} qÄqÄW| s{dStjd ||||| |!f|j.ƒƒ|j/ƒ}'t0}(xu|!j1ƒD]g\}%}&|&t2j3||%|&ƒkrÆt4}(|'rýPq-|j5|tj6ƒt7j8|d |%gƒdSqÆqÆW|(rC|'rC|'nd})t9|||| |j:ƒ|ƒr—tjd|||j:ƒf|j.ƒƒdSt7j;|||ƒsÃ|j5|tj<ƒdS|dkr`|j=tj>ƒdkrütjd|ƒdSd||||| | |)g}*tj?ƒj@|jAƒddd|*t|*ƒƒ|jBtj>dƒdStC||||| | |)|ƒdS(NiRqiis)    ¹ºÂòÎïÆ·LimitVIPLV  LimitCnt ³¤¶È²»Í¬iÿÿÿÿs    vip%s²ÅÄܹºÂòs6BuyShopItem ½ñÈÕ¹ºÂò´ÎÊýÒÑÂú£¡shopType=%s,itemIndex=%ssQBuyShopItem ÐÞÕý¹ºÂò´ÎÊý£¡shopType=%s,itemIndex=%s,clientBuyCount=%s,canBuyCnt=%ss@Store shop item error! shopType=%s,totalItemList=%s,itemPrice=%ss,Store shop item error! shopType=%s,itemID=%ssh¹ºÂòÎïÆ·: shopType=%s,itemIndex=%s,clientBuyCount=%s,totalItemList=%s,mainItemID=%s,needPackSpaceDict=%sRãRæsAStore shop item buy limit! shopType=%s,itemIndex=%s,limitValue=%ss1È«·þ¹ºÂò´ÎÊýÒѾ­ÔÚ²éѯÖÐ, ²»Öظ´²éѯ itemIndex=%ss%stGetStoreServerBuyCnt(DRt IsCrossServerRtIPY_CBuyItemListtGetBuyItemIndext GetBuyCountR0R¢RntGetOperationActionShoptPlayerSpringSaletIsSpringSaleShopTypetPlayerFlashSaletIsFlashSaleShopTypeRuR¦t GetLimitVIPLVR5R9RtGetVIPLvt    enumerateRwR R6R8RtGetServerLimitCntR·t    GetItemIDt
GetItemCntRñt GetItemListExR£RtGetJobt
GetJobItemtGetShopJobItemRLtErrLogR#RtGetItemPackTypeRítGetItemNeedPackCountR¥Rt
GetMailKeyR—RR°tGetItemPackSpaceRt
ShopResultt
tsrNoPlaceRXRòtCheckBuyItemLimitExRƒR    t
tsrNoMoneyR›tDef_PlayerKey_StoreQueryStateRtGameServer_QueryPlayerResultR7R
tDoBuyStoreItem(+RRt buyItemListR@tclientBuyCountR}RtoperationActionShopTypeR~tLimitVIPLVListt LimitCntListRtcurVIPlvRBtviplvRERDRtserverLimitCntRt    itemCounttisBindt
itemListExRÿRþtjobt jobItemListt totalItemListt    jobItemIDtitemIDExt itemCountExtisBindExt
mainItemIDtneedPackSpaceDicttitemInfotitemCntRûtpackTypet    needSpacetmailKeyt
isLackPackt sendMailKeytcmdStr((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytBuyItem_sò                              & 
 
 
      #  !      cCs3|stjd|ƒ}n|jƒ|jƒ}}    |    |9}    |jƒ}
tj||ƒ} i|d6|d6|
d6|d6|tj6} tj    |||    tj
| |ƒsÊt j d||||    fƒdStj||ƒ} |dkr.tj |}|j|ƒ}tj||||ƒt||gƒni|
d6|d6|d6|    d6|d    6| d
6| d 6}|tjgk}tj|ƒ}x9|D]1\}}}tj||td |ƒ}|sÃqn|jƒ}|stj|ƒ}|j||d tj||gƒs%|jƒqq%n
|jƒtj|||ƒ|jƒr{||kr{tjd|jƒ|j ƒ||gƒn|dkrt!j"|dtj#ƒ}|r¾t!j$||dƒq¾qqW|rítj%||j&ƒg|d|ƒntj'||
ƒt(|||ƒ|
t)kr/t*j+|||ƒndS(NRqt TotalItemListtClientBuyCountRrt ShopItemIndexsX¹ºÂòÉ̳ÇÎïƷʵ¼Ê¿Û³ý»õ±Òʱʧ°Ü: itemIndex=%s,clientBuyCount=%s,priceType=%s,itemPrice=%sit    ItemPricet    MoneyTypet BeforeMoneyt
AfterMoneyRRäii    itdetail(,R0R¢R£RRnRXtGetMoneyR RôR²tDef_Cost_BuyStoreItemRR+R6R8RYRFRRºRíRîtGetOutPutItemObjR—t GetUserDataR,RötItemGive_BuyItemtClearRtEventRespons_BuyItemt GetNotifyMarkt WorldNotifytGetNameR°tFindItemInPackByItemIDR¬tDelItemt SendMailByKeyR7tEventRespons_ShopBuytSyncShoppingResulttShopType_FairyCeremonytPlayerFairyCeremonytOnBuyFireworks(RR@R8RDRIRRQR}RÿRþRt beforeMoneyRt
afterMoneyRDREtdataDictt isForceEventRýRR?R@t
curItemObjtuserDataRMt delGuardItem((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR6ñs`
 !       $
    
+ % cCs™x’|D]Š}t|ƒttgkr@tjd||fƒ|S||kr|dksj|t|ƒkr…tjd||fƒ|S||dSqW|S(Ns3É̳ÇÖ°ÒµÎïÆ·×é¸ñʽ´íÎó!shopItemID=%s,jobItemList=%sis>É̳ÇÖ°ÒµÎïÆ·ÅäÖôíÎó,ûÓиÃÖ°Òµ¶ÔÓ¦ÎïÆ·ID!shopItemID=%s,job=%si(ttypetlistR¤RR+R9(RBRRCt jobItemIDList((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR*3s  cCs2tjƒ}||_||_tj||ƒdS(N(R,ttagMCShoppingResultRHtItemCntR;R<(RR@RLt
resultInfo((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRj@s
         c
Cs|dkrtj||ƒ S|d    krv|jƒdkr?tS|jƒ}|dkrl|jtjƒ}n||kS|d
kr¨tj    ƒj
t j ƒd}||kS|t krÈtj|||ƒ S|dkr|jtj|ƒ}ttjƒƒ}    | p|    ||kStS( Niii    i
iiii(ii    i
(i(t
PlayerRunetGetIsOpenByRuneIDt GetFamilyIDRt GetFamilyLVR8R tDef_Player_Dict_FamilyLVRRRR\RR]RkRltIsCanBuyFireworksRvRJRtR—(
Rt    shopNPCIDR@t    curItemIDt
limitValueR8t curFamilyLVRcRˆR{((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR2Ks&    
 
  cCs€tj|tjƒsdStjƒjtjƒd}|tj    dƒkrNdStj    ddƒ}t
j d|j ƒg|ƒdS(NiRWit    SellMail1( t GameFuncCommt GetFuncCanUseRtGameFuncID_OSSailRRRR\R]R0R©RXRhR7(RRct addItemList((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRW‚scCsVd}|jtjƒ}|s%tƒSt||ƒr8|Stjd||jƒƒ|S(Niÿÿÿÿs.GetCurStoreItemList:trade tag NPC not match:%s(R›R R RtCheckTradeTagNPCRR+R(RRR)((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetCurTradeTagNPC‘s  cCsd|jƒ}|stS|jƒtjkr/tStjƒj|jƒƒ}|j    ƒ|kr`tSt
S(N( RR—RRRRRRRR    R(RR)RR((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRŠ¨s cCsCtjƒ}|jƒ}|jƒ}tj}t|||g|ƒS(N(RtIPY_CPlayerSellItemt GetPackTypet GetItemIndexR tDef_ShopType_NpcShopt SellPackItem(RRtsendDataRMR@R((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytSellItem½s
       cCsotjƒj|ƒ}|j}|j}|s1dStj}t||||ƒ}|rk|jt    j
dƒndS(Ni( RRRtPackTypeRHR RRtSync_MakeItemAnswerRtDef_mitKeySell(R˜R(RRRMt ItemIndexListRtisOk((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytOnSellManyItemÏs            c
Csy|jƒj|ƒ}|dkr%tSi}t}ttjtjƒ}xÇ|D]¿}|j|ƒ}    t    ||    ƒswqMnt
}|    j ƒ}
t ||    ƒ\} } t | ƒ|
} |j| dƒ| || <|    jƒ|koçtj|    ƒ }tj||    |
ttjd|ƒqMW|stSxX|jƒD]J\}}i}tj|||tj|tƒtj|d||gƒq'Wt
S(Nit    isForceDRt
GetMoney01(RªR«RR—trangeR tDef_ItemType_retWeapontDef_ItemType_retNeckRët__CheckItemSellRRêRóRJR¥tGetTypeRítItemNotNeedRecordR°RgtItemDel_SellPackItemRRXt    GiveMoneytDef_GiveMoney_SellPackItemRò(RRMR=RRúttotalSellPriceDictt    hasSellOKtnotForceRecordEquipTypeListR@Rût curItemCounttcurItemSellPricetcurItemSellTypetcurAllItemSellPriceR™Rÿt
priceMoneyt addDataDict((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRãs0   
"&cCsûdSt|jtjƒƒ}|jƒjtjƒ}tj    |tjƒ}|dkrt
|dƒd}|j |ƒ}|j ƒ|d}n+|j t|dƒdƒ}|j |ƒ}d||df}|j|ƒtj|tjt
|ƒƒdS(NiÿÿÿÿiiRæs%s%s(R¯R8R R÷RªR«RRéR°tGetEmptyIndexInPackRJRëRaRøtPutInRXRY(RRûRRút
emptyIndextitem((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytPutItemInBuyBackPacks 
  cCsÃtj|ƒ stj|ƒr3tj|dƒdS|jƒdkrYtj|dƒdSt||ƒ\}}t|ƒ|j    ƒ}| s’| r¦tj|dƒdStj
|||ƒs¿dSt S(NtGeRen_chenxin_644055itGeRen_lhs_272921( R°tCheckItemCanUseRítGetIsAuctionItemRXRòt
GetCanSellRóRJRêt CanGiveMoneyR(RRûRþRÿ((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRž0scCs4|jƒ}|stj}n|jƒ}||fS(N(tGetGoldPaperPriceRRºtGetSilverPrice(RRûRÿt curItemPrice((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRóSs
   cCs-|jƒtjkr)tj|dƒtStS(NtGeRen_chenxin_740826(tGetPlayerActionR tDef_Player_DoEvent_StateRXRòR—R(R((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckPlayerCanStateEventescCs|jƒtjkS(N(RŸR tDef_Compose_Can_Put_List(Rû((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt__CheckItemCanPutInComposePackrsc    Cs’t||||ƒ}|dkr%dStj|ƒ}|j||jƒ||jƒƒsrtj|d|gƒdStj    ||||||ƒdS(NRã(
t__GetBackPackOperateItemRRíRîRïRðRñRXRòtDragItem(    Rt srcBackpackt desBackPacktsrcIndext    destIndext putItemCountRtscrItemRý((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytBackpackOperate€s $cCsI|tjkrEt|ƒsEtjd|jƒ|jƒfƒtSntS(Ns+BackpackOperate ItemErr = %s, ItemType = %s(    R tDef_ComposePack_ListRÀRR+RðRŸR—R(RÈRÄ((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt__CheckBackPackOperate–s
 #cCsŠ|tjks|tjkrBtjd||f|jƒƒdS|jƒj|ƒj|ƒ}tj    |ƒssdSt
||ƒs†dS|S(NsHPackItemExchange packErr, srcBackpack = %s,             desBackPack = %s( R tDef_BackpackOperate_ListRR+R7RªR«RëR°R´RË(RRÃRÄRÅRÈ((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRÁ¦scCsyt||||ƒ}|dkr%dS|jƒj|ƒj|ƒ}|dks[|jƒr_dStj||||ƒdS(N(RÁRRªR«Rët GetIsLockedR°tDoLogicSwitchItem(RRÃt destBackPackRÅRÆRRÈtdestItem((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytPackItemExchangeÃs cCs}t|ƒ}xjtd|dƒD]V}||}||d}|j|ƒ}|dkre|||<q||c|7<qW|S(Niii(R9R›R¥R(t    moneyListt payMoneyDicttlengthR˜RÀtmoneytpayMoney((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetPayMoneyDictÙs 
  cCs:x3|jƒD]%\}}tj|||ƒs tSq WtS(N(RRXR    R—R(RRÓRÀRÕ((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt CheckPayMoneyîs(FR,R;RRRRíR RXR°RRtChItemR0R{R†RltPlayerNewFairyCeremonyRt
PyGameDatatrandomtmathRtRkRRRRR+R—RFR/RURfRgRhRiR`RpR€ROR–R™RQRTRåtDef_Cost_UnknownRRRSR6R*RjR2RWR‹RŠR’R˜RR±RžRóR¾RÀRÉRËRÁRÑR×RØ(((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt<module>1s„                                      
    "                       
                                c        ,E    ’ B              7                        0        #