hxp
2026-01-13 89de49779c1f2381ac2b34848aab662fbf643093
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
^tdic@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZeddXƒ\ZZZd„Zd„Zedd„Zd„Zd    „Z d
„Z!d „Z"d „Z#de$dddd „Z&d„Z'ddd„Z(dd„Z)ddd„Z*d„Z+d„Z,d„Z-d„Z.d„Z/d„Z0ed„Z1dd„Z2e$d„Z3d„Z4d„Z5d„Z6d„Z7dd„Z8d „Z9d!„Z:d"„Z;d#„Z<d$„Z=d%„Z>d&„Z?d'„Z@d(„ZAd)„ZBdddd*„ZCid+„ZDid,„ZEd-„ZFd.„ZGd/„ZHd0„ZId1„ZJed2„ZKed3„ZLed4„ZMdejNd5„ZOiejNd6„ZPd7ied8„ZQed9„ZRd:„ZSd;„ZTd<„ZUd=id>„ZVd?„ZWd@„ZXd7dA„ZYdB„ZZdC„Z[dD„Z\dE„Z]dF„Z^dG„Z_dH„Z`dI„ZadJ„ZbdK„Zced7ie$dL„Zdd7ie$dM„Zed7dN„ZfdO„ZgdP„ZhdQ„ZidR„ZjdS„ZkdT„ZldU„ZmdV„ZndW„ZodS(YiÿÿÿÿNiiic
Cstjr dStjdƒgt_gt_gt_it_tjƒ}xOt    d|j
ƒƒD]8}|j |ƒ}|j ƒ}t |ƒr tjj|ƒn|jdƒ}|jƒ}|tjkrÝtjj|ƒnR|tjkr/|jdƒ}|jdƒ}|dkr/|r/|tj|<q/nt|ƒr`xZt|jƒƒD]C}|j|ƒ}    |    soqNn|    tjkrNtjj|    ƒqNqNWq`q`Wtjr¼tjdtjƒntjrÜtjdtjƒntjrütjdtjƒntjdtjƒtt_dS(Ns¼ÓÔØÎïÆ·Êý¾Ý...iis"ÿÈÕÓÐʹÓôÎÊýÏÞÖÆµÄÎïÆ·IDÁбí: %ss×°±¸¼¼ÄÜIDÁбí: %ss"×Ô¶¯×ª»¯ÎªÎïÆ·¸öÊýµÄÎïÆ·IDÁбí: %ss»õ±ÒÀàÐÍ1¸öÊýÁ¿¶ÔÓ¦ÎïÆ·ID: %s(t
PyGameDatat
InitPyItemt    GameWorldtLogtEquipItemSkillIDListtDailyUseCountLimitItemIDListtAutoTransformCountItemIDListtMoneyItemIDDictt GetGameDatatranget GetItemCountt    GetItemAtt GetItemTypeIDtGetCanUseCountDailytappendtGetEffectByIndext GetEffectIDtChConfigtDef_Effect_ItemCounttDef_Effect_ItemGiveMoneytGetEffectValuet
GetIsEquiptxrangetGetAddSkillCountt GetAddSkilltTrue(
tgameDatatit findItemDatatitemIDtitemEfftcurEffIDt
moneyValuet    moneyTypet
skillIndext itemSkillID((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR5sL                                          cCs/|tjkr$tjd|ƒdStj|S(Ns(ûÓиûõ±ÒÀàÐͶÔÓ¦µÄÎïÆ·ID! moneyType=%si(RRRtErrLog(R!((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetMoneyItemIDesc     Cs¾t||ƒ}|stSt}xpt|ƒD]b}xY|D]Q}tj|ƒ}    tj|||ƒ}
tj||    |||
|ƒr9t    }q9q9Wq,W|rº|rºt
j
|ƒ} | j ƒnt    S(N( t__GetAddSkillListtFalseRt SkillCommont GetBuffTypet
SkillShelltGetAddBuffValuet    BuffSkilltAddBuffNoRefreshStateRt PlayerControltRefreshPlayerAttrByBuff( t    curPlayertcurItemttickt
needResulttuseCntt addSkillListt refreshResultt_taddSkilltbuffTypetaddBuffValueListt playerControl((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytItemUseSkillAddBuffss   c    Cság}tjƒ}|jƒ}x¼td|jƒƒD]¥}|j|ƒ}|sUq4n|j|ƒ}|s…tjd||fƒgStj    |ƒ}tj
|||j ƒ|j ƒƒsÌt j|dƒgS|j|ƒq4W|S(Nis+###²ß»®Ìî±íÒì³££¬ÎïÆ· = %s´¥·¢¼¼ÄÜʧ°Ü = %stXW_ZZ_ResInvalidation(RRR R    RRtGetSkillBySkillIDRR(R)tCheckCanAddBufftGetSkillTypeIDt
GetSkillLVR.t
NotifyCodeR(    R0R1R5Rt    curItemIDRt
curSkillIDtcurSkillR9((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR&’s"  $cCs¡g}xBt|jtjƒƒD](}|jtj|ƒ}|j|ƒqW|sxIt|jƒƒD]2}|j|ƒ}|dkr‰Pn|j|ƒqdWn|S(Ni(RtGetUserAttrCountt ShareDefinetDef_IudetAddSkillIDtGetUserAttrByIndexRRR(R1taddSkillIDListRtskillID((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemSkillIDList®s cCs#|jƒ}d|ddg}|S(Ns%st0(R (R1t
itemTypeIDtmsgList((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GetItemXMLMsgÀs Ac
Csœtjƒjtjƒ}|jƒ}xqtjD]f}|j|ƒ}xNt    d|j
ƒƒD]7}|j |ƒ}t |ƒs€qYn|j ƒ}|tjtjgkrªqYn|tjkrë|jƒdkr|j|jƒdƒqYqn*|tjkr||jƒkrqYqn|jƒ}|tjkrItj|d|gƒni|d6|jƒd6|jƒd6|jƒd6}    tj|d|    ƒqYWq.WdS(    NiitPK_hwj35_82012tItemIDt
CreateTimetIsBindtItemGUIDtTime(Rt GetGameWorldtGetGameWorldDictByKeyRGtDef_Notify_WorldKey_ServerDaytGetItemManagerRtDef_RealityTimeItem_PacktGetPackR    tGetCounttGetAttCheckItemCanUsetGetEndureReduceTypetDef_EquipReduceType_DaytDef_EquipReduceType_ServerDayt GetRemainHourt SetRemainHourt GetExpireTimeR t IPY_GameWorldt
rptRecycleR.RBt GetCreateTimet    GetIsBindtGetGUIDtDataRecordPackt DR_DeleteItem(
R0t    serverDayt itemManagert    packIndextcurPackRR1t
reduceTypeRCtdataDict((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytClearDayTimeItem
s6            
  cCsHttj|dƒƒjdƒdd}tjd|ƒtj|ƒS(Nis is     23:59:59s ÎïÆ·¹ýÆÚʱ¼ä(tstrRtGetDatetimeByDiffDaystsplittDebugLogtChangeTimeStrToNum(tdaysttimeStr((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt__GetEndDayTimeNum:s*c    CsJ|dks| r.tjd||fƒdStjƒj|ƒ}|sMdS|jƒtjksw|jƒtjkr™|j    t
j t t j ƒƒƒn|jƒtjkrÄ|j    t
j dƒn|jƒtjkrï|j|jƒƒn|jƒtjkrl|jƒ}tjƒjt
jƒ}||kr\|jƒtjd|||fƒdS|j|ƒntj||ƒ|dkrž|j    t
j|ƒn|jƒtjkrÃtj|ƒnvt|ƒrþt|||ƒ}|dkr9|jƒdSn;t |ƒr9t!|||ƒ}|dkr9|jƒdSnt"||ƒ|S(su ´´½¨ÎïÆ·
    @param isAuctionItem: ÊÇ·ñÅÄÆ·£¬Ä¬ÈÏ·ÇÅÄÆ·
    @param expireTime: ÓÐЧʱ¼ä£¬Ê±¼äµ¥Î»ÓÉʱЧÀàÐ;ö¶¨
    is-´´½¨ÎïÆ·¸öÊý²»ÄÜÉÙÓÚ1! itemID=%s,itemCount=%sNisOÎïÆ·ÓÐЧÆÚ³¬¹ýÓÐЧµÄ¿ª·þÌì, ²»¿É´´½¨!itemID=%s,serverDay=%s,outTimeServerDay=%s(#RR$tGetItemFactoryt
CreateItemR`RtDef_EquipReduceType_RTimeItemtGetTypetDef_ItemType_CanUseByCDTimet SetUserAttrRGtDef_IudetCreateTimetintttimetDef_EquipReduceType_TimeRaRdReRbRWRXRYtCleart ItemControlert SetItemCounttDef_IudetExpireTimetDef_ItemType_Herot
PlayerHerot InitHeroItemRtGetCreateEquipAttrtNonet GetIsMGGuayutGetCreateMGGuayuAttrtAddCreateItemAttr(    Rt    itemCountt isAuctionItemt
expireTimeR0t setAttrDictt curSingleItemtoutTimeServerDayRm((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCreateSingleItem?sN"  
       
 
 cCsN|s
dSx=|jƒD]/\}}tj||ƒ}t|tƒr&|ddkrÂd}t|tƒrr|}n=t|tƒst|tƒr¯|r¯tj|ddƒ}n|j||ƒqFt|tƒsàt|tƒrF|j|ƒx3|D](}tj|dƒ}|j    ||ƒqôWqFqtj
d|||j ƒfƒqWdS(Niis8###AddCreateItemAttr unknown key:%s, value:%s, itemID=%s( titemsRtToIntDeft
isinstanceRƒtlistttupleRt ClearUserAttrt AddUserAttrRR (R1R•tkeytvaluetv((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR‘…s&    $  $cCs\|dkri}ni}|s'dn    |jƒ}|jƒ}|jtjƒ}|dkr<tjd|ƒ}|sydS|jƒr›d|t    tj
ƒ<n|j ƒ|t    tj ƒ<|j ƒ|t    tjƒ<|jƒ|t    tjƒ<|jƒ|t    tjƒ<|jƒ|t    tjƒ<tjd||||f|ƒ|St|ƒrXt|||ƒS|S(s+»ñÈ¡Éú³É×°±¸ËùÓÐÊôÐÔ
    @param curPlayer: ¿ÉÄÜΪNone
    @param setAttrDict: Ö±½ÓÉèÖÃÎïÆ·µÄÊôÐÔ {key:value, ...} keyÖ§³Ö  ShareDefine.Def_IudetXXX×Ö·û´® »ò ×Ô¶¨key
    @return: None - Òì³£Çé¿ö£¬ÎïÆ·ÊµÀýÐèÒªclear
            equipAttrDict - Éú³ÉºóµÄ×îÐÂÊôÐÔk:v×ֵ䣬¿ÉÖ±½ÓÓÃÓÚ AddCreateItemAttr
    it AppointItemNisH    ×°±¸¶¨ÖÆÊôÐÔ: itemID=%s,appointID=%s,equipAttrDict=%s,setAttrDict=%s(RŽt GetPlayerIDR tgetRGtDef_CItemKey_AppointIDt IpyGameDataPYtGetIpyGameDatatGetCancelUseLimitRttDef_IudetCancelUseLimitt    GetItemLVtDef_IudetItemLVt GetBaseAttrIDtDef_IudetBaseAttrIDtGetBaseAttrValuetDef_IudetBaseAttrValuetGetLegendAttrIDtDef_IudetLegendAttrIDtGetLegendAttrValuetDef_IudetLegendAttrValueRRwtGetIsMainEquiptGetCreateMainEquipAttr(R1R0R•t equipAttrDicttplayerIDRt    appointIDtipyData((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR£s,          c#Csi}|jƒ}|jƒ}|jƒ}|s4|Stjd|ƒ}tjd|ƒ}| sf| rj|S|jƒ}    |jƒ}
tj} |j    t
t j ƒdƒ} | sötj ddƒ\} }tt|    | dƒ|    |ƒ}tj|ƒ} n| |t
t j ƒ<tjd|| ||f|
ƒ|j    t
t jƒƒ}|j    t
t jƒƒ}|dkr²|dkr²t|ƒt|ƒkr²||t
t jƒ<||t
t jƒ<nó|jƒ}tj|jƒgtj|jƒgtj|jƒgg}gg}}xR|D]J\}}ttj ddƒƒ}|s>qn|j!|ƒ|j!|ƒqW|r‹||t
t jƒ<||t
t jƒ<ntjd    ||f|
ƒ|j    t
t j"ƒƒ}|j    t
t j#ƒƒ}|dkr.|dkr.t|ƒt|ƒkr.||t
t j"ƒ<||t
t j#ƒ<n·g}g}|j$ƒ}|j%ƒ}|j&ƒ}tjd
|||f|
ƒxt'|dƒD] \}}t(|d |ƒs°q‹nt)|d |ƒƒ}|sÒq‹ntj*|ƒ|| }x¬|D]¤}||krqðn|j    ||ƒ} |  sðt| ƒd kr9qðn| \}!}"tj+|!|"ƒ}|j!|ƒ|j!|ƒtjd ||||!|"f|
ƒqðWq‹W|rË||t
t j"ƒ<||t
t j#ƒ<ntjd||f|
ƒtjd||f|
ƒ|S(Nt
EquipColort
EquipPlaceit MainEquipDropiis<Éú³ÉÖ÷Ïß×°±¸: itemID=%s,itemLV=%s,itemColor=%s,equipPlace=%sis*    baseAttrIDList=%s,baseAttrValueList=%ss&    libCntList=%s,attrRangeDict=%s, %ss GetAttrLib%sis/        libNum=%s,attrID=%s,attrValue=%s(%s~%s)s.    legendAttrIDList=%s,legendAttrValueList=%ss1    ×°±¸×îÖÕÊôÐÔ: equipAttrDict=%s,setAttrDict=%s(,R t GetItemColort GetEquipPlaceR§R¨tGetLVR¤trandomtuniformR¥RtRGR¬tGetFuncEvalCfgR    tmaxtchoiceRRwR®R°RŽtlentGetBaseAttrProportionRt
AttrID_Atkt
GetAtkStept
AttrID_Deft
GetDefStept AttrID_MaxHPt    GetHPSteptevaltGetFuncCompileCfgRR²R´t GetAttrRangetGetAttrRangeDicttGetAttrLibCntListt    enumeratethasattrtgetattrtshuffletrandint(#R1R0R•R·Rt    itemColort
equipPlacet colorIpyDatat placeIpyDatatplayerLVR¸t    randfloattitemLVtlowLVthighLVt
randLVListtbaseAttrIDListtbaseAttrValueListtattrProportiont attrInfoListtattrIDtattrStept    attrValuetlegendAttrIDListtlegendAttrValueListtattrRangeDefaultt attrRangeDictt
libCntListtnumtattrCntt libAttrListt randAttrListt    attrRangetattrMintattrMax((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR¶Æs˜           0   0    
     +c% CsÈ|dkri}n|s!dn    |jƒ}|jƒ}|jƒ}|jƒ}i}|sadStd|jtjƒƒ}t    j
