hxp
2019-02-26 823a7b3b189e54736c346fd6f8206da98dfa9a7a
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
¼o\c@s¶ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZiad„Zd„Zd„Zd„Zged„Zd„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,dd„Z.d„Z/d„Z0d„Z1d„Z2ed„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ÿÿÿÿNcCs|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((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt
StartTradeRs    cCsdS(Ni((((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetDirectNpcIDjscCstj|ƒtS(N(t
EventShellt DoExitEventR(RR((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt    ExitEventss 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((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytQueryNPCShopItem}s      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((si.\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((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR/ºs           cCs—tj|tjtjƒsktj|tjtjdƒ|jtjƒ}|rktj    |tj
dƒqknt |ƒt |ƒt |ƒt|ƒdS(Ni(RtGetDictValueByBitR tDef_Player_Dict_VersionFixtDef_VerFix_SuperGifttSetDictValueByBitR8tDef_PDict_GoldGiftFirstRecordt PlayerControltNomalDictSetPropertytDef_PDict_SuperGiftHasOpentSyncMysticalLimitShopInfoRFtSyncSuperGiftInfotSyncMysticalShopInfo(RtisGet((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnLoginÅs
 
 
 
cCs|tjkrRt|tƒt|ƒdg}tj|tjdƒt    |ƒn°|tj
krþdg}t j ƒj tjƒ}t j ƒj tjƒ}|rÛt j ƒj tjƒ}|ddkrû|jdƒqûq|ddkr|jdƒqndSt||ƒdS(Niiii(RtDef_OnEventTypetUpdataSuperGiftTimeRtOSSaleOpenMailRTRUR t Def_PDict_MysticalShopRefreshCntRYtDef_OnEventTypeExRt GetGameWorldtGetGameWorldDictByKeytDef_Notify_WorldKey_ServerDaytDef_Notify_WorldKey_IsMixServert Def_Notify_WorldKey_MixServerDayRLtResetShopItemBuyCount(Rt onEventTypet refreshTypet openServerDayt isMixServert mixServerDay((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt ShopItemOnDayÖs& 
          cCsK|tjkrdg}n|tjkr6dg}ndSt||ƒdS(Nii(RR\R`Rf(RRgRh((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnWeekñs   cCsH|tjkrd}n|tjkr0d}ndSt||gƒdS(Nii(RR\R`Rf(RRgRh((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnMonthþs        cCsd}t||gƒdS(Ni(Rf(RRh((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnCrossPKSeasonChangescCsé|s
dSg}tjƒ}x­t|jƒƒD]™}|j|ƒ}|jƒsVq/n|jƒ|krnq/ntj|j    ƒ}|j
|ƒ}|dkr¢q/nt j ||dƒ|j |j    ƒƒq/W|råt||tƒndS(Ni(R0R1R2R3R4R5tGetRefreshTypeR R6R7R8RTRURLRFR(Rt resetTypeListt syncIndexListRARBRCRDRE((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRfs&   cCsßg}tjƒ}x­t|jƒƒD]™}|j|ƒ}|jƒsLq%n|jƒ|krdq%ntj|j    ƒ}|j
|ƒ}|dkr˜q%nt j ||dƒ|j |j    ƒƒq%W|rÛt||tƒndS(Ni(R0R1R2R3R4R5t GetShopTypeR R6R7R8RTRURLRFR(Rt shopTypeListRrRARBRCRDRE((si.\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
GetLimitLVR7RTRUR tDef_PDict_ShopItemStartTimeRLRtDebugLogRW(    RtbefLVtaftLVt ipyDataListtcurTimet syncGoodsListtipyDatatlimitLVtgoodsID((si.\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(NRviRwi(R,ttagMCMysticalShopTimeInfot ShopTimeListR0RxRRJRyR7R8R R{t GetLimitValueRTRUttagMCMysticalShopTimetGoodsIDt    StartTimeRLR9R:R;R<(RtpackDataRR€R‚R„t    startTimet    goodsTime((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRWMs(                    cCs€|jƒ}tjƒtj|tjƒ}|jddd|j}tj    ddƒ}||dkr|t
|t |ƒndS(Nii<tMysteryShopRefreshii( tGetCreateRoleTimeRtGetCurrentTimetGetDateTimeByStrR tTYPE_Time_FormattdaystsecondsR0t
GetFuncCfgt__DoMysticalShopRefreshR(RRtcreateRoleTimetdiffTimet pastSecondst refreshTime((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckMysticalShopRefreshfs cCs)tjƒj|ƒ}t|t|ƒdS(N(RRRR—tFalse(tindexR(RR((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytOnMysticalShopRefreshusc(    Cs|jtjƒ}|r,||dkr,dS|jtj|ƒts]tjƒ}x    t|jƒƒD]ò}|j    |ƒ}|j
ƒ}|j ƒ}tj d|ƒ}    |    j ƒ}
|    jƒ} t|ƒ} | tkrð| digt| <i} n|
t| dkrgt| d|
<n| j|
dƒ| | |
<t| d|
j| |
|gƒqdWn|jƒ}tjt|ƒ\}}|s‹dStjddƒ}tjtjddƒƒ}|sÂdSd}|sç|jƒjtjƒ}tjddƒ}tjddƒ}|jtjƒ}g|jƒD]}t|ƒ^q)}|j ƒ|t!|dƒ}x.|D]&}||krf|t!|ƒ}PqfqfWt"j#|||ƒ\}}}}d}|sø|tjdd    ƒ}t$j%|tj&|tj'ƒsødSnt"j(||||t)dƒ|jtj*ƒ} | d
| d
}!}"||"krMdn|!d}#t+|#d
|tj,ƒ}$t$j-|tj*|$ƒtjdd ƒ}%||%krÊ|#|%|dkrÊ|%|d}nt$j-|tj|dƒnt+||ƒ}||}&g}'|r7|'tj.|jtj&gƒ|gƒ7}'n|&rh|'tj.|jtj/gƒ|&gƒ7}'n|r¡||'kr¡||'d<tj0d ||#|fƒntj0d |||&|'fƒxPt|ƒD]B}|t1|'ƒkrí|'|nd}t$j-|tj2||ƒqËWt3|ƒdS(NièRviitMysteryShopGoodsiRiÿÿÿÿii'isEÉñÃØÉ̵êË¢ÐÂÌØÊâ¹æÔò£¬µÈ¼¶¶Î£º%s,updLVRefreshCnt=%s,specialGoodsID=%ssJÉñÃØÉ̵êË¢ÐÂisFree=%s,goldGoodsCnt=%s,sliverGoodsCnt=%s,goodsResultList=%s(4t GetDictByKeyR t"Def_PlayerKey_MysticalShopLastTimeR
tg_mysticalShopDictR0R1R2tGetMysteryShopCounttGetMysteryShopByIndext
GetLVRanget
GetGoodsIDtGetIpyGameDatat GetMoneyTypeRˆttupletgetRLtGetLVRtGetDictValueByRangeKeyR–tGetResultByRandomListtGetFuncEvalCfgtGetItemManagertGetPackRtrptItemR8R_tkeysRJtsorttstrt
ItemCommontGetItem_FromPack_ByID_ExExRTtPayMoneytTYPE_Price_Gold_MoneytDef_Cost_MysteryShopRefresht
ReduceItemRt"Def_PDict_MysticalShopLVRefreshCnttmintDef_UpperLimit_DWordRUtGetResultByRandomListExtTYPE_Price_Silver_MoneyR|R9tDef_PDict_MysticalShopGoodsRY((RtisFreeRtlastTimetipyMgrRBR‚tlvRangeR„t goodsIpyDatat    moneyTypetweighttlvkeyt
weightDicttplayerLVtcurLVDantshopDicttmaxCntt goldGoodsCnttspecialGoodsIDtitemPackt
costItemIDtcostItemCntDictt curRefreshCnttcnttcntListt costItemCnttenought    indexListthasBindtlackCnttcostGoldtcurLVRefreshDatatcurLVRefreshCnttlvDantupdLVRefreshCnttupdLVRefreshDatatspecialRefreshCfgtsliverGoodsCnttgoodsResultList((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR—zs”           * %
  ! 
++
"
cCs´tjƒ}|jtjƒ|_g|_tjddƒ}xOt    |ƒD]A}|jtj
|ƒ}tj ƒ}||_ |jj |ƒqIWt|jƒ|_tj||ƒdS(NR i(R,ttagMCMysticalShopInfoR8R R_t
RefreshCntt    GoodsListR0R–R2RÁttagMCMysticalShopGoodsRŠRLR9R:R;R<(RRŒRÎRBR„t    goodsInfo((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRYÎ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    GetIsBindRTt
NotifyCodet__GetItemSellPriceRJR tDef_Cost_Reason_SonKeyR¸tDef_Cost_BuyItemBackt    PutInItemRRµR8tDef_Player_Dict_DelPackIndextreplaceRU( Rt
clientPackRRžtbackPacktcurItemt realPutCountt itemControlt    itemPricet    priceTypetinfoDictt
itemIndexs((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRìàs:          "     c/ Cs=tjƒrdStjƒ}|jƒ}|dkr8dS|jƒ}|sNdStjd|ƒ}|sjdS|jƒ}|j    ƒ}|dkrŽt
j j t jiƒ}|j t jdƒ}    |    sßtjd|    |jƒƒdStj|j t jdƒ|j t jdƒ|j t jdƒƒ}
|
s+dS|    t|
ƒkrG|
dn |
|    d} || kr}tjd|    || |
f|jƒƒdSnï|dkr}t
j j t jiƒ}|j t jdƒ}    |    sëtjd|    |jƒƒdStj|j t jdƒ|j t jdƒ|    |j t jdƒƒ}
|
s:dS|
d} || kr}tjd    |    || |
f|jƒƒdSn|jƒ} | r¥|jƒ| kr¥dS|jƒ} |jƒ}d}| sÏ|r‰| sádg} n|sódg}nt| ƒt|ƒkrtjd
ƒdS|jƒ}d}x4t | ƒD]&\}}||krWPn||}q;W|dkr‰tjd |ƒdSnd}t!j"|}|dkr&|j#|ƒ}t$d||ƒ}|dkrñtjd ||fƒdS||kr&tjd ||||fƒ|}q&n|j%ƒ}|dkrPt&||ƒ}n|j'ƒ|j(ƒ|j)ƒ}}}|j*ƒ}|j+ƒ|j,ƒ}}||9}|j-ƒ}|j.ƒ}g}|røt/|||ƒ} |j0| |||gƒnxC|D];\}!}"}#t/||!|ƒ} |j0| |"||#gƒqÿW|sbtj1d|||fƒdSd}$i}%x½t |ƒD]¯\}}&|&d}|&d}'tj2ƒj3|ƒ}(|(sÑtj1d||fƒdSt!j4|(j5ƒƒ})t6j7|)|(|'ƒ}*|%j |)dƒ|*|%|)<|dkr{|}$q{q{W|$s8dStjd|||||$|%f|jƒƒ|j8ƒ}+t9},xu|%j:ƒD]g\})}*|*t;j<||)|*ƒkrƒt=},|+rºPqê|j>|tj?ƒt@jA|d|)gƒdSqƒqƒW|,r|+r|+nd}-tB||||$|jCƒƒrQtjd|||jCƒf|jƒƒdSt@jD|||ƒs}|j>|tjEƒdS|dkr|jFt!jGƒdkr¶tjd|ƒdSd|||||$||-g}.tjHƒjI|jJƒddd|.t|.ƒƒ|jKt!jGdƒdStL|||||$||-|ƒdS(NiRvisÏÞÊ±ÌØ»Ý·Ç»î¶¯ÖУ¡state=%siÿÿÿÿsOÏÞÊ±ÌØ»Ý·Ç»î¶¯ÖеÄÉ̵êÀàÐÍ£¡state=%s,shopType=%s,actShopType=%s,shopTypeList=%sisÏÞʱÇÀ¹º·Ç»î¶¯ÖУ¡state=%ssOÏÞʱÇÀ¹º·Ç»î¶¯ÖеÄÉ̵êÀàÐÍ£¡state=%s,shopType=%s,actShopType=%s,shopTypeList=%ss)    ¹ºÂòÎïÆ·LimitVIPLV  LimitCnt ³¤¶È²»Í¬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(MRt IsCrossServerRtIPY_CBuyItemListtGetBuyItemIndext GetBuyCountR0R¨RstGetOperationActionShopt
PyGameDatatg_operationActionDictR«RtOperationActionName_SpringSalet ActKey_StateR|t GetPlayerIDtPlayerSpringSaletGetShopTypeListt ActKey_CfgIDtActKey_DayIndextActKey_WorldLVR9tOperationActionName_FlashSaletPlayerFlashSaleRzR¬t GetLimitVIPLVR5tLogtGetVIPLvt    enumerateR R6R8tmaxtGetServerLimitCntR½t    GetItemIDt
GetItemCntRøt GetItemListExR©t GetMoneyNumtGetJobt
GetJobItemtGetShopJobItemRLtErrLogR#tGetItemByTypeIDtGetItemPackTypetGetTypeRôtGetItemNeedPackCountt
GetMailKeyRtitemsR¶tGetItemPackSpaceRt
ShopResultt
tsrNoPlaceRTRùtCheckBuyItemLimitExRˆt    HaveMoneyt
tsrNoMoneyR¡tDef_PlayerKey_StoreQueryStateRtGameServer_QueryPlayerResultR7R
tDoBuyStoreItem(/RRt buyItemListR@tclientBuyCountR‚tshopTypetoperationActionShopTypetactInfotstateRtt actShopTypeRƒtLimitVIPLVListt LimitCntListt limitBuyCnttcurVIPlvRBtviplvRERDt    canBuyCnttserverLimitCnttitemIDt    itemCounttisBindt
itemListExRRtjobt jobItemListt totalItemListt    jobItemIDtitemIDExt itemCountExtisBindExt
mainItemIDtneedPackSpaceDicttitemInfotitemCntRtpackTypet    needSpacetmailKeyt
isLackPackt sendMailKeytcmdStr((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytBuyItems        B*      E
                          & 
 
 
      #        cCs|stjd|ƒ}n|jƒ|jƒ}}    |    |9}    |jƒ}
tj||ƒ} i|d6|d6|
d6|d6|tj6} tj    |||    tj
| |ƒtj||ƒ} |dkr tj |}|j |ƒ}tj ||||ƒt||gƒni|
d6|d6|d6|    d6|d6| d    6| d
6}|tjgk}tj|ƒ}xö|D]î\}}}tj|||ƒ}|sšqjn|jƒ}|søtj|jƒƒ}|j||d tj||gƒs|jƒqjqn
|jƒtj|||ƒ|jƒrj||krjtjd|jƒ|jƒ||gƒqjqjW|r‡tj||j ƒg|d |ƒntj!||
ƒt"|||ƒ|tj#d diƒj$ƒkrát%j&|tj'|ƒn|tj#ddiƒj$ƒkrt(j&|tj'|ƒndS(NRvt TotalItemListtClientBuyCountRwt ShopItemIndexit    ItemPricet    MoneyTypet BeforeMoneyt
AfterMoneyRëtdetailtCeremonyFirePartyitNewCeremonyFireParty()R0R¨R©R$RsRTtGetMoneyR RûR¸tDef_Cost_BuyStoreItemR6R8RURFRRÀRôRõtGetOutPutItemObjt GetUserDataR*R+RýtItemGive_BuyItemtClearRtEventRespons_BuyItemt GetNotifyMarkt WorldNotifytGetNamet SendMailByKeyR7tEventRespons_ShopBuytSyncShoppingResultR¯tvaluestPlayerFairyCeremonytAddFCPartyActionCnttDef_PPAct_FireworkstPlayerNewFairyCeremony(RR@R9RLRQRARYR‚RRR:t beforeMoneyRt
afterMoneyRDREtdataDictt isForceEventRRFRGRHt
curItemObjtuserDataRU((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR7¸sV
    $
    
/%!!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(RJRFRKt jobItemIDList((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR'ðs  cCs2tjƒ}||_||_tj||ƒdS(N(R,ttagMCShoppingResultRHtItemCntR;R<(RR@RTt
resultInfo((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRrýs
         c    CsY|dkrtj||ƒ S|d krv|jƒdkr?tS|jƒ}|dkrl|jtjƒ}n||kS|d kr¨tj    ƒj
t j ƒd}||kS|t jddiƒjƒkrÚtj||ƒ S|t jd    diƒjƒkr tj||ƒ S|d
krU|jtj|ƒ}ttjƒƒ}| pT|||kStS( Niii    i
iiiRdRei(ii    i
(i(t
PlayerRunetGetIsOpenByRuneIDt GetFamilyIDRt GetFamilyLVR8R tDef_Player_Dict_FamilyLVRRaRbRRcR0R¯RsRttIsCanBuyFireworksRwR{RJRyR(    Rt    shopNPCIDR@t    curItemIDt
limitValuet curFamilyLVRiRR€((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR2s*    
 
!! cCs€tj|tjƒsdStjƒjtjƒd}|tj    dƒkrNdStj    ddƒ}t
j d|j ƒg|ƒdS(NiR^it    SellMail1( t GameFuncCommt GetFuncCanUseRtGameFuncID_OSSailRRaRbRcR0R¯RTRpR7(RRit addItemList((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR^=scCsþttjƒƒ}|r–|jtjƒ}|s4dStjdƒ}tg|D]}|d^qMƒ}|||dkrútj    |tjdƒqúnd|jtj
ƒr¬dStj    |tj|ƒtjddƒ}tj d|j ƒg|ƒt |ƒtS(NtSuperGiftTimeListii€Qiit    SellMail2(RJRyR8R tDef_PDict_SuperGiftStartTimeR0R¯RRTRURVRpR7RXR(RtisOndayR€RtsuperGiftTimeListtinfotmaxDayR’((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR]Is #
cCsE|jtjƒ}|sdStjƒ}||_tj||ƒdS(N(R8R R•R,ttagMCSuperGiftInfoR‹R;R<(RRRŒ((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRX_s     cCs{|jtjƒ}|sdSttjdƒƒ}|j|dƒ}|sMdSttjƒƒ}||d|krwdSt    S(NR“ii€Q(
R8R R•tdictR0R¯R«RJRyR(RtgiftIDRtsuperGiftTimeDictttotalDayR€((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckSuperGiftBuygscCsVd}|jtjƒ}|s%tƒSt||ƒr8|Stjd||jƒƒ|S(Niÿÿÿÿs.GetCurStoreItemList:trade tag NPC not match:%s(R¡R R RtCheckTradeTagNPCRR(R(RRR)((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetCurTradeTagNPCzs  cCsd|jƒ}|stS|jƒtjkr/tStjƒj|jƒƒ}|j    ƒ|kr`tSt
S(N( RRRRRRRRRR    R(RR)RR((si.\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(RRtsendDataRUR@R:((si.\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(RRRUt ItemIndexListR:tisOk((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytOnSellManyItemàs            c
CsRd}|jƒj|ƒ}|dkr+tSt}ttjtjƒ}x·|D]¯}|j|ƒ}    t    ||    ƒswqMnt
}|    j ƒ}
t ||    ƒ\} } t | ƒ|
} || 7}|    jƒ|ko×tj|    ƒ }tj||    |
ttjd|ƒqMW|s
tSi}tj|tj|tj|tƒtj|dtj|gƒt
S(Nit    isForceDRt
GetMoney01(R°R±RRtrangeR tDef_ItemType_retWeapontDef_ItemType_retNeckRòt__CheckItemSellRRñRúRJR+RôtItemNotNeedRecordR¶tDelItemtItemDel_SellPackItemRTt    GiveMoneyRRÀtDef_GiveMoney_SellPackItemRù(RRUR=R:ttotalSellPriceRt    hasSellOKtnotForceRecordEquipTypeListR@Rt curItemCounttcurItemSellPricetcurItemSellTypetcurAllItemSellPriceR¯t addDataDict((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR¦ôs.   
 
"&"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òRkRÿtPutInRTRU(RRRRt
emptyIndextitem((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytPutItemInBuyBackPack#s 
  cCsÖtj|ƒs#tj|dƒdStj|ƒrFtj|dƒdS|jƒdkrltj|dƒdSt||ƒ\}}t|ƒ|j    ƒ}| s¥| r¹tj|dƒdStj
|||ƒsÒdSt S(NtGeRen_chenxin_644055titemuse_chenxin_31379itGeRen_lhs_272921( R¶tCheckItemCanUseRTRùRôt IsEventItemt
GetCanSellRúRJRñt CanGiveMoneyR(RRRR((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR´@s"cCstj}|jƒ}||fS(N(RRÀtGetSilverPrice(RRRt curItemPrice((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRúcs     cCs-|jƒtjkr)tj|dƒtStS(NtGeRen_chenxin_740826(tGetPlayerActionR tDef_Player_DoEvent_StateRTRùRR(R((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckPlayerCanStateEventscCs|jƒtjkS(N(R+R tDef_Compose_Can_Put_List(R((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt__CheckItemCanPutInComposePackœsc    Cs’t||||ƒ}|dkr%dStj|ƒ}|j||jƒ||jƒƒsrtj|d|gƒdStj    ||||||ƒdS(NRê(
t__GetBackPackOperateItemRRôRõRöR÷RøRTRùtDragItem(    Rt srcBackpackt desBackPacktsrcIndext    destIndext putItemCountRtscrItemR((si.\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Ù((si.\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Ý((si.\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((si.\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((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetPayMoneyDicts 
  cCs:x3|jƒD]%\}}tj|||ƒs tSq WtS(N(R.RTR3RR(RRèRÇRê((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt CheckPayMoneys(FR,R;RRRRôR RTR¶RRtChItemR0R„RRtRwRRtrandomtmathRyR£RRRR+RRFR/R[RlRmRnRoRfRuR…RWRœRŸR—RYRìR[RR7R'RrR2R^R]RXRŸR¡R R¨R®R¦RÆR´RúRÓRÕRÞRàRÖRæRìRí(((si.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt<module>2s†                                      
    "                      
                                T        0    ¨ 8              5                     =            /        #    ,