hxp
2 天以前 766add99cf60366c1b239b979f4626e07e03a4de
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
³äŸic@s'ddlZddlZddlZddlZddlZddlZddlZddlZdZdZ    dZ
dZ dZ e gZ d„Zd„Zd„Zd„Zd    „Zd
d „Zejiedd „Zd „Zd„Zd„Zd„Zded„Zgd„Zgd„ZdS(iÿÿÿÿNiiicCs(x!tD]}t||dtƒqWdS(Nt
sysRefresh(tRefreshShopTypeListtDoRandRefreshShopItemtTrue(t    curPlayertshopType((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt
DoShopOpenHs cCs,t|ƒxtD]}t||ƒqWdS(N(tSyncShopItemBuyCntInfoRtSyncShopRefreshItemInfo(RR((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnLoginMs
 cCshxQtD]I}|jtj|ƒs)qntj|tj|dƒt||ƒqWt|tgƒdS(Ni(    RtNomalDictGetPropertytChConfigtDef_PDict_ShopRefreshCntt PlayerControltNomalDictSetPropertyRtResetShopItemBuyCountt ResetType_Day(RR((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt ShopItemOnDaySs cCst|tgƒdS(N(RtResetType_Week(R((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytShopItemOnWeek]scCsç|s
dSg}tjƒ}x®t|jƒƒD]š}|j|ƒ}|jƒsVq/n|jƒ|krnq/n|jƒ}|jt    j
|ƒ}|dkr¢q/nt j |t    j
|dƒ|j |ƒq/W|rãt||ƒndS(Ni(t IpyGameDataPYtIPY_Datatxranget GetStoreCounttGetStoreByIndext GetLimitCntt GetResetTypetGetIDR
R tDef_PDict_ShopBuyCntR RtappendR(Rt resetTypeListt
syncIDListt
ipyDataMgrtitshopItemtshopIDt    curBuyCnt((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRas&    tc Cs1|s
dSg}g}xþ|D]ö}tjdi|d6ttƒ}|sNqnxÂ|D]º}|jƒ}|r¢|r¢||kr¢|j|ƒtj|||ƒn|jƒs´qUn|jƒ}    |j    t
j |    ƒ}
|
dkrèqUnt j |t
j |    dƒ|j|    ƒqUWqW|r-t||ƒndS(NtStoretShopTypei(RtGetIpyGameDataByConditionRt GetCostItemIDRt ItemControlert RecycleItemRRR
R RR RR( Rt shopTypeListtrecycleItemMailtrecycleCostItemIDListRRt ipyDataListtipyDatat
costItemIDR#R$((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytResetShopItemBuyCountByShopTypexs0       c Cs[i}d}x]|jƒD]O\}    }
|
dkr7qntjƒj|    ƒ} | sVdS|r‡|    |kr‡||    } tjd| ƒ} ntj|    |ƒ} | s£dS| jƒ} | j    ƒ}| j
ƒ}| j ƒ}| j ƒ}|rZ|j tj| ƒ}td||ƒ}||
krMtjd|| |    ||||
f|jƒƒdS|
|| <n||
|7}qW|dkr|dS|r•tj|||ƒStjd|||||f|jƒƒtj|||||ƒsÝdS|rWg}x[|jƒD]M\} }
|j tj| ƒ}tj|tj| ||
ƒ|j| ƒqöWt||ƒntS(s/ Ö§¸¶×Ô¶¯¹ºÂòÎïÆ·ÏûºÄ£¬´ÓÉ̳ÇÖйºÂò£¬Ö±½Ó¿ÛÇ®£¬²»²úÉúÎïÆ·
            Ò»°ãÓÃÓÚ»ù´¡É̵ê×Ô¶¯¹ºÂòÎïÆ·£¬²»¿¼ÂǸ´ÔÓµÄÏÞ¹ºÂß¼­
    @param isCheck: ÊÇ·ñÖ»ÊǼì²é£¬²»Ö´ÐÐʵ¼ÊÏûºÄÂß¼­
    @param shopItemIndexDict: Ö¸¶¨¹ºÂòµÄÉÌÆ·¶ÔÓ¦É̳DZíÉÌÆ·IDË÷Òý×ֵ䣬Èç¹ûûÓÐÖ¸¶¨ÉÌÆ·Ë÷Òý£¬Ôò°´ÏûºÄµÄ¼Û¸ñÀàÐÍ×Ô¶¯ËÑË÷É̳DZí
    iNR&s_×Ô¶¯¹ºÂò´ÎÊý²»×㣡shopType=%s,shopID=%s,itemID=%s,limitBuyCnt=%s,curBuyCnt=%s,canBuyCnt=%s < %ss]¿Û³ý×Ô¶¯¹ºÂòÏûºÄ: lackItemDict=%s,priceType=%s,totalMoney=%s,costType=%s,addLimitCountInfo=%s(titemst    GameWorldt GetGameDatatGetItemByTypeIDRtGetIpyGameDatat
ItemCommontGetShopItemPriceIpyDataRt GetShopTypet GetMoneyTypet GetMoneyNumRR
R RtmaxtLogt GetPlayerIDR t    HaveMoneytDebugLogtPayMoneyRRRR(Rt lackItemDictt    priceTypetcostTypetinfoDicttisChecktshopItemIndexDicttaddLimitCountInfot
totalMoneytitemIDtlackCnttcurItemR#R0Rt    itemMoneyt limitBuyCntR$t    canBuyCntR((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pytPayAutoBuyItem—sX 
          &       cCs;tjƒj|ƒ}|j}|j}t|||ƒdS(N(R4tGetPlayerManagertGetPlayerByIndextShopIDtBuyCountt    OnBuyItem(tindext
clientDatattickRR#tbuyCount((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt    PyBuyItemßs
        c    Csàtjd||fƒtjƒr'dS|dks?|dkrCdStjd|ƒ}|s_dS|jƒ}|jƒ}|dkrñ|jtj    |ƒ}t
d||ƒ}|dkrÙtjd||||fƒdS||krñ|}qñn|j ƒ|j ƒd}}    }
|j ƒ} g} |rF| j||    ||
gƒnxZ| D]R} | d \}}t| ƒdkr| dnd}| j||||gƒqMW| sÍtjd||f|jƒƒdS| dd}tjd||| fƒt|||||ƒs1tjd||f|jƒƒdS|jƒ}|jƒ|jƒ}}||9}i| d    6|d
6|d 6|d 6|tj6}|rÁ|rHtj|||tj||ƒ rHdSn‡|rH|rH|}tj|||ƒ\}}}|||}|dkr)tjd |||fƒdStj|||||dƒn|dkr·t||tjƒ}tj |tj    ||ƒtjd|||||fƒt!||gƒnt"j#|| ddt$igd|ƒdS(Ns)¹ºÂòÉ̳ÇÎïÆ·: shopID=%s,clientBuyCount=%siR&s:ÉÌÆ·ÏÞ¹º´ÎÊýÒÑÂú ! shopType=%s,shopID=%s,curBuyCnt=%s < %sis,Store shop item error! shopType=%s,shopID=%ss&shopType=%s,shopID=%s,totalItemList=%ss)Store shop item lock! shopID=%s,shopID=%st TotalItemListtClientBuyCountR'RTs9ËùÐèÏûºÄµÀ¾ß²»×ã! costItemID=%s,needItemCnt=%s,lackCnt=%stBuyItemsN¸üÐÂÉ̳ÇÎïÆ·ÏÞ¹º´ÎÊý: shopID=%s,curBuyCnt=%s,clientBuyCount=%s,updBuyCnt=%s/%steventt notifyDataEx(%R4RAt IsCrossServerRR7R:RR
R RR=t    GetItemIDt
GetItemCntt GetItemListExRtlentErrLogR?tCheckBuyItemUnlockR>R)R;R<tDef_Cost_Reason_SonKeyR RBtDef_Cost_BuyStoreItemR8tGetPackItemBindStateIndexInfotDelCostItemByBindtmintDef_UpperLimit_DWordRRR*tGivePlayerItemOrMailtFalse(RR#tclientBuyCountR0RROR$RPRKt    itemCounttisBindt
itemListExt totalItemListtitemExtitemIDExt itemCountExtisBindExt
mainItemIDR1RDt    itemPriceRFt needItemCnttcostItemIndexListtbindCntt    unBindCntRLt    updBuyCnt((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRVæsv          "   
(       %cCsß|jƒ}|jƒ}|tkrŸ|jƒsEtjd|ƒdS|jƒ}|dkrr|jtj    ƒ}n||krÛtjd|||fƒdSn<|t
krÛtj |tj |ƒsÛtjd|ƒdSnt S(NsÎÞ¹«»áÎÞ·¨¹ºÂò! shopID=%sis3¹«»áµÈ¼¶²»×ãÎÞ·¨¹ºÂò! shopID=%s,curFamilyLV=%s < %ss%¸ÃÉÌÆ·Ã»ÓÐËæ»ú½âËøÎÞ·¨¹ºÂò! shopID=%s(t GetUnlockTypetGetUnlockValuetUnlockType_FamilyLVt GetFamilyIDR4RAt GetFamilyLVR
R tDef_Player_Dict_FamilyLVtUnlockType_RandRefreshtGetDictValueByBittDef_PDict_ShopRandUnlockR(RRR#RyR0t
unlockTypet unlockValuet curFamilyLV((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRg.s"        cCs/tjƒj|ƒ}|j}t||ƒdS(N(R4RRRSR'R(RWRXRYRR((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt OnRefreshShopPs     ic Csntjdi|d6ttƒ}|s)dSi}g}x[|D]S}|jƒtkrZq<n|jƒ}|jƒ}    |j|    |gƒ|    ||<q<W|s®tj    d|ƒdS|j
t j |ƒ}
d\} } |t kr1tjddƒ}tjddƒ} | r1|
| kr1tjddƒ\} } q1ntjd    ||t|ƒ|
| | |fƒ|dkrmdS| r–| r–tj|| | d
ƒ r–dS|d }g}g}xí|r›t|ƒ|kr›|dkr›|d8}tj|ƒ}|søq¯n|j|ƒ|j|dƒ}    |    |g|kr?|j|    |gƒntj|t j|dƒ|j
t j|ƒr¯tj|t j|dƒ|j|ƒq¯q¯Wtjd t|ƒ|fƒtjd t|ƒ|fƒx-|D]%\}}tj|t j|dƒqÝW|sD|
d7}
tj|t j ||
ƒtjd|
ƒn|rZt||ƒnt|||ƒdS(NR&R's+¸ÃÉ̵êûÓпÉËæ»úˢнâËøµÄÉÌÆ·! shopType=%sit StoreHeroSouliiisbËæ»úË¢ÐÂÉ̵êÉÌÆ·: shopType=%s,randCnt=%s/%s,refreshCnt=%s,moneyType=%s,moneyValue=%s,sysRefresh=%stRefreshShopItemi
sËæ»úË¢ÐÂÉÌÆ·Êý: %s,%ssÊ£ÓàËø¶¨ÉÌÆ·Êý: %s,%ss¸üÐÂË¢ÐÂÉ̵ê´ÎÊý=%s(ii(RR(RR€R†RRRR4RfR
R R tShopType_HeroSoult
GetFuncCfgtGetFuncEvalCfgRAReR RBtGetResultByWeightListtgettremovetSetDictValueByBitRˆRRRR(RRtrandCntRR/tshopIDWeightDicttrandWeightListR0R#t
randWeightt
refreshCntt    moneyTypet
moneyValuetfreeCnttdoCnttrandShopIDListtsyncBuyCntIDListt_((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRVsp         # %
'
 
cCsð|s€g}tjdi|d6ttƒ}|s5dSxH|D]=}|jƒ}tj|tj|ƒslq<n|j|ƒq<Wn|sŠdSt    j
ƒ}||_ t |j tj|ƒdƒ|_||_t|jƒ|_tj||ƒdS(NR&R'iú(RR(RRR4R‡R RˆRtChPyNetSendPackttagSCShopRefreshItemInfoR'RlR
R t
RefreshCntt
ShopIDListRetCountt NetPackCommont SendFakePack(RRRR/R0R#t
clientPack((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRŸs&       "    c
CsIg}|r[xõ|D]A}tjƒ}||_|jtj|ƒ|_|j|ƒqWn©tj    ƒ}xšt
|j ƒƒD]†}|j |ƒ}|j ƒs¡qzn|jƒ}|jtj|ƒ}|dkrÕqzntjƒ}||_||_|j|ƒqzW|sdStjƒ}    ||    _t|    jƒ|    _tj||    ƒdS(Ni(R¢ttagSCShopItemBuyCntRTR
R RtBuyCntRRRRRRRRttagSCShopItemBuyCntInfot
BuyCntListReR¦R§R¨(
RRt
buyCntListR#tbuyInfoR R!R"tbuyCntR©((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyRµs6                        (R R4R§R*R¢R RR8RRR‚R†RRRR    RRRR2tDef_Cost_UnknownRotNoneRQR[RVRgRŒRRR(((sxD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Event\EventSrc\FunctionNPCCommon.pyt<module>2s6                        
         H        H    "    I