d|ƒ}    t    j
d|ƒ}
t    j
d|ƒ} |     sÇ|
sÇ| rËdSi|    j ƒ|
j ƒgtj 6|    jƒ|
jƒgtj6|    jƒ|
jƒgtj6|    jƒ|
jƒgtj6} | jƒ} tj}|jttjƒdƒ}|sÁt    jddƒ\}}tt||dƒ||ƒ}tj |ƒ}n||ttjƒ<t!j"d    ||||f|ƒ|jttj#ƒƒ}|jttj$ƒƒ}|dkr}|dkr}t%|ƒt%|ƒkr}||ttj#ƒ<||ttj$ƒ<n¬| j&ƒ}| j'ƒ}|
j(ƒ}|
j)ƒ}|
j*ƒ}tj+|ƒ|| }|g|}t!j"d
|||f|ƒg}g}xñ|D]é}|| krm| |\}}t,t    j-dd ƒƒ}t!j"d ||||| f|ƒno|j||ƒ} |  s t%| ƒdkržq n| \}!}"tj.|!|"ƒ}t!j"d |||!|"f|ƒ|j/|ƒ|j/|ƒq W|r)||ttj#ƒ<||ttj$ƒ<n|t    jddƒkrªt    jddƒ}#|#rhtj |#ƒnd}$|$rª|$g|ttj0ƒ<t!j"d||$f|ƒqªnt!j"d||f|ƒ|S(s/»ñÈ¡Éú³ÉÃü¸ñØÔÓñËùÓÐÊôÐÔ
    @param curPlayer: ¿ÉÄÜΪNone
    @param setAttrDict: Ö±½ÓÉèÖÃÎïÆ·µÄÊôÐÔ {key:value, ...} keyÖ§³Ö  ShareDefine.Def_IudetXXX×Ö·û´® »ò ×Ô¶¨key
    @return: None - Òì³£Çé¿ö£¬ÎïÆ·ÊµÀýÐèÒªclear
            equipAttrDict - Éú³ÉºóµÄ×îÐÂÊôÐÔk:v×ֵ䣬¿ÉÖ±½ÓÓÃÓÚ AddCreateItemAttr
    iNit    MGGanwuLVtMGGuayuQualityt MGGuayuTypetMinggeTYis:Éú³ÉÃü¸ñØÔÓñ: itemID=%s,itemLV=%s,itemColor=%s,itemType=%ss"    attrIDList=%s,libAttrCnt=%s,%sisJ        attrID=%s,attrValue=%s,baseValue=%s,plusValue=%s,attrProportion=%ss%        attrID=%s,attrValue=%s(%s~%s)iis&        itemType=%s,randSkillTypeID=%ss1    ØÔÓñ×îÖÕÊôÐÔ: equipAttrDict=%s,setAttrDict=%s(1RŽR¤R RR¾RÄtNomalDictGetPropertyRtDef_PDict_MGGanwuLVR§R¨t
