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
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
264
265
266
ñWR\c@s«ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZeddYƒ\ZZZd„Ze dd„Z!d„Z"d„Z#dd    „Z$d
„Z%d „Z&dddd „Z'd „Z(d„Z)d„Z*d„Z+d„Z,d„Z-d„Z.dd„Z/e0d„Z1d„Z2d„Z3d„Z4d„Z5ddd„Z6dd„Z8d„Z9d„Z:d„Z;d „Z<d!„Z=d"„Z>d#„Z?d$„Z@d%„ZAd&„ZBd'„ZCdddd(„ZDid)„ZEid*„ZFid+„ZGd,„ZHd-„ZId.„ZJd/„ZKd0„ZLed1„ZMed2„ZNed3„ZOdejPd4„ZQid5„ZRdie d6„ZSe d7„ZTd8„ZUd9„ZVd:d;„ZWd<„ZXd=„ZYd>„ZZd?„Z[d@„Z\dA„Z]dB„Z^dC„Z_dD„Z`dE„ZadF„ZbdG„Zce die0dH„ZdddI„ZedJ„ZfdK„ZgdL„ZhdM„ZidN„ZjdO„ZkdP„ZldQ„ZmdR„ZndS„ZoddT„ZpdU„ZqdV„ZrdW„ZsdX„ZtdS(ZiÿÿÿÿNiiicCs°tjr dStjdƒgt_tjƒ}xQtd|jƒƒD]:}|j|ƒ}t    |ƒrEtjj
|j ƒƒqEqEWtjr£tjdtjƒnt t_dS(Ns¼ÓÔØÎïÆ·Êý¾Ý...is"ÿÈÕÓÐʹÓôÎÊýÏÞÖÆµÄÎïÆ·IDÁбí: %s( t
PyGameDatat
InitPyItemt    GameWorldtLogtDailyUseCountLimitItemIDListt GetGameDatatranget GetItemCountt    GetItemAttGetCanUseCountDailytappendt GetItemTypeIDtTrue(tgameDatatit findItemData((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR9s                   c     Cs¾t||ƒ}|stSt}xpt|ƒD]b}xY|D]Q}tj|ƒ}    tj|||ƒ}
tj||    |||
|ƒr9t    }q9q9Wq,W|rº|rºt
j
|ƒ} | j ƒnt    S(N( t__GetAddSkillListtFalsetxranget SkillCommont GetBuffTypet
SkillShelltGetAddBuffValuet    BuffSkilltAddBuffNoRefreshStateR t PlayerControltRefreshPlayerAttrByBuff( t    curPlayertcurItemttickt
needResulttuseCntt addSkillListt refreshResultt_taddSkilltbuffTypetaddBuffValueListt playerControl((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytItemUseSkillAddBuffRs   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 RtGetAddSkillCountt GetAddSkilltGetSkillBySkillIDRRRtCheckCanAddBufftGetSkillTypeIDt
GetSkillLVRt
NotifyCodeR
(    RRR R t    curItemIDRt
curSkillIDtcurSkillR$((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRqs"  $cCs#|jƒ}d|ddg}|S(Ns%st0(R (Rt
itemTypeIDtmsgList((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GetItemXMLMsg‘s AcCs?|dkrdSd|jƒd|jƒd|jƒd|jƒd|jƒd|jƒg}|dkr†tjdd|ƒnµ|dkr¨tjdd|ƒn“|dkrÊtjdd    |ƒnq|d
kr;|sàdS|jdd|ƒ|jd d|ƒt||ƒ}|d  |}tjdd |ƒndS(Nis%siitItem_Link_AppraisalitItem_Link_FactoryitPet_liubo_436832iiitGeRen_lhs_318691(i(tGetIDtGetNameR t    GetIsBindRt WorldNotifytinserttGetNotifySuperItemInfo(RRt
notifyTypet    useItemIDR5titemInfo((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytNotify_SuperItemßs&
'-    c
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 GetGameWorldtGetGameWorldDictByKeyt ShareDefinetDef_Notify_WorldKey_ServerDaytGetItemManagertChConfigtDef_RealityTimeItem_PacktGetPackRtGetCounttGetAttCheckItemCanUsetGetEndureReduceTypetDef_EquipReduceType_DaytDef_EquipReduceType_ServerDayt GetRemainHourt SetRemainHourt GetExpireTimeR t IPY_GameWorldt
rptRecycleRR/t GetCreateTimeR=tGetGUIDtDataRecordPackt DR_DeleteItem(
Rt    serverDayt itemManagert    packIndextcurPackRRt
reduceTypeR0tdataDict((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytClearDayTimeItems6            
  cCsHttj|dƒƒjdƒdd}tjd|ƒtj|ƒS(Nis is     23:59:59s ÎïÆ·¹ýÆÚʱ¼ä(tstrRtGetDatetimeByDiffDaystsplittDebugLogtChangeTimeStrToNum(tdaysttimeStr((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt__GetEndDayTimeNumLs*cCsutjƒj|ƒ}|sdS|jƒtjkrV|jtjt    t
j
ƒƒƒn|jƒtj kr|jtjdƒn|jƒtj kr¬|j |jƒƒn|jƒtjkr)|jƒ}tjƒjtjƒ}||kr|jƒtjd|||fƒdS|j |ƒn|r?|jdƒntj||ƒ|dkrq|jtj|ƒn|S(NisOÎïÆ·ÓÐЧÆÚ³¬¹ýÓÐЧµÄ¿ª·þÌì, ²»¿É´´½¨!itemID=%s,serverDay=%s,outTimeServerDay=%si(RtGetItemFactoryt
CreateItemRVRPtDef_EquipReduceType_RTimeItemt SetUserAttrRMtDef_IudetCreateTimetintttimetDef_EquipReduceType_TimeRWRZR[RXRKRLRNtCleartErrLogt    SetIsBindt ItemControlert SetItemCounttDef_IudetExpireTime(titemIDt    itemCounttisBindt
expireTimet curSingleItemtoutTimeServerDayRb((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCreateSingleItemVs0"  
     cCs:t|ƒstjdƒdSt|ƒ}t||ƒdS(Ns²»ÉèÖÃ×°±¸ÆÀ·Ö(tCheckNoteEquipGSRRlt CalcEquipGStSetEquipGearScore(Rtvalue((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt MakeEquipGSƒs     cBCsã    t|ƒsdSi}xrt|jƒƒD]^}|j|ƒ}|sHPn|jƒ}|dkrdPn|j|dƒ|jdƒ||<q)Wt|ƒ}|jƒ}|j    ƒ}t
j d|||ƒ}|j t jƒ}    |j t jƒ}
|    r[|    |
kr[x[t|    ƒD]J}|jt j|ƒ} |jt j|ƒ} |j| dƒ| || <q
Wn|jt jdƒ} |jt jdƒ| }|jt jdƒ| }|jt jdƒ}|jt jdƒ}|jt jdƒ}|jt jdƒ}|jt jdƒ}|jt jdƒ|s)dn    |jƒ}|jt jdƒ|sTdn    |jƒ}|jt jdƒ|sdn    |jƒ}|jt jdƒ|sªdn    |j ƒ}|jt j!dƒ|sÕdn    |j"ƒ}|jt j#dƒ|sdn    |j$ƒ}|jt j%dƒ|s+dn    |j&ƒ}|jt j'dƒ|sVdn    |j(ƒ}|jt j)dƒ|sdn    |j*ƒ}|jt j+dƒ|s¬dn    |j,ƒ}|jt j-dƒ|s×dn    |j.ƒ}|jt j/dƒ|sdn    |j0ƒ} |jt j1dƒ|s-dn    |j2ƒ}!|jt j3dƒ|sXdn    |j4ƒ}"|jt j5dƒ|sƒdn    |j6ƒ}#|jt j7dƒ|s®dn    |j8ƒ}$|jt j9dƒ|sÙdn    |j:ƒ}%|jt j;dƒ|sdn    |j<ƒ}&|jt j=dƒ|s/dn    |j>ƒ}'|jt j?dƒ|sZdn    |j@ƒ}(|jt jAdƒ|s…dn    |jBƒ})|jt jCdƒ|s°dn    |jDƒ}*|jt jEdƒ|sÛdn    |jFƒ}+|jt jGdƒ|sdn    |jHƒ},|jt jIdƒ|s1dn    |jJƒ}-|jt jKdƒ|s\dn    |jLƒ}.|jt jMdƒ|s‡dn    |jNƒ}/|jt jOdƒ|s²dn    |jPƒ}0|jt jQdƒ|sÝdn    |jRƒ}1|jt jSdƒ|sdn    |jTƒ}2|jt jUdƒ|s3dn    |jVƒ}3|jt jWdƒ|s^dn    |jXƒ}4|jt jYdƒ|s‰dn    |jZƒ}5|jt j[dƒ|s´dn    |j\ƒ}6|jt j]dƒ|sßdn    |j^ƒ}7|jt j_dƒ|s
dn    |j`ƒ}8|jt jadƒ|s5dn    |jbƒ}9|jt jcdƒ|s`dn    |jdƒ}:|jt jedƒ};|sŽdn    |jfƒ}<|j t jgƒ}=|j t jhƒ}>|=r.    |=|>kr.    x[t|    ƒD]J}|jt jg|ƒ} |jt jh|ƒ} |j| dƒ| || <qÝWn|jt jidƒ}?|jt jjdƒ}@tk|ƒr‹    tltmjndt
joddƒƒƒ}AnTtp|ƒr¾    tltmjndt
joddƒƒƒ}An!tltmjndt
jodƒƒƒ}A|AS(    sB¼ÆËã×°±¸ÆÀ·Ö
        ÆÀ·Ö×é³É£º×°±¸»ù´¡ + ´«ÆæÊôÐÔ + ¾ø°æÊôÐÔ
    it EquipGSParamitEquipGSFormula3tEquipGSFormulaitEquipGSFormula4i(qR†RtGetEffectCounttGetEffectByIndext GetEffectIDtgettGetEffectValuetGetItemClassLVt GetItemColortGetItemQualityt IpyGameDataPYtGetIpyGameDatatGetUserAttrCountRMtDef_IudetLegendAttrIDtDef_IudetLegendAttrValuetGetUserAttrByIndextDef_Effect_AtktDef_Effect_MinAtktDef_Effect_MaxAtktDef_Effect_MaxHPtDef_Effect_DeftDef_Effect_ArmorDefAddPertDef_Effect_IceAtktDef_Effect_IceDeftDef_Effect_AddAtkByPert
GetAtkPerCtDef_Effect_DamagePert GetDamagePerCtDef_Effect_SuperHitRatetGetSuperHitRateCtDef_Effect_SuperHitPertGetSuperHitPerCtDef_Effect_DamReducePertGetDamReducePerCtDef_Effect_MaxHPPert GetMaxHPPerCtDef_Effect_DefPert
GetDefPerCtDef_Effect_LuckyHitRatetGetLuckyHitRateCtDef_Effect_PetDamPert GetPetDamPerCtDef_Effect_PerLVAtkt GetPerLVAtkCtDef_Effect_MissRatet GetMissRateCtDef_Effect_HitRatet GetHitRateCtDef_Effect_DamBackPertGetDamBackPerCtDef_Effect_PerLVMaxHPtGetPerLVMaxHPCtDef_Effect_DropEquipPertGetDropEquipPerCtDef_Effect_DropMoneyPertGetDropMoneyPerCtDef_Effect_IgnoreDefRateReducetGetIgnoreDefRateReduceCtDef_Effect_DamChanceDeftGetDamChanceDefCtDef_Effect_SuperHitReducetGetSuperHitReduceCtDef_Effect_SkillAtkRatetGetSkillAtkRateCtDef_Effect_SpeedPert GetSpeedPerCtDef_Effect_SkillAtkRateReducetGetSkillAtkRateReduceCtDef_Effect_HittGetHitCtDef_Effect_MisstGetMissCtDef_Effect_SkillAddPer1tGetSkillAddPer1CtDef_Effect_SkillAddPer2tGetSkillAddPer2CtDef_Effect_SkillAddPer3tGetSkillAddPer3CtDef_Effect_SkillAddPer4tGetSkillAddPer4CtDef_Effect_SkillAddPer5tGetSkillAddPer5CtDef_Effect_SkillAddPer6tGetSkillAddPer6CtDef_Effect_SkillAddPer7tGetSkillAddPer7CtDef_Effect_SkillReducePer1tGetSkillReducePer1CtDef_Effect_SkillReducePer2tGetSkillReducePer2CtDef_Effect_SkillReducePer3tGetSkillReducePer3CtDef_Effect_SkillReducePer4tGetSkillReducePer4CtDef_Effect_SkillReducePer5tGetSkillReducePer5CtDef_Effect_SkillReducePer6tGetSkillReducePer6CtDef_Effect_SkillReducePer7tGetSkillReducePer7CtDef_Effect_AtkSpeedt GetAtkSpeedCtDef_IudetOutOfPrintAttrIDtDef_IudetOutOfPrintAttrValuetDef_Effect_OnlyFinalHurttDef_Effect_PVPAtkBackHPtGetIsDogzEquiptevaltFormulaControltGetCompileFormulat
GetFuncCfgtGetIsZhuXianEquip(BRtattrDictRt    curEffectteffectIDtclassLVtcolort itemQualitytgsParamIpyDatatlegendAttrIDCnttlegendAttrValueCnttattrIDt    attrValuetAtktMinAtktMaxAtktMaxHPtDeft ArmorDefPertIceAtktIceDeftAtkPert    DamagePert SuperHitRatet SuperHitPert DamReducePertMaxHPPertDefPert LuckyHitRatet    PetDamPertPerLVAtktMissRatetHitRatet
DamBackPert
PerLVMaxHPt DropEquipPert DropMoneyPertIgnoreDefRateReducet DamChanceDeftSuperHitReducet SkillAtkRatetSpeedPertSkillAtkRateReducetHittMisst SkillAddPerAt SkillAddPerBt SkillAddPerCt SkillAddPerDt SkillAddPerEt SkillAddPerFt SkillAddPerGtSkillReducePerAtSkillReducePerBtSkillReducePerCtSkillReducePerDtSkillReducePerEtSkillReducePerFtSkillReducePerGtAtkSpeedt    AtkSpeedCtoutOfPrintAttrIDCnttoutOfPrintAttrValueCntt OnlyFinalHurtt PVPAtkBackHPR‰((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR‡Œsª   '   !++++++++++++++++++++++++++++++++++++++! ' '!cCspd}|jƒjtjƒ}xKt|jƒƒD]7}|j|ƒ}|jƒrXq1n|t|ƒ7}q1W|S(Ni(    RORRRMtrptZhuXianEquipRRSRTtIsEmptytGetEquipGearScore(RtequipScoreTotaltzhuXianEquipPackt
equipIndextcurEquip((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetZhuXianEquipTotalGSõs cCst|ƒstStj||tƒs)tSxOt|jƒƒD];}|j|ƒjƒ}|dkrgtS||kr<tSq<WtS(Ni(    RURR|tCheckItemUseLVRRRR‘R (RRt
effectListRRÿ((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemByEffectIDs   cCsj|jƒjtjƒ}xKt|jƒƒD]7}|j|ƒ}t|||gƒs[q+n||fSWdS(N(RORRR\trptItemRRSRTRF(RRÿtbackPackRR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByEffects cCsd|jƒjtjƒ}xEt|jƒƒD]1}|j|ƒ}t|||gƒs[q+n|SWdS(N(RORRR\RGRRSRTRF(RRÿRHRR((s`.\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(RORRRRSRTRUR (Rt
findItemIDRdRHRR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByItemID?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( RMtDef_VPack_TypeListRt GetVPackCnttNomalDictGetPropertyRPtDef_PDict_VPackItemRORRRRSRTR=(Rt    packindextgetCountt    itemSpaceRt itemKeyDataReR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemPackSpaceUs&
 
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(NitGeRen_chenxin_676165(RMRMRRNRORPRPR RRORRRRSRTR=RR/(RRQtisNotifyRRTReR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackHasSpacews cCs®|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|r"tSq"WtS|j    ƒj
|ƒ}x<t d|j ƒƒD]%}|j |ƒ}|jƒstSqWtS(Ni(RMRMRRNRORPRPRR RORRRRSRTR=(RRQRRTReR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackIsEmpty’s cCs®|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|s"|Sq"WdS|jƒj|ƒ}x<t    d|j
ƒƒD]%}|j |ƒ}|j ƒr|SqWdS(Niÿÿÿÿi( RMRMRRNRORPRPRORRRRSRTR=(RRQRRTReR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetEmptyIndexInPackªs cCs-|tjkrdStj|}tj|ƒS(Ni(RPtDef_VPackCnt_DictR—Rû(RQtkeyStr((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRNÁs cCsdS(N((RRBt
singleItem((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytNeedNotifyItemÍs"tcCs9dStjdƒ}|jdgƒ}|s/dS|jƒ}|d}|d}    |d}
|jƒ} |jƒ} |s‰tjƒjƒn|}| | f|
krètjdƒ} | j| dƒ}t    j
d||||| | gƒdSd|d|d|gt ||ƒ}|r|nd}t    j
d||ƒdS(    Ntneed_notify_id_dictiiitneed_notify_id_mark_dicttGeRen_admin_272921s%stGeRen_admin_671654( t ReadChConfigtGetEvalChConfigR’t GetPlayerNameR RSRtGetMaptGetMapIDRR>R@(RRtnpcIDt
notifyMarktmapIDt
itemIDDictt
notifyListt
playerNamet notifyQualityt notifyStarLVt
itemIdListR0t curItemCounttitemIDMarkDictR5((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytNotifyItemDropByKillõs0 
 
 
  "
 
c Cs|dkr|jƒ}ndgd}|jƒ|d<|jƒ|d<|jƒ|d<dtj||ƒ|d<|jƒ}|r–|dkr–|nd|d    <||d
<tj    |ƒ}|sÅdnt
j |d t ƒ|d <t j|tj|ƒ|d <|jtj|ƒd}gtdtjdƒD]"}|jtj||fƒ^q+}di|d6|d6|d6|d<g}    |jƒjtjƒ}
xvt|
jƒƒD]b} | tjkrÂq§n|
j| ƒ} | s§| jƒrêq§n|    j| jƒ| jƒgƒq§Wd|    |d<|S(sá×°±¸Ìáʾ³¬Á´½ÓÐÅÏ¢»ã×Ü
    <a><Word info=item id=%s0/>|showitem=%s0 isbind=%s1 itemcnt=%s2 stone=%s3 userdata=%s4 place=%s5 equippartsuite=%s6 strengthenlv=%s7 equipwash=%s8 equipitems=%s9</a>
    isbind£ºÊÇ·ñ°ó¶¨
    itemcnt£ºÎïÆ·ÊýÁ¿
    stone£º±¦Ê¯ÐÅÏ¢ [stoneItemID, ...]
    userdata£º´«ÆæÊôÐÔ
    place£º×°±¸Î»
    equippartsuite£ºÌ××°ÐÅÏ¢ Í¬²é¿´Íæ¼Ò
    strengthenlv£ºÇ¿»¯µÈ¼¶
    equipwash£ºÏ´Á·ÐÅÏ¢ Í¬²é¿´Íæ¼Ò£¬µ¥²¿Î»
    equipitems£º¸÷²¿Î»ÎïÆ·id [[×°±¸Î»,ÎïÆ·id] ...]
    R_i
iiis%sis{}iit ensure_asciiiitPlacetLVtValueii    N( tNonet GetEquipPlaceR R=RStOperate_EquipStonetGetEquipIndexStoneIDListt GetUserDatatPlayerViewCacheTubet__GetEquipPartSuiteInfotjsontdumpsRtChEquiptGetEquipPartStarLVR\trptEquipRORPtDef_PDict_EquipWashLVRtOperate_EquipWashtDef_EquipWashMaxAttrCounttDef_PDict_EquipWashValueRORRRMt RoleEquipTypeRTR=R
tGetItemPlaceIndex( RRtplaceRmtuserDatat    suiteInfotwashLVtattrNumt    valueListt
equipItemst playerEquipRARB((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR@ s8   "
%<##cCs‹tjdƒ}||jƒkrCtj||j|ƒ|gƒntjdƒ}||kr‡tjd|||jƒ||gƒndS(Ntneed_eff_box_idtneed_wnotify_idi(RdRetkeysRR/R’R>Rf(RRBRlt wNotifyIDDict((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytUseItemSpecialNotifyUs" cCsr|jƒ}|stS|jtjƒdkr;t||ƒS|jƒ|dkrntj|ƒ|dkrntSt    S(sŠÅжÏÎïÆ·ÊÇ·ñÖ°Òµ¿ÉÓÃ
        ÎïÆ·±íÖÐÖ°ÒµÏÞÖÆ¹æÔò: 0ΪͨÓã»·Ç0°Ùλ´ú±íÖ°Òµ£¬Ê®Î»ºÍ¸öλΪְҵ½×Êý, Ö°Òµ½×ÏòϼæÈÝ£¬¸ß½×¿ÉʹÓõͽ×ÎïÆ·
    iid(
t GetJobLimitR t GetUserAttrRMtDef_IudetCancelUseLimittCheckJobtGetJobRt
GetJobRankR(RRt itemJobLimit((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
JobUseableds  /cCs4|jƒ}|stS|jƒ|dkr0tStS(sŒÅжÏÎïÆ·ÊÇ·ñְҵϵ¿ÉÓÃ
        ÎïÆ·±íÖÐÖ°ÒµÏÞÖÆ¹æÔò: 0ΪͨÓã»·Ç0°Ùλ´ú±íÖ°Òµ£¬Ê®Î»ºÍ¸öλΪְҵ½×Êý, Ö°Òµ½×ÏòϼæÈÝ£¬¸ß½×¿ÉʹÓõͽ×ÎïÆ·
    id(R˜R RœR(RRRž((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR›us  cCs+| s|jƒrdS|jƒr'dStS(N(R=t GetIsLockedR (R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRU…s
 cCs/t|ƒ\}}|r+|dkr+tSntS(Ni(tGetItemRemainingTimeRR (Rt isExpireItemR‚((s`.\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(RRVRPRxRsR R™RMR~R[RutmaxRvRw(RR¢Rft remainingTimetcurItemExpireTimet    startTimetcurItemPastTime((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR¡©s      
cCs*t|ƒstS|jƒ|kr&tStS(N(RURtGetTypeR (Rt    checkType((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemByTypeÉs
 cCstS(N(R(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt CheckHasStone×scCs?|jƒj|ƒ}|j|ƒ}| s7|jƒr;tStS(N(RORRRTR=RR (RRdRAt roleEquipPackRB((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt CheckHasEquipìs
cCsIxBt|jƒƒD].}|j|ƒ}|jƒ|kr@qn|SWdS(N(RRRR‘(RRÿRteffect((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemEffectByEffectIDüs cCs)t|tjƒ}|sdS|jdƒS(Niÿÿÿÿi(R°RPtDef_Item_Eff_UseClassLVR“(RR¯((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemUseClassLV scCs¥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: ÎïÆ·
    RFt    ItemCountRHRIt BeforeCountt
AfterCounts{}tUserDataN(R R=R_RyR}tupdate(Rt
writeCountt beforeCountt
afterCountRg((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemNoteDicts    cCs°||d<|tjkrA|}|tjkrJtj|}qJn    tj}|ritj||||ƒn|tjtj    gks|tj
kr¬t j |d|||ƒndS(NtPackTypei( RPtItemGiveTypeListtItemGiveTypeDicttItemGive_UnknownR`tDR_SetPlayerItemR\RGRMt rptTreasureRMt EventReporttWriteEvent_item_record(RtpackTypet    eventNamet itemNoteDicttnoteDictt operateType((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
DR_GetItem%s
    'cCs§||d<|tjkrA|}|tjkrJtj|}qJn    tj}tj||||ƒ|tjtj    gks‡|tj
kr£t j |d|||ƒndS(NR¼i( RPtItemDelTypeListtItemDelTypeDicttItemDel_UnknownR`RaR\RGRMRÁRMRÂRÃ(RRÄRÅRÆRÇRÈ((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
DR_DelItem:s
    'cCsCt|dƒ}|j|ƒ|jƒ|d<tj|||ƒdS(NiRÄ(R»R·tGetItemPlaceTypeR`tDR_EquipMachining(RRBRÅtaddDictRÇ((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDR_EquipItemChangeMs
 cCs-t|ƒstS|jƒtjkr)tStS(N(RURR©RPtDef_EquipItemTypeR (R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemIsEquipZs
 
cCs6t|ƒstS|jƒtjddƒkr2tStS(NtEquipGSTypeForSorti(RURR©R—tGetFuncEvalCfgR (R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR†ks
 c
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(
RRRSRTRUR=RR‘R R
(
t findEffectIDt curItemPackt    needCountRt    hasEnought itemIndexListtfindItemIsBindRtfindItemR€((s`.\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(
RRRSRTRUR=RR‘R
R (    RÖR×RØRRÙRÚRRR€((s`.\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( RRRSRTRUR R=RR‘R
R (
RKRÖR×RØRRÙRÚRRR€((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemFromPack_ByIDAndEffÏs(   
 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( RRRSRTRUR R=tUseStuffMode_NoBindtUseStuffMode_BindR
R (    RKtitemPacktneedCntt useItemModeRÙRÚRRR€((s`.\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( RRRSRTRUR R=RàRáR R
(
RKRâRãRäRÙRÚRÛRRR€((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByID_Ex"s0              
 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( RRRSRTRUR R=RàRáR R
(
RKRâRãRäRÙRÚRÛRRR€((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByID_ExExPs2              
 c Csúggg}d\}}|jƒj|ƒ}x½td|jƒƒD]¦}|j|ƒ}    |    sdqCn|    jƒ|kr|qCn|    jƒ}
|    jƒrÎ|dj|ƒ||
7}|dkré||kréPqéqC|dj|ƒ||
7}qCW|||fS(sÙ »ñÈ¡±³°üÏûºÄµÀ¾ß°ó¶¨¼°Î´°ó¶¨Ë÷ÒýÇé¿ö
    @param needCount: ËùÐè¸öÊý, Ä¬Èϰó¶¨ÓÅÏÈ£¬µ±ÕÒµ½ÒѾ­×ã¹»µÄ¸öÊýºó²»ÔÙ±éÀú£¬¼õÉÙÎÞÓñéÀú
    @return: ¿ÉÏûºÄÎïÆ·Áбí[[°ó¶¨ÎïÆ·Ë÷Òý], [²»°ó¶¨ÎïÆ·Ë÷Òý]], °ó¶¨¸öÊý, Î´°ó¶¨¸öÊý
    ii(ii(RORRRRSRTR R=R
( RRRØRÄtconsumeItemIndexListtbindCntt    unBindCntReRRR€((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetPackItemBindStateIndexInfoys$    
c
Cs|jƒjtjƒ}|\}}    ||krOt||||t||ƒn<t||||t||ƒt|||    ||t||ƒdS(N(RORRR\RGt
ReduceItemR R(
RtcostItemIndexListRéRêtdelCnttdelEventt saveDataDictRet bindIndexListtunBindIndexList((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelCostItemByBind™s   cCskd}|}    |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ì(RTR=R RSR R|tItemNeedRecordR»RÍR\RGR}t GetPlayerIDtGetAccIDRf(RR×RÚt reduceCountt makeItemBindRÅRðt
needSysmsgR4t totalUseCntt    itemIndexRR€RÆ((s`.\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( t
isinstancetdictRRSRTRUR R=R’R
titemsR¤(t costItemInfoRât    bindFirstt lackItemDictt delInfoDictt costItemDictt
needItemIDt needItemCnttbindItemCntDicttnoBindItemCntDicttbindItemIndexDicttnoBindItemIndexDictRRR0Rrt    indexDictt    indexListt itemCntTotaltlackCntRî((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetCostItemIndexListÑsP       
" 
%"cCsŸd}x’|jƒD]„\}}|dkr1qntjƒj|ƒ}|sPdSt|jƒtjƒ}|dkr‰tjd|ƒdS|||7}qW|S(Nis"É̳DZíδÅäÖÃÎïÆ·×êʯÏûºÄ!itemID=%s(    RþRRtGetItemByTypeIDtGetShopItemPriceR R\tTYPE_Price_Gold_MoneyRz(Rt    totalGoldRR RtitemGold((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetAutoBuyItemNeedGolds  cCs¾iddgtj6dgtj6}d
}||kr„xr||D]=}tjdi|d6|d6|d6dtƒ}|r@Pq@q@Wn&tjdi|d6|d6dtƒ}|s´d    S|jƒS( s »ñÈ¡É̳ÇÎïÆ·¶ÔÓ¦¼Û¸ñ iiitStoretShopTypeRFt    MoneyTypet    isLogNoneiN(R\RtTYPE_Price_Gold_PaperRyR—tGetIpyGameDataByConditionRt GetMoneyNum(Rt    priceTypetpriceTypeShopTypeDicttipyDatatshopType((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR%s - &RìcCs`t}xS|jƒD]E\}}|s+qnt||||t|ƒ}|rRtn|}qW|S(N(RtvaluesRìR (RRâRRïtdelItemHasBindR Rît hasBindItem((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt DelCostItem7sc 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(RORRRR RRSRTRUR R=RyR|R}RõRöRf( RRdt    delItemIDt delItemCountt    missionIDRât
delAllItemtindextitemR4R€tcurBind((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelMissionItemHs(          
" cCse|tjkrdS|jƒr#dS|jƒ|kr9dS|jƒtjkrQntj|tƒtS(N(RPtDef_BindType_NoBindR=t GetBindTypetDef_BindType_DoEquipBindR|t SetItemIsBindR (RRtbindType((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDoLogic_ItemBindTypeps c    CsË|jƒj|ƒ}|dks3||jƒkr7dS|j|ƒ}t|ƒsVdS|jƒj|ƒ}|dks‰||jƒkrdS|j|ƒ}|dks´|jƒr¸dSt||||ƒS(Ni(RORRRSRTRURyR tDoLogicSwitchItem(    Rt srcBackpackt desBackPacktsrcIndext    destIndextsrcPacktsrcItemtdestPacktdestItem((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDoLogicSwitchItemEx‰s cCs2|jƒrt||||ƒSt||||ƒS(N(R=tPutInt
SwitchItem(RRt
switchItemRd((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR2¤s cCsm|tjtjgkr.t||tjƒn|tjtjgkr\t||tjƒn|j|ƒt    S(N(
R\R„RMR<R1RPR.t rptHorseEquiptSwitchR (RRR>tputInPackIndex((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR=³s  cCsÐ|jƒs&tjd|jƒƒdS|tjtjgkrTt||t    j
ƒn|tj tjgkr‚t||t    j
ƒn|j ƒtj kr§|j|ƒn%|j ƒtjkrÌ|j|ƒntS(NtputInErr(R=RRzR;R\R„RMR<R1RPR.R?tGetGameWorldItemTypet gwitRoleItemR<tgwitSingleItemt
AssignItemR (Rt    emptyItemR>RA((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR<Çs cCs|jƒtjkS(N(R©RPRÒ(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
GetIsEquipâscCs|jƒtjkS(N(R©RPtDef_DogzEquiipType(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR÷åscCs|jƒtjkS(N(R©RPtDef_ZhuXianEquiipType(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRüéscCs|jƒtjkS(N(R©RPtDef_WeaponItemType(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GetIsWeaponñsc    Cs’tjƒ}|j|ƒxrtd|jƒƒD][}|j|ƒ}|jdƒ}|jƒ}|jdƒ}||kr/||kr/|Sq/WdS(Ni(
RRtFilterItemByTypeRtGetFilterItemCountt GetFilterItemRR‘R“Ry(    titemTypet itemEffectIDtfindEffectValueR Rt curFindItemtcurFindItemEffecttcurFindItemEffectIDtcurFindItemEffectValue((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemFromDataByEffValueüs   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(
RRRSRTRURR‘R“R
R (
RÿteffectAR×RØRÙRÚRRR¯R€((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemIndexListFromPackByEffAs(   
 c CsÔ|jƒ}|jƒ}|jƒ}    ||krWtjd|||f|jƒƒdS|sltj|ƒr¡t|||||ƒ}
t    |t
j ||
|ƒntj ||||j ƒ|jƒ|jƒƒdS(Ns3DelItem, delCnt = %s, itemCnt = %s, itemTypeID = %s(R RSR=RRzR;R|RôR»RÍR\RGR}RõRöRf( RRRîRùt
recordNameRðt    isForceDRt curItemTypeIDt
curItemCntt curItemBindRÆ((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelItemGs    # c Csþ|tjkrdSxÑ|D]É}|jtj||fƒ}|sHqnt}d}d}|tjkrétj|ƒ}tj    |ƒ}    t
j ƒj |ƒ}
|
s®t |ƒn    |
jƒ}d||    df}|
oãtj|
|    ƒ}n|tjkrxtj|ƒ}tj|ƒ}    t
j ƒj |ƒ}
|
s=t |ƒn    |
jƒ}d||    df}|
ortj|
|    ƒ}ntj|tj||fdƒ|ri|d6dd6|    dd6} t|||sÖd    |n|| ƒqqWtj|||ƒdS(
s É¾³ýÐéÄâ±³°üÎïÆ· NiR_s%s LV%siRFR³tPlusLVsVPack_%s(RMRMRORPRPRtrptRuneR|t GetRuneItemIDtGetRuneItemPlusLVRRRRiR<tIsRuneItemNeedRecordt rptGatherSoultGetGatherSoulItemIDtGetGatherSoulItemPlusLVtIsGatherSoulItemNeedRecordRtNomalDictSetPropertyRÍtSync_VPackItem_Clear( RRdt    placeListRÅR‹RTt isNeedRecordRtitemNametplusLVt curItemDataRg((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt DelVPackItem`s:  *cCs×|jƒ}tjddƒ}|s5tjdƒdS||krEdS||}|tjtjgkrvd}d}nt|ƒ}|j    ƒ}tj
d|||ƒ}|sÍtjd||j ƒfƒdS|j ƒS(NtStrengthenLevelLimitis"GetItemMaxStarLVûÓÐÇ¿»¯ÀàÐÍÓ³Éä±íit ItemPlusMaxs0ÕÒ²»µ½×°±¸Ç¿»¯µÈ¼¶ÉÏÏÞ±íÊý¾ÝÅäÖã¡ rank = %s, %s( RzR—RÕRRzRMt retFairyCant retFairyCan2R”R•R˜R–t GetLevelMax(Rt
equipPlacetplusMaxTypeDicttfindTypetrankt    itemColorR((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemMaxStarLV…s$   
      cCs
|jƒS(N(tGetLV(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR”žscCs.tjddƒ}|jt|jƒƒdƒS(NtWingLVii(R—RÕR’RiR|(Rt
wingLVDict((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt    GetWingLV¡scCs
|jƒS(N(t GetGearScore(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR>§scCs |j|ƒS(N(t SetGearScore(RR‰((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRˆªscCs
|jƒS(N(tGetMaxAddSkillCnt(R((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR    ®scCs®| s|jƒriSt|ƒsB|jƒ|jƒ|jƒgSi}|jƒ|d<|jƒ|d<t|jƒƒ|d<t|jƒƒ|d<t|jƒƒ|d<|S(NRFtCountRHtIsSuiteR¶(    R=RÓR RSR=Rvt
GetIsSuiteRiR}(Rt addItemDict((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetMailItemDict³s cCs…i}t|tƒs$t|tƒrªt|ƒ}|dkrM|d|d<n|dkrz|ddkrz|d|d<n|dkr|drt|dƒ|d<qn×t|tƒrÆ||d<n»t|ƒsãtjdƒiS|jƒ|d<|j    ƒdkr|j    ƒ|d<n|j
ƒr=t|j
ƒƒ|d<n|j ƒrbt|j ƒƒ|d<n|j ƒr|j ƒ|d    <n|S(
sa»ñÈ¡ÎïÆ·ÐÅÏ¢¶ÔÓ¦µÄjsonÐÅÏ¢
    @param itemInfo: Ö§³ÖÁбí [itemID, itemCount, isBind], Ö§³Ö¶¯Ì¬ÁÐ±í³¤¶È£¬Ë÷Òý´ú±íÊôÐԹ̶¨
                        Ö§³ÖÎïÆ·ÊµÀý, Èç¹ûÊÇʾÀýʱ±ØÐëÔÚ¸øÍæ¼Ò֮ǰÏÈ»ñÈ¡³öÀ´£¬·ÀÖ¹¸øÍæ¼Òºó¸ÃÎïÆ·ÊµÀý±»Çå¿Õ
                        
    @return: {"ItemID":101, "Count":10, "IsBind":1, "IsSuite":1, "UserData":"×Ô¶¨ÒåÊôÐÔ×Ö·û´®"}
    iRFiRƒiRHsÎïÆ·Îª¿Õ!ÎÞ·¨»ñÈ¡JsonItemÐÅÏ¢!R„R¶( RütlistttupletlenRvRURRzR RSR=R…R}(RCtitemDicttinfolen((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt GetJsonItemßs0        c CsUg}i}xB|D]:}|jƒ}|dkr5|S|jƒ}||krQ|S|jƒ}|jƒ}||f}||kr3xÉ||D] }    |    jƒ|krªqŒn|jƒ|    jƒ}
|
|krtj|    |ƒtj||
|ƒ|j|ƒ||j|ƒPntj|    |
ƒ|jƒqŒWq|j|ƒ|g||<qW|S(Ni(t GetPackCountRSR R=R|R}R
Ry( titemlistt    sItemListt    sItemDictR)t maxPackCounttitemCnttitemidRtkeytsitemttotalCnt((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetSimpleItemLists8            cCsJtj|ƒ}|j|gƒ}|gkr:|d}ntj|dƒS(Niÿÿÿÿi(RdReR’RtGetResultByRandomList(RPt    tableNametqualityRandDicttqualityRandList((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetRandEquipQualityByTable*s
  c    CsWtj|ƒ}tj|ƒ\    }}}}    }
} } } }|jƒ}tj|dƒ}t|ƒ}||}tj|    ƒ}g}d}x‚|D]z}|j
ƒ|ks|j
ƒ|kr¿qn|j ƒ|kr×qn|rüt ||ƒr|}Pqqn|j |ƒqW|r%tj|ƒ}n|dkr;dtfSt||
| | | ||ƒS(Ni(tGameDataControltGetItemDataListByTypeRdReR|RR™Røt    CanHappenRytGetUseLVR–RŸR
trandomtchoiceRtCreateGreateItem(Rt    equipTypeRRštqualityt    equipListtequipLVRandListt lvFormulaStrtlvRangetjobRandt luckyShotRandt greateNumRandt broadcastListtplusRandt addAttrRandtplayerLVtsteptgetLVMintgetLVMaxtcheckJobtrandListRÜR)((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytRandGreateEquip5s4*  
 $ 
c Cs||jƒ}t|ƒ}tjƒ}    tj|d|dƒ|    _d|    _||    _d|    _    t
j ||    ƒt }
||
fS(Niii( R R…R|tSingleEquipTmpDataR¢trandinttstarLVtholeCntRtisSuitetChItemtEquipAddAdditionExR( RÜR¬R­R®R¯R°RRt    equipItemt tmpEquipDatat    broadcast((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR¤_s               cCsKtj|ƒ}tj|ƒ\}}}}}    }
} } |jƒ} tj|dƒ}t|ƒ}||}tj|ƒ}g}d}x‚|D]z}|j
ƒ|ksŒ|j
ƒ|kr¼qŒn|j ƒdkrÔqŒn|rùt ||ƒrŒ|}PqŒqŒn|j |ƒqŒW|r"tj|ƒ}n|dkr2dSt||    |
| || ƒS(Ni(RžRŸRdReR|RR™RøR RyR¡R–RŸR
R¢R£tCreateNormalItem(RR¥RRšR§R¨R©RªR«R¬R¯R°t    skillRandR±R²R³R´RµR¶RÜR)((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytRandNormalEquipvs2'  
 $ c    Csp|jƒ}t|ƒ}tjƒ}tj|d|dƒ|_d|_||_d|_    t
j ||ƒ|S(Niii( R R…R|R¸R¢R¹RºR»RR¼R½R¾(    RÜR¬R¯R°RRÃRR¿RÀ((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRŸs               cCsEtjƒ}|jƒ||_||_||_tj||ƒdS(N(tChPyNetSendPackttagMCMakeItemAnswerRytMakeTypetResultt
MakeItemIDt NetPackCommont SendFakePack(RtmakeTypet    isSuccesst
makeItemIDtmakeItemAnswer((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytSyncMakeItemAnswer±s 
            i(uRRRRR\RPRdRMRžR|R`RÂR½R—R{R~R†RùRÅRÊRR‚RR¢tmathRwR€RtUseStuffMode_AllRàRáRR R'RR6RDRhRpR…RŠR‡RCRFRIRJRLRURRXRYRZRNR^RtRyR@R—RŸR›RUR£R¡R«R¬R®R°R²R»RÉRÍRÑRÓR†RÝRÞRßRåRæRçRGRëRóRìRRRR#R+R1R;R2R=R<RHR÷RüRLRWRYR_RpR{R”RR>RˆR    R‡RR˜RR·R¤RÄRÂRÐ(((s`.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt<module>sÜ                                            N =    0    
-            i                     "                  (+ 5                                                             ,    '    * ) . )  % @             (                                             - %                            ,    %    &     *        )