cehua_lyf
2019-03-06 3c8ee0a8a524a6251d7d5aae2372e76fd8a99b9c
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
b¬g\c@sŒddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZd„Zd„Zd„Zd„Zged„Zd„Zd„Zd    „Zd
„Zd „Z d „Z!d „Z"d„Z#d„Z$d„Z%d„Z&d„Z'dd„Z)d„Z*d„Z+d„Z,d„Z-ed„Z.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5d „Z6d!„Z7d"„Z8d#„Z9d$„Z:d%„Z;d&„Z<d'„Z=d(„Z>id)„Z?d*„Z@dS(+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((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt
StartTradePs    cCsdS(Ni((((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetDirectNpcIDhscCstj|ƒtS(N(t
EventShellt DoExitEventR(RR((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt    ExitEventqs 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.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((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           cCstj|tjtjƒsktj|tjtjdƒ|jtjƒ}|rktj    |tj
dƒqknt |ƒt |ƒt |ƒdS(Ni(RtGetDictValueByBitR tDef_Player_Dict_VersionFixtDef_VerFix_SuperGifttSetDictValueByBitR8tDef_PDict_GoldGiftFirstRecordt PlayerControltNomalDictSetPropertytDef_PDict_SuperGiftHasOpentSyncMysticalShopInfoRFtSyncSuperGiftInfo(RtisGet((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnLoginÃs
 
 
cCsó|tjkr2t|tƒt|ƒdg}n°|tjkrÞdg}tjƒjtj    ƒ}tjƒjtj
ƒ}|r»tjƒjtj ƒ}|ddkrÛ|j dƒqÛqâ|ddkrâ|j dƒqândSt ||ƒdS(Niiii(RtDef_OnEventTypetUpdataSuperGiftTimeRtOSSaleOpenMailtDef_OnEventTypeExRt GetGameWorldtGetGameWorldDictByKeytDef_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(RR[R^Rd(RReRf((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnWeekês   cCsH|tjkrd}n|tjkr0d}ndSt||gƒdS(Nii(RR[R^Rd(RReRf((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnMonth÷s        cCsd}t||gƒdS(Ni(Rd(RRf((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ƒ|krnq/ntj|j    ƒ}|j
|ƒ}|dkr¢q/nt j ||dƒ|j |j    ƒƒq/W|råt||tƒndS(Ni(R0R1R2R3R4R5tGetRefreshTypeR R6R7R8RTRURLRFR(Rt resetTypeListt syncIndexListRARBRCRDRE((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRds&   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 shopTypeListRpRARBRCRDRE((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
GetLimitLVR7RTRUR tDef_PDict_ShopItemStartTimeRLRtDebugLogRW(    RtbefLVtaftLVt ipyDataListtcurTimet syncGoodsListtipyDatatlimitLVtgoodsID((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytMysticalShopOpen4s    ! 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(NRtiRui(R,ttagMCMysticalShopTimeInfot ShopTimeListR0RvRRJRwR7R8R Ryt GetLimitValueRTRUttagMCMysticalShopTimetGoodsIDt    StartTimeRLR9R:R;R<(RtpackDataR}R~R€R‚t    startTimet    goodsTime((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRWFs(                    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(tIndextGetItemManagertGetPackRt
rptRecycletGetCounttGetAttIsEmptyt ItemControlertPlayerItemControlert CanPutInItemtrptItemt GetItemTypeIDt    GetIsBindRTt
NotifyCodet__GetItemSellPriceRJR tDef_Cost_Reason_SonKeytPayMoneytDef_Cost_BuyItemBackt    PutInItemtFalsetstrR8tDef_Player_Dict_DelPackIndextreplaceRU( Rt
clientPackRtindextbackPacktcurItemt realPutCountt itemControlt    itemPricet    priceTypetinfoDictt
itemIndexs((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRbs:          "     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(NiRtisÏÞÊ±ÌØ»Ý·Ç»î¶¯ÖУ¡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 GetBuyCountR0tGetIpyGameDataRqtGetOperationActionShopt
PyGameDatatg_operationActionDicttgetRtOperationActionName_SpringSalet ActKey_StateRzt GetPlayerIDtPlayerSpringSaletGetShopTypeListt ActKey_CfgIDtActKey_DayIndextActKey_WorldLVR9tOperationActionName_FlashSaletPlayerFlashSaleRxtGetLVt GetLimitVIPLVR5tLogtGetVIPLvt    enumerateR R6R8tmaxtGetServerLimitCnttmint    GetItemIDt
GetItemCntRžt GetItemListExt GetMoneyTypet GetMoneyNumtGetJobt
GetJobItemtGetShopJobItemRLtErrLogR#tGetItemByTypeIDtGetItemPackTypetGetTypeR™tGetItemNeedPackCountt
GetMailKeyR¥titemst
ItemCommontGetItemPackSpaceRt
ShopResultt
tsrNoPlaceRTRŸtCheckBuyItemLimitExR†t    HaveMoneyt
tsrNoMoneyt GetDictByKeytDef_PlayerKey_StoreQueryStateRtGameServer_QueryPlayerResultR7R
tDoBuyStoreItem(/RRt buyItemListR@tclientBuyCountR€tshopTypetoperationActionShopTypetactInfotstateRrt actShopTypeRtLimitVIPLVListt LimitCntListt limitBuyCnttcurVIPlvRBtviplvRERDt    canBuyCnttserverLimitCnttitemIDt    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        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(NRtt TotalItemListtClientBuyCountRut ShopItemIndexit    ItemPricet    MoneyTypet BeforeMoneyt
AfterMoneyRŽtdetailtCeremonyFirePartyitNewCeremonyFireParty()R0R¸RÒRÓRqRTtGetMoneyR R¡R¢tDef_Cost_BuyStoreItemR6R8RURFRtTYPE_Price_Silver_MoneyR™RštGetOutPutItemObjt GetUserDataRÙRÚR¤tItemGive_BuyItemtClearRtEventRespons_BuyItemt GetNotifyMarkt WorldNotifytGetNamet SendMailByKeyR7tEventRespons_ShopBuytSyncShoppingResulttGetFuncEvalCfgtvaluestPlayerFairyCeremonytAddFCPartyActionCnttDef_PPAct_FireworkstPlayerNewFairyCeremony(RR@RêRýRRòR
R€R°R¯Rët beforeMoneyR±t
afterMoneyRDREtdataDictt isForceEventR®R÷RøRùt
curItemObjtuserDataR((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRè: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(ttypetlistttupleRR×R9(RûR÷Rüt jobItemIDList((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRÖrs  cCs2tjƒ}||_||_tj||ƒdS(N(R,ttagMCShoppingResultRHtItemCntR;R<(RR@Rt
resultInfo((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR$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
iiiRRi(ii    i
(i(t
PlayerRunetGetIsOpenByRuneIDt GetFamilyIDRt GetFamilyLVR8R tDef_Player_Dict_FamilyLVRR_R`RRaR0R%R&R'tIsCanBuyFireworksR*RyRJRwR¥(    Rt    shopNPCIDR@t    curItemIDt
limitValuet curFamilyLVRgR‹R~((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRâŠs*    
 
!! cCs€tj|tjƒsdStjƒjtjƒd}|tj    dƒkrNdStj    ddƒ}t
j d|j ƒg|ƒdS(NiR]it    SellMail1( t GameFuncCommt GetFuncCanUseRtGameFuncID_OSSailRR_R`RaR0R%RTR"R7(RRgt addItemList((syE:\SnxxServerCode\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(RJRwR8R tDef_PDict_SuperGiftStartTimeR0R%RÌRTRURVR"R7RXR(RtisOndayR~R‹tsuperGiftTimeListtinfotmaxDayRF((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR\Ës #
cCsE|jtjƒ}|sdStjƒ}||_tj||ƒdS(N(R8R RIR,ttagMCSuperGiftInfoR‰R;R<(RR‹RŠ((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRXás     cCs{|jtjƒ}|sdSttjdƒƒ}|j|dƒ}|sMdSttjƒƒ}||d|krwdSt    S(NRGii€Q(
R8R RItdictR0R%R¼RJRwR(RtgiftIDR‹tsuperGiftTimeDictttotalDayR~((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckSuperGiftBuyé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.pyRTs cCsCtjƒ}|jƒ}|jƒ}tj}t|||g|ƒS(N(RtIPY_CPlayerSellItemt GetPackTypet GetItemIndexR tDef_ShopType_NpcShopt SellPackItem(RRtsendDataRR@Rë((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytSellItemPs
       cCsotjƒj|ƒ}|j}|j}|s1dStj}t||||ƒ}|rk|jt    j
dƒndS(Ni( RRRtPackTypeRHR RYRZtSync_MakeItemAnswerRtDef_mitKeySell(RªR(RRRt ItemIndexListRëtisOk((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytOnSellManyItembs            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    GiveMoneyRRtDef_GiveMoney_SellPackItemRŸ(RRR=RëttotalSellPriceR«t    hasSellOKtnotForceRecordEquipTypeListR@R¬t curItemCounttcurItemSellPricetcurItemSellTypetcurAllItemSellPriceRct addDataDict((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRZvs.   
 
"&"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—RR¨tPutInRTRU(RR¬R²R«t
emptyIndextitem((syE:\SnxxServerCode\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(RR¬R¯R°((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRhÂs"cCstj}|jƒ}||fS(N(RRtGetSilverPrice(RR¬R°t curItemPrice((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyR ås     cCs-|jƒtjkr)tj|dƒtStS(NtGeRen_chenxin_740826(tGetPlayerActionR tDef_Player_DoEvent_StateRTRŸR¥R(R((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytCheckPlayerCanStateEventscCs|jƒtjkS(N(RÚR tDef_Compose_Can_Put_List(R¬((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt__CheckItemCanPutInComposePacksc    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®((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__CheckBackPackOperateBs
 #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ŠRscCsyt||||ƒ}|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.pytPackItemExchangeos cCs}t|ƒ}xjtd|dƒD]V}||}||d}|j|ƒ}|dkre|||<q||c|7<qW|S(Niii(R9ReR¼R(t    moneyListt payMoneyDicttlengthRªt    moneyTypetmoneytpayMoney((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytGetPayMoneyDict…s 
  cCs:x3|jƒD]%\}}tj|||ƒs tSq WtS(N(RÝRTRãR¥R(RRœRžRŸ((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt CheckPayMoneyšs(AR,R;RRRR™R RTRÞRRÆtChItemR0R8RCR'R*RÀRºtrandomtmathRwRRRR+R¥RFR/RZRjRkRlRmRdRsRƒRWRR RRèRÖR$RâR]R\RXRSRURTR\RbRZRzRhR R‡R‰R’R”RŠRšR¡R¢(((syE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt<module>2s|                                      
    "                      
                        0    ¨ 8              5                     =            /        #    ,