GetAtkBaset
GetAtkPlusRÈt
GetDefBaset
GetDefPlusRÊt    GetHPBaset    GetHPPlusRÌtGetAtkSpeedBasetGetAtkSpeedPlustAttrID_AtkSpeedRÇRÁRÂR¥RtRGR¬RÃR    RÅRRwR²R´RÆtGetFixedAttrIDt GetAttrIDLibt GetAttrLibCntRÐRÑRÖRÎRÏR×RRH(%R1R0R•R¸RtitemTypeRØR·tgwLVt    gwIpyDataRÚt typeIpyDatat baseAttrDictRäRÝRÞRßRàRáRéRêt fixedAttrIDt    attrIDLibt
libAttrCntRëRìRñt
attrIDListRæt    baseValuet    plusValueRèRòRóRôtyxSkillTypeIDListtrandSkillTypeID((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR*sŠ               0      
           cCs`t|tƒrt|ƒ}nt|tƒr0ndS|jddƒ}|j|t|ƒƒdS(Ns t(R›tdictRttreplacet SetUserDataRÆ(R1tdataInfotUserData((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytSetItemUserData‘scCsdS(N((R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt MakeEquipGSœscCst|ƒstStj||tƒs)tSxOt|jƒƒD];}|j|ƒjƒ}|dkrgtS||kr<tSq<WtS(Ni(    R_R'R‡tCheckItemUseLVR    tGetEffectCountRRR(R0R1t
effectListRteffectID((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemByEffectID¦s   cCsj|jƒjtjƒ}xKt|jƒƒD]7}|j|ƒ}t|||gƒs[q+n||fSWdS(N(RZR\RftrptItemR    R]R^R (R0RtbackPackRR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByEffectºs cCsd|jƒjtjƒ}xEt|jƒƒD]1}|j|ƒ}t|||gƒs[q+n|SWdS(N(RZR\RfR!R    R]R^R (R0RR"RR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByEffectExÉscCsp|jƒj|ƒ}xTt|jƒƒD]@}|j|ƒ}t|ƒsOq(n|jƒ|krgq(n|SWdS(N(RZR\R    R]R^R_R (R0t
findItemIDRoR"RR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByItemIDÞs c CsUt|tƒrHg}x6|jƒD]\}}|j||gƒq"Wn|}i}x¢|D]š}|d \}}t|ƒdkr|dnd}tjƒj|ƒ}    |    s´q[ntj    |    ƒ}
t
j |
|    ||ƒ} |j |
dƒ| ||
<q[WxU|jƒD]G\}
} | t ||
| ƒkr|rItj|d|
gƒntSqWtS(NiitGeRen_chenxin_676165(R›RR™RRÆRRtGetItemByTypeIDRtGetItemPackTypeR‡tGetItemNeedPackCountR¥tGetItemPackSpaceR.RBR'R( R0titemInfotisNotifytitemListRR’tneedPackSpaceDicttitemR“titemDatatpackTypet    needSpace((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackEnoughïs* "cCsd}|tjkr„xhtt|ƒƒD]T}|jtj||fƒ}|rVq(n|d7}|dkr(||kr(Pq(q(W|S|jƒj|ƒ}xdt    d|j
ƒƒD]M}|j |ƒ}|j ƒsÖq¯n|d7}|dkr¯||kr¯Pq¯q¯W|S(Nii( RGtDef_VPack_TypeListRt GetVPackCntRùRtDef_PDict_VPackItemRZR\R    R]R^tIsEmpty(R0t    packindextgetCountt    itemSpaceRt itemKeyDataRpR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR+s&
 
cCsÍ|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|s"tSq"WtS|j    ƒj
|ƒ}x<t d|j ƒƒD]%}|j |ƒ}|jƒrtSqW|rÉtj|d|gƒntS(NiR'(RGR5RR6RùRR7RR'RZR\R    R]R^R8R.RB(R0R9R-RR<RpR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackHasSpace6s cCs®|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|r"tSq"WtS|j    ƒj
|ƒ}x<t d|j ƒƒD]%}|j |ƒ}|jƒstSqWtS(Ni(RGR5RR6RùRR7R'RRZR\R    R]R^R8(R0R9RR<RpR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackIsEmptyQs cCs®|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|s"|Sq"WdS|jƒj|ƒ}x<t    d|j
ƒƒD]%}|j |ƒ}|j ƒr|SqWdS(Niÿÿÿÿi( RGR5RR6RùRR7RZR\R    R]R^R8(R0R9RR<RpR1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetEmptyIndexInPackis cCs d}|tjkr*tjddƒ}n|tjkrNtjddƒ}nl|tjkrrtjddƒ}nH|tjkr–tjddƒ}n$|tjkrºtjddƒ}n|sðtj    ddiƒ}|j
t |ƒdƒ}nt j d    ||fƒ|S(
NitInitBagCellCountitInitDepotCellCountt TreasureSetitDogzPackis,±³°üÀàÐͳõʼ¸ñ×ÓÊý: packType=%s,initCount=%s(RfR!R§t
GetFuncCfgt rptWarehouseRGt rptTreasuret rptDogzItemt rptDogzEquipRÃR¥RtRRw(R2t    initCounttbagInitCntDict((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetPackInitCount|s cCs¦tjddiƒ}t|ƒ|kr+dS|t|ƒ}|sEdS|jtj|ƒ}t|| ƒ}|t|ƒkr¢|t|ƒ|d}||7}n|S(NtOpenPackiiiÿÿÿÿ(R§RÃRtRùRtDef_Player_Dict_PackBuyCnttsumRÆ(R0R2t openCntDictt openCntListtbuyCnttopenCnttaddCnt((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetPackOpenItemCnts cCsÖtjddiƒ}|sdS|r4t|ƒgn    |jƒ}tjƒ}g|_xX|D]P}t|ƒ}tjƒ}||_    |j
t j |ƒ|_ |jj|ƒq\Wt|jƒ|_tj||ƒdS(NRLi(R§RÃRttkeystChPyNetSendPackttagSCPackBuyInfot BuyInfoListRƒt tagSCPackBuytPackTypeRùRRMtBuyCntRRÆtCountt NetPackCommont SendFakePack(R0R2ROt syncTypeListt
clientPackt packTypeStrtbuy((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytSyncPackBuyCnt¡s!            cCs-|tjkrdStj|}tj|ƒS(Ni(RtDef_VPackCnt_DictR§RD(R9tkeyStr((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR6¸s cCs‹tjdƒ}||jƒkrCtj||j|ƒ|gƒntjdƒ}||kr‡tjd|||jƒ||gƒndS(Ntneed_eff_box_idtneed_wnotify_idi(t ReadChConfigtGetEvalChConfigRUR.RBR¥t WorldNotifyt GetPlayerName(R0t    useItemIDt
itemIDDictt wNotifyIDDict((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytUseItemSpecialNotifyÃs" cCs0|jƒ}|stS|jƒ|kr,tStS(sRÅжÏÎïÆ·ÊÇ·ñְҵϵ¿ÉÓÃ
        ÎïÆ·±íÖÐÖ°ÒµÏÞÖÆ¹æÔò: 0ΪͨÓã»·Ç0°Ùλ´ú±íÖ°Òµ
    (t GetJobLimitRtGetJobR'(R0R1t itemJobLimit((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckJobÒs  cCs+| s|jƒrdS|jƒr'dStS(N(R8t GetIsLockedR(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR_âs
 cCs/t|ƒ\}}|r+|dkr+tSntS(Ni(tGetItemRemainingTimeR'R(R1t isExpireItemR”((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemCanUseByExpireTimeís
 cCsÊt}|jƒ}d}|tjtjgkrÀt}|jtjƒ}|s]|j    ƒ}n|jtj
ƒ}|dkr„|}n2t dt t j ƒƒ|ƒ}t d||ƒ}||fS||fS(s? »ñÈ¡ÎïÆ·Ê£Óàʱ¼ä£¬Ãë
    @return: ÊÇ·ñʱЧÎïÆ·, Ê£Óàʱ¼ä 
    i(R'R`RR…R~Rt GetUserAttrRGR‰ReR‚RÄRƒR„(R1RvRqt remainingTimetcurItemExpireTimet    startTimetcurItemPastTime((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRus      
cCstS(N(R'(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt CheckHasStone$scCs?|jƒj|ƒ}|j|ƒ}| s7|jƒr;tStS(N(RZR\R^R8R'R(R0Rot
equipIndext roleEquipPacktcurEquip((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt CheckHasEquip9s
cCsIxBt|jƒƒD].}|j|ƒ}|jƒ|kr@qn|SWdS(N(R    RRR(R1RRteffect((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemEffectByEffectIDIs cCs)t|tjƒ}|sdS|jdƒS(Niÿÿÿÿi(RƒRtDef_Item_Eff_UseClassLVR(R1R‚((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemUseClassLVXscCs¥i|jƒd6|d6|jƒd6|jƒd6}|d    krM||d<n|d    krf||d<n|jƒr¡|jƒdkr¡|ji|jƒd6ƒn|S(
s, ÎïÆ·ÐÅÏ¢¼Ç¼ 
    @param curItem: ÎïÆ·
    RRt    ItemCountRTRUt BeforeCountt
AfterCounts{}RN(R RiRjRŽt GetUserDatatupdate(R1t
writeCountt beforeCountt
afterCountRr((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemNoteDict_s    cCsÌ||d<|tjkrA|}|tjkrptj|}qpn/tj}| rp|tjkrptj|}n|sd}n|ržtj||||ƒn|tjtj    gksÈ|tj
krÈndS(NRZtUnknown( RtItemGiveTypeListtItemGiveTypeDicttItemGive_UnknownRktDR_SetPlayerItemRfR!RGRFR5(R0R2t    eventNamet itemNoteDicttnoteDictt operateType((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
DR_GetItemrs
        'cCsŽ||d<|tjkrA|}|tjkrJtj|}qJn    tj}tj||||ƒ|tjtj    gksŠ|tj
krŠndS(NRZ( RtItemDelTypeListtItemDelTypeDicttItemDel_UnknownRkRlRfR!RGRFR5(R0R2R”R•R–R—((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
DR_DelItemŒs
    'cCs-t|ƒstS|jƒtjkr)tStS(N(R_R'RRtDef_EquipItemTypeR(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemIsEquip¤s
 
cCstS(N(R'(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckNoteEquipGSµsc
Cst}g}t}xÝt|jƒƒD]É}|j|ƒ}t|ƒsLq%n| re|jƒreq%n|jdƒjƒ|kr†q%n| r¢|jƒr¢t}n|jƒ}    ||    krÔ||    8}|j    |ƒq%d}t}|j    |ƒPq%W||||fS(Ni(
R'R    R]R^R_RiRRRR(
t findEffectIDt curItemPackt    needCounttisBindt    hasEnought itemIndexListtfindItemIsBindRtfindItemR’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByEff_ExÀs,       
 c    CsÔt}g}x»t|jƒƒD]§}|j|ƒ}t|ƒsFqn| r_|jƒr_qn|jdƒjƒ|kr€qn|jƒ}||kr²||8}|j|ƒqt    }|j|ƒPqW||fS(Ni(
R'R    R]R^R_RiRRRR(    R R¡R¢R£R¤R¥RR1R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByEffìs$   
 c
Csìt}g}xÓt|jƒƒD]¿}|j|ƒ}t|ƒsFqn|jƒ|kr^qn| rw|jƒrwqn|jdƒjƒ|kr˜qn|jƒ}    ||    krÊ||    8}|j    |ƒqt
}|j    |ƒPqW||fS(Ni( R'R    R]R^R_R RiRRRR(
R%R R¡R¢R£R¤R¥RR1R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemFromPack_ByIDAndEffs(   
 c    Csåt}g}xÌt|jƒƒD]¸}|j|ƒ}t|ƒsFqn|jƒ|kr^qn|jƒr|tkr‘qq‘n|tkr‘qn|jƒ}||krÃ||8}|j    |ƒqt
}|j    |ƒPqW||fS(N( R'R    R]R^R_R RitUseStuffMode_NoBindtUseStuffMode_BindRR(    R%titemPacktneedCntt useItemModeR¤R¥RR1R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByID=s*          
 c
Cs
t}g}t}xèt|jƒƒD]Ô}|j|ƒ}t|ƒsLq%n|jƒ|krdq%n|jƒr…|tkr—q%q—n|tkr—q%n| r³|jƒr³t    }n|jƒ}    ||    krå||    8}|j
|ƒq%t    }|j
|ƒPq%W|||fS(N( R'R    R]R^R_R RiR«R¬RR(
R%R­R®R¯R¤R¥R¦RR1R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByID_Exfs0              
 c
Cst}g}t}xît|jƒƒD]Ú}|j|ƒ}t|ƒsLq%n|jƒ|krdq%n|jƒr…|tkr—q%q—n|tkr—q%n| r³|jƒr³t    }n|jƒ}    ||    krå||    8}|j
|ƒq%d}t    }|j
|ƒPq%W||||fS(Ni( R'R    R]R^R_R RiR«R¬RR(
R%R­R®R¯R¤R¥R¦RR1R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByID_ExEx”s2              
 c Csggg}d\}}|jƒj|ƒ}xÃtd|jƒƒD]¬}|j|ƒ}    t|    ƒsjqCn|    jƒ|kr‚qCn|    jƒ}
|    jƒrÔ|dj|ƒ||
7}|dkrï||krïPqïqC|dj|ƒ||
7}qCW|||fS(sÙ »ñÈ¡±³°üÏûºÄµÀ¾ß°ó¶¨¼°Î´°ó¶¨Ë÷ÒýÇé¿ö
    @param needCount: ËùÐè¸öÊý, Ä¬Èϰó¶¨ÓÅÏÈ£¬µ±ÕÒµ½ÒѾ­×ã¹»µÄ¸öÊýºó²»ÔÙ±éÀú£¬¼õÉÙÎÞÓñéÀú
    @return: ¿ÉÏûºÄÎïÆ·Áбí[[°ó¶¨ÎïÆ·Ë÷Òý], [²»°ó¶¨ÎïÆ·Ë÷Òý]], °ó¶¨¸öÊý, Î´°ó¶¨¸öÊý
    ii(ii(    RZR\R    R]R^R_R RiR( R0RR¢R2tconsumeItemIndexListtbindCntt    unBindCntRpRR1R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetPackItemBindStateIndexInfo½s$     
c CsŒ|jƒj|ƒ}|\}    }
||krLt|||    |t||ƒn<t|||    |t||ƒt|||
||t||ƒdS(N(RZR\t
ReduceItemRR'( R0tcostItemIndexListR´RµtdelCnttdelEventt saveDataDictR2Rpt bindIndexListtunBindIndexList((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelCostItemByBindÝs   RcCskd}|}    |sd}nxI|D]A}
|j|
ƒ} | rS| jƒrSt}n| jƒ} | jƒ}|| krïtj| ƒr·t| | | dƒ} t|t    j
|| |ƒntj | d|j ƒ|j ƒ|jƒƒ|| 8}q"tj| ƒr3t| || | |ƒ} t|t    j
|| |ƒntj | | ||j ƒ|j ƒ|jƒƒPq"W|S(NiR·(R^RiRR]R R‡tItemNeedRecordRŽRœRfR!RˆR¤tGetAccIDRk(R0R¡R¥t reduceCountt makeItemBindR”R»t
needSysmsgRNt totalUseCntt    itemIndexR1R’R•((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR·ïs0              " cCs)i}i}i}t|tƒsEx'|D]\}}|||<q(Wn|}i}i}    i}
i} xät|jƒƒD]Ð} |j| ƒ} t| ƒsqvn| jƒ}||kr»qvn| jƒ}| jƒrö|
}|j|dƒ|||<n | }|    j|dƒ||    |<||kr/g||<n||}|j    | ƒqvWxÒ|j
ƒD]Ä\}}|j|dƒ|    j|dƒ}t d||ƒ}|r«|||<n|rW||}|ræ|
j|gƒ| j|gƒ}n"| j|gƒ|
j|gƒ}||g||<qWqWW||fS(sT»ñµÃÐèÒªÏûºÄµÄ²ÄÁÏÎïÆ·ÐÅÏ¢, ÓÅÏȿ۳ý°ó¶¨ÎïÆ·
    @param costItemInfo: ÐèÒªÎïÆ·ÊýÁ¿[(itemID,itemCnt), ...] »ò  {itemID:itemCnt, ...}
    @param itemPack: ±³°ü
    @param bindFirst: ÊÇ·ñ°ó¶¨ÓÅÏÈ, True-°ó¶¨ÓÅÏÈ£¬ False-·Ç°ó¶¨ÓÅÏÈ
    @return: È±ÉÙµÄÎïÆ·¸öÊýÐÅÏ¢×Öµä{itemID:ȱÉÙ¸öÊý}, ¿Û³ýÎïÆ·ÐÅÏ¢×Öµä{itemID:[ɾ³ýË÷ÒýÁбí, É¾³ý¸öÊý], ...}
    i( R›RRR]R^R_R RiR¥RR™RÄ(t costItemInfoR­t    bindFirstt lackItemDictt delInfoDictt costItemDictt
needItemIDt needItemCnttbindItemCntDicttnoBindItemCntDicttbindItemIndexDicttnoBindItemIndexDictRR1RCt curItemCountt    indexDictt    indexListt itemCntTotaltlackCntR¹((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetCostItemIndexListsP       
" 
%"cCsŸd}x’|jƒD]„\}}|dkr1qntjƒj|ƒ}|sPdSt|jƒtjƒ}|dkr‰tjd|ƒdS|||7}qW|S(Nis"É̳DZíδÅäÖÃÎïÆ·×êʯÏûºÄ!itemID=%s(    R™RRR(tGetShopItemPriceR RftTYPE_Price_Gold_MoneyR$(RÈt    totalGoldRRÕR1titemGold((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetAutoBuyItemNeedGoldUs  cCs#t||ƒ}|sdS|jƒS(s »ñÈ¡É̳ÇÎïÆ·¶ÔÓ¦¼Û¸ñ i(tGetShopItemPriceIpyDatat GetMoneyNum(Rt    priceTypeRº((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR×iscCsÔidddgtj6ddgtj6}d }||krŠxr||D]=}tjdi|d6|d6|d    6d
tƒ}|rFPqFqFWn&tjdi|d6|d    6d
tƒ}|sÐtjd ||fƒn|S( s »ñÈ¡É̳ÇÎïÆ·¶ÔÓ¦¼Û¸ñ iiiiitStoretShopTypeRRt    MoneyTypet    isLogNones8ÕÒ²»µ½¶ÔÓ¦»õ±ÒÀàÐÍÉ̵ê³öÊÛ¸ÃÎïÆ·! itemID=%s,priceType=%sN(    RfRØtTYPE_Price_Gold_PaperRŽR§tGetIpyGameDataByConditionR'RR$(RRÞtpriceTypeShopTypeDictRºtshopType((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRÜqs - &R·c        Csct}xV|jƒD]H\}}|s+qnt||||t||ƒ}|rUtn|}qW|S(N(R'tvaluesR·R(    R0R­RÉRºR»tdelItemHasBindRÓR¹t hasBindItem((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt DelCostItemƒsc Csý|jƒj|ƒ}t}|dkr0t}nxÆtd|jƒƒD]¯}|j|ƒ}t|ƒsmqFn|jƒ}    |jƒ}
|    |kr—qFn|j    ƒ} |sµ||
krÅ|j
ƒqFnt j ||
||j ƒ|jƒ|jƒƒdSWdS(Ni(RZR\R'RR    R]R^R_R RiR†R‡RˆR¤RÀRk( R0Rot    delItemIDt delItemCountt    missionIDR­t
delAllItemtindexR0RNR’tcurBind((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelMissionItem”s(          
" cCstS(N(R(R0R1tbindType((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDoLogic_ItemBindType¼sc
Csõ|jƒ}t|tƒrDt|ƒ|kr1dS|t|ƒ}n|}|sTdSt|ƒ}t|tj|ƒ}||kr•tj    |dƒdSx=|D]5}|d \}}    t
j |||    dtjgƒqœW|rñt
j |||ƒnt S(NtGeRen_chenxin_998371ii(RqR›RRtRÆR+RfR!R.RBR‡tGivePlayerItemtNotifyGiveAwardInfoR(
R0t awardItemInfoR”tjobR.R3t    packSpaceR,RR’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GiveAwardItemÒs&    #c    CsË|jƒj|ƒ}|dks3||jƒkr7dS|j|ƒ}t|ƒsVdS|jƒj|ƒ}|dks‰||jƒkrdS|j|ƒ}|dks´|jƒr¸dSt||||ƒS(Ni(RZR\R]R^R_RŽRttDoLogicSwitchItem(    R0t srcBackpackt desBackPacktsrcIndext    destIndextsrcPacktsrcItemtdestPacktdestItem((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDoLogicSwitchItemExôs cCs2|jƒrt||||ƒSt||||ƒS(N(R8tPutInt
SwitchItem(R0R1t
switchItemRo((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRûs cCsô|tjgkr(t||tjƒn|tjgkrPt||tjƒn|tjtjgkrãtj    |ƒr¤tj
|t |ƒt j d|jƒƒntj    |ƒrãtj
|t |ƒt j d|jƒƒqãn|j|ƒtS(Ns(SwitchItem ÅÄÆ·ÉèÖÃΪ·ÇÅÄÆ·!curItemID=%ss+SwitchItem ÅÄÆ·ÉèÖÃΪ·ÇÅÄÆ·!switchItemID=%s(RftrptEquipRóRtDef_BindType_DoEquipBindt rptHorseEquipR!RER‡tGetIsAuctionItemtSetIsAuctionItemR'RRwR tSwitchR(R0R1RtputInPackIndex((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRs cCs|jƒs&tjd|jƒƒdS|tjgkrNt||tjƒn|tj    gkrvt||tjƒn|tj
tj gkrÍt j |ƒrÍt j|t|ƒtjd|jƒƒqÍn|jƒtjkrò|j|ƒn%|jƒtjkr|j|ƒntS(NtputInErrs&PutIn ÅÄÆ·ÉèÖÃΪ·ÇÅÄÆ·!switchItemID=%s(R8RR$tGetIDRfRRóRR    R
R!RER‡R R R'RwR tGetGameWorldItemTypet gwitRoleItemRtgwitSingleItemt
AssignItemR(R0t    emptyItemRR((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR:s  cCs|jƒtjkS(N(RRR(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRZscCs|jƒtjkS(N(RRtDef_MainEquipType(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRµ]scCs|jƒtjkS(N(RRtDef_DogzEquiipType(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetIsDogzEquipascCs|jƒtjkS(N(RRtDef_MGGuayuType(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyResc    Cs’tjƒ}|j|ƒxrtd|jƒƒD][}|j|ƒ}|jdƒ}|jƒ}|jdƒ}||kr/||kr/|Sq/WdS(Ni(
RRtFilterItemByTypeR    tGetFilterItemCountt GetFilterItemRRRRŽ(    Rt itemEffectIDtfindEffectValueRRt curFindItemtcurFindItemEffecttcurFindItemEffectIDtcurFindItemEffectValue((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemFromDataByEffValueqs   c
Csåt}g}xÉt|jƒƒD]µ}|j|ƒ}t|ƒsFqn|jdƒ}|jƒ|krmqn|jdƒ|krˆqn|jƒ}    ||    krº||    8}|j|ƒqd}t    }|j|ƒPqW|||fS(Ni(
R'R    R]R^R_RRRRR(
RteffectAR¡R¢R¤R¥RR1R‚R’((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemIndexListFromPackByEffAs(   
 c CsÙ|jƒ}|jƒ}|jƒ}    ||kr\tjd|||f|jƒƒ|}n|sqtj|ƒr¦t|||||ƒ}
t    |t
j ||
|ƒntj ||||j ƒ|jƒ|jƒƒdS(Ns4DelItem, delCnt = %s < itemCnt = %s, itemTypeID = %s(R R]RiRR$RR‡R¿RŽRœRfR!RˆR¤RÀRk( R0R1R¹RÃt
recordNameR»t    isForceDRt curItemTypeIDt
curItemCntt curItemBindR•((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelItem¼s    #     c
    Cs•xŽt|jƒƒD]z}|j|ƒ}t|ƒs:qn|jƒ}||krXqn|j|ƒ}    t|||    t|||ƒ|sPqqWdS(N(RR]R^R_RjtpopR+R(
R0R¡tdelItemByGUIDDictR&R»R'RR1titemGUIDR¹((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt DelItemByGUIDÖs   c Cso|tjkrdSxB|D]:}|jtj||fƒ}|sHqnt}d}d}|tjkrétj|ƒ}tj    |ƒ}    t
j ƒj |ƒ}
|
s®t |ƒn    |
jƒ}d||    df}|
oãtj|
|    ƒ}ntj|tj||fdƒ|ri|d6dd6|    dd6} t|||sGd    |n|| ƒqqWtj|||ƒdS(
s É¾³ýÐéÄâ±³°üÎïÆ· NiRs%s LV%siRRR†tPlusLVsVPack_%s(RGR5RùRR7R'trptRuneR‡t GetRuneItemIDtGetRuneItemPlusLVRRR(RttGetNametIsRuneItemNeedRecordR.tNomalDictSetPropertyRœtSync_VPackItem_Clear( R0Rot    placeListR”tplaceR<t isNeedRecordRtitemNametplusLVt curItemDataRr((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt DelVPackItemæs,  *cCs
|jƒS(N(RÀ(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemClassLVscCs
|jƒS(N(t GetGearScore(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetEquipGearScorescCs |j|ƒS(N(t SetGearScore(R1R¡((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytSetEquipGearScore    scCs5tjdt|ƒ|jƒƒ}|s+dS|jƒS(NtEquipPlaceIndexMapiÿÿÿÿ(R§R¨R?R¿t GetGridIndex(R1Rº((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetEquipPackIndex s!cCs
|jƒS(N(tGetMaxAddSkillCnt(R1((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR scCs•| s|jƒriStj|ƒ}t|ƒsK|jƒ|jƒ|gSi}|jƒ|d<|jƒ|d<||d<t|jƒƒ|d<|S(NRRR\t IsAuctionItemR(R8R‡R RžR R]RtR‰(R1R“t addItemDict((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetMailItemDicts 
 cCsWi}t|tƒs$t|tƒrªt|ƒ}|dkrM|d|d<n|dkrz|ddkrz|d|d<n|dkrS|drSt|dƒ|d<qSn©t|tƒrÆ||d<nt|ƒsãtjdƒiS|jƒ|d<|j    ƒdkr|j    ƒ|d<nt
j |ƒr4d|d<n|j ƒrS|j ƒ|d<n|S(    sb»ñÈ¡ÎïÆ·ÐÅÏ¢¶ÔÓ¦µÄjsonÐÅÏ¢
    @param itemInfo: Ö§³ÖÁбí [itemID, itemCount, isAuctionItem], Ö§³Ö¶¯Ì¬ÁÐ±í³¤¶È£¬Ë÷Òý´ú±íÊôÐԹ̶¨
                        Ö§³ÖÎïÆ·ÊµÀý, Èç¹ûÊÇʾÀýʱ±ØÐëÔÚ¸øÍæ¼Ò֮ǰÏÈ»ñÈ¡³öÀ´£¬·ÀÖ¹¸øÍæ¼Òºó¸ÃÎïÆ·ÊµÀý±»Çå¿Õ
                        
    @return: {"ItemID":101, "Count":10, "IsAuctionItem":1, "UserData":"×Ô¶¨ÒåÊôÐÔ×Ö·û´®"}
    iRRiR\iRHsÎïÆ·Îª¿Õ!ÎÞ·¨»ñÈ¡JsonItemÐÅÏ¢!R( R›RœRRÆRƒR_RR$R R]R‡R R‰(R,titemDicttinfolen((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GetJsonItemGs,       cCs
g}|S(sû ¸ù¾ÝÁ¶µ¤µÈ¼¶²îÒìµÈ¼¶¹ýÂËÈ¨ÖØÁбíÖв»Âú×ãµÄÎïÆ·£¬¹ýÂË×îµÍÍæ¼ÒµÈ¼¶ÒªÇóÎïÆ·  ·µ»ØÐµÄÈ¨ÖØÁбí
    @param weightList: ÎïÆ·È¨ÖØÐÅÏ¢Áбí
    @param alchemyDiffLV: ÊÇ·ñ¹ýÂ˵ô´óÓÚX¼¶µÄÁ¶µ¤µÈ¼¶ÎïÆ·£¬0-²»¹ýÂË£¬1-¹ýÂËÇÒ¶ÁĬÈÏÅäÖã¬>1-ÌØÊ⹦ÄÜÖ¸¶¨µÄ¹ýÂ˵ȼ¶
    ((R0t
weightListt alchemyDiffLVtresultWeightList((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GetWeightItemListByAlchemyDiffLVgscCsEtjƒ}|jƒ||_||_||_tj||ƒdS(N(RVttagMCMakeItemAnswerR†tMakeTypetResultt    MakeValueR]R^(R0tmakeTypet    isSuccesst    makeValuetmakeItemAnswer((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytSyncMakeItemAnswerqs 
            i(pRR,R.R(RfRRhRGR‡Rkt EventReporttChItemR§RVR]RtChEquipR*R‹RÁtmathR„tjsonR    tUseStuffMode_AllR«R¬RR%RR<R&RLRPRsR{R'RŽR˜R‘RR¶RRRR R#R$R&R4R+R=R>R?RKRTRcR6RoRsR_RwRuR}RRƒR…RŽR˜RœRžRŸR¨R©RªR°R±R²R!R¶R¾R·RÖRÛR×RÜRêRñRóRúRRûRRRRµRRR#R%R+R/R>R?RARCRFR RJRMRQRZ(((soD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt<module>sÒ                               0                J    0    F    # dg         
                 % "                                                                           ,    '    * ) . ) % @                (     "                                          -                         .