CH_LC
2018-08-10 eaa524337db39fd8489b7e17a2f0753deda6828c
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
ð÷Z[c@s‡ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZeddUƒ\ZZZd„Z e!dd„Z"d„Z#d„Z$dd    „Z%d
„Z&d „Z'ddd „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%„ZBdddd&„ZCid'„ZDid(„ZEid)„ZFd*„ZGd+„ZHd,„ZId-„ZJd.„ZKed/„ZLed0„ZMed1„ZNd2„ZOid3„ZPdie!d4„ZQe!d5„ZRd6„ZSd7„ZTd8d9„ZUd:„ZVd;„ZWd<„ZXd=„ZYd>„ZZd?„Z[d@„Z\dA„Z]dB„Z^dC„Z_e!die0dD„Z`ddE„ZadF„ZbdG„ZcdH„ZddI„ZedJ„ZfdK„ZgdL„ZhdM„ZidN„ZjdO„ZkddP„ZldQ„ZmdR„ZndS„ZodT„ZpdS(Viÿÿÿÿ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((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR:s                   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((so.\ProjectSServer\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 RtGetAddSkillCountt GetAddSkilltGetSkillBySkillIDRRRtCheckCanAddBufftGetSkillTypeIDt
GetSkillLVRt
NotifyCodeR
(    RRR R t    curItemIDRt
curSkillIDtcurSkillR$((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRrs"  $cCs#|jƒ}d|ddg}|S(Ns%st0(R (Rt
itemTypeIDtmsgList((so.\ProjectSServer\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((so.\ProjectSServer\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((so.\ProjectSServer\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((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt__GetEndDayTimeNumMs*cCsStjƒ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||ƒ|S(NisOÎïÆ·ÓÐЧÆÚ³¬¹ýÓÐЧµÄ¿ª·þÌì, ²»¿É´´½¨!itemID=%s,serverDay=%s,outTimeServerDay=%si(RtGetItemFactoryt
CreateItemRVRPtDef_EquipReduceType_RTimeItemt SetUserAttrRMtDef_IudetCreateTimetintttimetDef_EquipReduceType_TimeRWRZR[RXRKRLRNtCleartErrLogt    SetIsBindt ItemControlert SetItemCount(titemIDt    itemCounttisBindt curSingleItemtoutTimeServerDayRb((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCreateSingleItemWs,"  
    cCs:t|ƒstjdƒdSt|ƒ}t||ƒdS(Ns²»ÉèÖÃ×°±¸ÆÀ·Ö(tCheckNoteEquipGSRRlt CalcEquipGStSetEquipGearScore(Rtvalue((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt MakeEquipGSs     c.Csat|ƒsdSi}xrt|jƒƒD]^}|j|ƒ}|sHPn|jƒ}|dkrdPn|j|dƒ|jdƒ||<q)Wd}|jt    j
ƒ}|jt    j ƒ}|ra||krat |ƒ}|j ƒ}    |jƒ}
tjd||    |
ƒ}x[t|ƒD]J}|jt    j
|ƒ} |jt    j |ƒ} |j| dƒ| || <qWn|jt    jdƒ} |jt    jdƒ}|jt    jdƒ}|jt    jdƒ}|jt    jdƒ}|jt    jdƒ|sèdn    |jƒ}|jt    jdƒ|sdn    |jƒ}|jt    jdƒ|s>dn    |jƒ}|jt    jdƒ|sidn    |jƒ}|jt    jdƒ|s”dn    |j ƒ}|jt    j!dƒ|s¿dn    |j"ƒ}|jt    j#dƒ|sêdn    |j$ƒ}|jt    j%dƒ|sdn    |j&ƒ}|jt    j'dƒ|s@dn    |j(ƒ}|jt    j)dƒ|skdn    |j*ƒ}|jt    j+dƒ|s–dn    |j,ƒ}|jt    j-dƒ|sÁdn    |j.ƒ}|jt    j/dƒ|sìdn    |j0ƒ}|jt    j1dƒ|sdn    |j2ƒ}|jt    j3dƒ|sBdn    |j4ƒ} |jt    j5dƒ|smdn    |j6ƒ}!|jt    j7dƒ|s˜dn    |j8ƒ}"|jt    j9dƒ|sÃdn    |j:ƒ}#|jt    j;dƒ|sîdn    |j<ƒ}$|jt    j=dƒ|sdn    |j>ƒ}%|jt    j?dƒ|sDdn    |j@ƒ}&|jt    jAdƒ}'|srdn    |jBƒ}(|jt    jCƒ})|jt    jDƒ}*|)r|)|*krx[t|ƒD]J}|jt    jC|ƒ} |jt    jD|ƒ} |j| dƒ| || <qÁWn|jt    jEdƒ}+|jt    jFdƒ},tGtHjIdtjJdƒƒƒ}-|-S(Nit EquipGSParamitEquipGSFormula(KR„RtGetEffectCounttGetEffectByIndext GetEffectIDtgettGetEffectValuetNonetGetUserAttrCountRMtDef_IudetLegendAttrIDtDef_IudetLegendAttrValuetGetItemClassLVt GetItemColortGetItemQualityt IpyGameDataPYtGetIpyGameDatatGetUserAttrByIndextDef_Effect_MinAtktDef_Effect_MaxAtktDef_Effect_MaxHPtDef_Effect_DeftDef_Effect_ArmorDefAddPertDef_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_AtkSpeedt GetAtkSpeedCtDef_IudetOutOfPrintAttrIDtDef_IudetOutOfPrintAttrValuetDef_Effect_OnlyFinalHurttDef_Effect_PVPAtkBackHPtevaltFormulaControltGetCompileFormulat
GetFuncCfg(.RtattrDictRt    curEffectteffectIDtgsParamIpyDatatlegendAttrIDCnttlegendAttrValueCnttclassLVtcolort itemQualitytattrIDt    attrValuetMinAtktMaxAtktMaxHPtDeft ArmorDefPertAtkPert    DamagePert SuperHitRatet SuperHitPert DamReducePertMaxHPPertDefPert LuckyHitRatet    PetDamPertPerLVAtktMissRatetHitRatet
DamBackPert
PerLVMaxHPt DropEquipPert DropMoneyPertIgnoreDefRateReducet DamChanceDeftSuperHitReducet SkillAtkRatetSpeedPertAtkSpeedt    AtkSpeedCtoutOfPrintAttrIDCnttoutOfPrintAttrValueCntt OnlyFinalHurtt PVPAtkBackHPR‡((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR…Šs|   '   !+++++++++++++++++++++!!cCst|ƒstStj||tƒs)tSxOt|jƒƒD];}|j|ƒjƒ}|dkrgtS||kr<tSq<WtS(Ni(    RURR|tCheckItemUseLVRR‹RŒRR (RRt
effectListRRÕ((so.\ProjectSServer\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(RORRR\trptItemRRSRTR(RRÕtbackPackRR((so.\ProjectSServer\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(RORRR\RRRSRTR(RRÕRRR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByEffectExscCsp|jƒj|ƒ}xTt|jƒƒD]@}|j|ƒ}t|ƒsOq(n|jƒ|krgq(n|SWdS(N(RORRRRSRTRUR (Rt
findItemIDRdRRR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytFindItemInPackByItemIDs 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_VPackItemRORRRRSRTtIsEmpty(Rt    packindextgetCountt    itemSpaceRt itemKeyDataReR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemPackSpace-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(NitGeRen_chenxin_676165(RMRRRR    RPR
R RRORRRRSRTR RR/(RR tisNotifyRRReR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackHasSpaceOs cCs®|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|r"tSq"WtS|j    ƒj
|ƒ}x<t d|j ƒƒD]%}|j |ƒ}|jƒstSqWtS(Ni(RMRRRR    RPR
RR RORRRRSRTR (RR RRReR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckPackIsEmptyjs cCs®|tjkrVx@tt|ƒƒD],}|jtj||fƒ}|s"|Sq"WdS|jƒj|ƒ}x<t    d|j
ƒƒD]%}|j |ƒ}|j ƒr|SqWdS(Niÿÿÿÿi( RMRRRR    RPR
RORRRRSRTR (RR RRReR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetEmptyIndexInPack‚s cCs-|tjkrdStj|}tj|ƒS(Ni(RPtDef_VPackCnt_DictR—RÒ(R tkeyStr((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR™s cCsdS(N((RRBt
singleItem((so.\ProjectSServer\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((so.\ProjectSServer\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] ...]
    Ri
iiis%sis{}iit ensure_asciiiitPlacetLVtValueii    N( Rt GetEquipPlaceR R=RStOperate_EquipStonetGetEquipIndexStoneIDListt GetUserDatatPlayerViewCacheTubet__GetEquipPartSuiteInfotjsontdumpsRtChEquiptGetEquipPartStarLVR\trptEquipR    RPtDef_PDict_EquipWashLVRtOperate_EquipWashtDef_EquipWashMaxAttrCounttDef_PDict_EquipWashValueRORRRMt RoleEquipTypeRTR R
tGetItemPlaceIndex( RRtplaceR(tuserDatat    suiteInfotwashLVtattrNumt    valueListt
equipItemst playerEquipt
equipIndextcurEquip((so.\ProjectSServer\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(RR tkeysRR/RŽR>R!(RRBR't wNotifyIDDict((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytUseItemSpecialNotify-s" cCsr|jƒ}|stS|jtjƒdkr;t||ƒS|jƒ|dkrntj|ƒ|dkrntSt    S(sŠÅжÏÎïÆ·ÊÇ·ñÖ°Òµ¿ÉÓÃ
        ÎïÆ·±íÖÐÖ°ÒµÏÞÖÆ¹æÔò: 0ΪͨÓã»·Ç0°Ùλ´ú±íÖ°Òµ£¬Ê®Î»ºÍ¸öλΪְҵ½×Êý, Ö°Òµ½×ÏòϼæÈÝ£¬¸ß½×¿ÉʹÓõͽ×ÎïÆ·
    iid(
t GetJobLimitR t GetUserAttrRMtDef_IudetCancelUseLimittCheckJobtGetJobRt
GetJobRankR(RRt itemJobLimit((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
JobUseable<s  /cCs4|jƒ}|stS|jƒ|dkr0tStS(sŒÅжÏÎïÆ·ÊÇ·ñְҵϵ¿ÉÓÃ
        ÎïÆ·±íÖÐÖ°ÒµÏÞÖÆ¹æÔò: 0ΪͨÓã»·Ç0°Ùλ´ú±íÖ°Òµ£¬Ê®Î»ºÍ¸öλΪְҵ½×Êý, Ö°Òµ½×ÏòϼæÈÝ£¬¸ß½×¿ÉʹÓõͽ×ÎïÆ·
    id(RTR RXR(RRRZ((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRWMs  cCs+| s|jƒrdS|jƒr'dStS(N(R t GetIsLockedR (R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRU]s
 cCs¤|jƒ}|jƒ}tj|ƒ}|jƒ}|tjkrR||krRtS|tjkr |j    t
j ƒ}|dkrƒt St j ƒ||kr tSnt S(Ni(R^R[RtGetPastSecondsRVRPRsRRxRURMRuR Rw(RtcurItemCreateTimetcurItemExpireTimetcurItemPastTimeRft    startTime((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemCanUseByExpireTimehs     cCs*t|ƒstS|jƒ|kr&tStS(N(RURtGetTypeR (Rt    checkType((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemByTypes
 cCstS(N(R(R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt CheckHasStonescCs?|jƒj|ƒ}|j|ƒ}| s7|jƒr;tStS(N(RORRRTR RR (RRdRMt roleEquipPackRN((so.\ProjectSServer\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((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemEffectByEffectID´s cCs)t|tjƒ}|sdS|jdƒS(Niÿÿÿÿi(RjRPtDef_Item_Eff_UseClassLVR(RRi((so.\ProjectSServer\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_RR7tupdate(Rt
writeCountt beforeCountt
afterCountRg((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemNoteDictÊs    cCs°||d<|tjkrA|}|tjkrJtj|}qJn    tj}|ritj||||ƒn|tjtj    gks|tj
kr¬t j |d|||ƒndS(NtPackTypei( RPtItemGiveTypeListtItemGiveTypeDicttItemGive_UnknownR`tDR_SetPlayerItemR\RRMt rptTreasureRt EventReporttWriteEvent_item_record(RtpackTypet    eventNamet itemNoteDicttnoteDictt operateType((so.\ProjectSServer\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(NRvi( RPtItemDelTypeListtItemDelTypeDicttItemDel_UnknownR`RaR\RRMR{RR|R}(RR~RR€RR‚((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
DR_DelItemòs
    'cCsCt|dƒ}|j|ƒ|jƒ|d<tj|||ƒdS(NiR~(RuRqtGetItemPlaceTypeR`tDR_EquipMachining(RRNRtaddDictR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDR_EquipItemChanges
 cCs-t|ƒstS|jƒtjkr)tStS(N(RURRcRPtDef_EquipItemTypeR (R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytCheckItemIsEquips
 
cCs6t|ƒstS|jƒtjddƒkr2tStS(NtEquipGSTypeForSorti(RURRcR—tGetFuncEvalCfgR (R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR„#s
 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((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByEff_Ex4s,       
 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((so.\ProjectSServer\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 (
RRR‘R’R€R“R”RRR((so.\ProjectSServer\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 (    RtitemPacktneedCntt useItemModeR“R”RRR((so.\ProjectSServer\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
(
RRœRRžR“R”R•RRR((so.\ProjectSServer\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
(
RRœRRžR“R”R•RRR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItem_FromPack_ByID_ExExs2              
 c    Csággg}d\}}|jƒjtjƒ}x¡td|jƒƒD]Š}|j|ƒ}|sgqFn|jƒ|krqFn|jƒ}|jƒrµ|dj    |ƒ||7}qF|dj    |ƒ||7}qFW|||fS(s~ »ñÈ¡±³°üÏûºÄµÀ¾ß°ó¶¨¼°Î´°ó¶¨Ë÷ÒýÇé¿ö
    @return: ¿ÉÏûºÄÎïÆ·Áбí[[°ó¶¨ÎïÆ·Ë÷Òý], [²»°ó¶¨ÎïÆ·Ë÷Òý]], °ó¶¨¸öÊý, Î´°ó¶¨¸öÊý
    ii(ii(
RORRR\RRRSRTR R=R
(    RR~tconsumeItemIndexListtbindCntt    unBindCntReRRR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetPackItemBindStateIndexInfo1s      c
Cs|jƒjtjƒ}|\}}    ||krOt||||t||ƒn<t||||t||ƒt|||    ||t||ƒdS(N(RORRR\Rt
ReduceItemR R(
RtcostItemIndexListR£R¤tdelCnttdelEventt saveDataDictRet bindIndexListtunBindIndexList((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelCostItemByBindNs   cCs´d}|}    |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|tjdƒkr°||    |||g}tj|j ƒtj|ƒn|S(NiR¦tMergeServerCanUseItemID(RTR=R RSR R|tItemNeedRecordRuR‡R\RR}t GetPlayerIDtGetAccIDR!RR tPlayerMergeEventtAddMSPlayerEventtDef_MSPEvent_DelItem(RR‘R”t reduceCountt makeItemBindRRªt
needSysmsgR4t totalUseCntt    itemIndexRRR€t    eventInfo((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR¦`s6              " 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
titemstmax(t costItemInfoRœt    bindFirstt lackItemDictt delInfoDictt costItemDictt
needItemIDt needItemCnttbindItemCntDicttnoBindItemCntDicttbindItemIndexDicttnoBindItemIndexDictRRR0R-t    indexDictt    indexListt itemCntTotaltlackCntR¨((so.\ProjectSServer\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(RÁt    totalGoldR~RÍRtitemGold((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetAutoBuyItemNeedGoldËs  cCs:tjdi|d6|d6dtƒ}|s0dS|jƒS(s »ñÈ¡É̳ÇÎïÆ·¶ÔÓ¦¼Û¸ñ tStoreRFt    MoneyTypet    isLogNonei(R—tGetIpyGameDataByConditionRt GetMoneyNum(R~t    priceTypetipyData((so.\ProjectSServer\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œRÂR©tdelItemHasBindRËR¨t hasBindItem((so.\ProjectSServer\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(RORRRR RRSRTRUR R=RyR|R}R°R±R!( RRdt    delItemIDt delItemCountt    missionIDRœt
delAllItemtindextitemR4RtcurBind((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelMissionItem÷s(          
" cCse|tjkrdS|jƒr#dS|jƒ|kr9dS|jƒtjkrQntj|tƒtS(N(RPtDef_BindType_NoBindR=t GetBindTypetDef_BindType_DoEquipBindR|t SetItemIsBindR (RRtbindType((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDoLogic_ItemBindTypes cCs{|jƒj|ƒj|ƒ}t|ƒs.dS|jƒj|ƒj|ƒ}|dksd|jƒrhdSt||||ƒS(N(RORRRTRURR\tDoLogicSwitchItem(Rt srcBackpackt desBackPacktsrcIndext    destIndextsrcItemtdestItem((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDoLogicSwitchItemEx8s cCs2|jƒrt||||ƒSt||||ƒS(N(R tPutInt
SwitchItem(RRt
switchItemRd((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRîMs cCs^|tjkr%t||tjƒn|tjgkrMt||tjƒn|j|ƒtS(N(R\R>RíRPRêt rptHorseEquiptSwitchR (RRRøtputInPackIndex((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR÷\s  cCsÁ|jƒs&tjd|jƒƒdS|tjkrKt||tjƒn|tj    gkrst||tjƒn|j
ƒtj kr˜|j |ƒn%|j
ƒtj kr½|j|ƒntS(NtputInErr(R RRzR;R\R>RíRPRêRùtGetGameWorldItemTypet gwitRoleItemRötgwitSingleItemt
AssignItemR (Rt    emptyItemRøRû((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRöps cCs|jƒtjkS(N(RcRPRŒ(R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt
GetIsEquip‹scCs|jƒtjkS(N(RcRPtDef_WeaponItemType(R((so.\ProjectSServer\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R(    titemTypet itemEffectIDtfindEffectValueR Rt curFindItemtcurFindItemEffecttcurFindItemEffectIDtcurFindItemEffectValue((so.\ProjectSServer\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”RRRiR((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemIndexListFromPackByEffA»s(   
 c Cs|jƒ}|jƒ}|jƒ}    ||krWtjd|||f|jƒƒdS|sltj|ƒr¡t|||||ƒ}
t    |t
j ||
|ƒntj ||||j ƒ|jƒ|jƒƒ|tjdƒkr|||    ||g} tj|j ƒtj| ƒndS(Ns3DelItem, delCnt = %s, itemCnt = %s, itemTypeID = %sR®(R RSR=RRzR;R|R¯RuR‡R\RR}R°R±R!RR R²R³R´( RRR¨R·t
recordNameRªt    isForceDRt curItemTypeIDt
curItemCntt curItemBindR€Rº((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytDelItemè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%siRFRmtPlusLVsVPack_%s(RMRR    RPR
RtrptRuneR|t GetRuneItemIDtGetRuneItemPlusLVRRRÏRiR<tIsRuneItemNeedRecordRtNomalDictSetPropertyR‡tSync_VPackItem_Clear( RRdt    placeListRRERt isNeedRecordR~titemNametplusLVt curItemDataRg((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt DelVPackItems,  *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( R4R—RRRzRMt retFairyCant retFairyCan2R”R•R˜R–t GetLevelMax(Rt
equipPlacetplusMaxTypeDicttfindTypetrankt    itemColorRÛ((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetItemMaxStarLV$s$   
      cCs
|jƒS(N(tGetLV(R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR”=scCs.tjddƒ}|jt|jƒƒdƒS(NtWingLVii(R—RRŽRiR0(Rt
wingLVDict((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt    GetWingLV@scCs
|jƒS(N(t GetGearScore(R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetEquipGearScoreFscCs |j|ƒS(N(t SetGearScore(RR‡((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR†IscCs
|jƒS(N(tGetMaxAddSkillCnt(R((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyR    MscCs®| s|jƒriSt|ƒsB|jƒ|jƒ|jƒgSi}|jƒ|d<|jƒ|d<t|jƒƒ|d<t|jƒƒ|d<t|jƒƒ|d<|S(NRFtCountRHtIsSuiteRp(    R RR RSR=Rvt
GetIsSuiteRiR7(Rt addItemDict((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetMailItemDictRs 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":"×Ô¶¨ÒåÊôÐÔ×Ö·û´®"}
    iRFiR8iRHsÎïÆ·Îª¿Õ!ÎÞ·¨»ñÈ¡JsonItemÐÅÏ¢!R9Rp( R»tlistttupletlenRvRURRzR RSR=R:R7(RCtitemDicttinfolen((so.\ProjectSServer\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((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytGetSimpleItemList£s8            cCsJtj|ƒ}|j|gƒ}|gkr:|d}ntj|dƒS(Niÿÿÿÿi(RR RŽRtGetResultByRandomList(Rt    tableNametqualityRandDicttqualityRandList((so.\ProjectSServer\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(tGameDataControltGetItemDataListByTypeRR R0RRNRÏt    CanHappenRtGetUseLVR–R[R
trandomtchoiceRtCreateGreateItem(Rt    equipTypeR€ROtqualityt    equipListtequipLVRandListt lvFormulaStrtlvRangetjobRandt luckyShotRandt greateNumRandt broadcastListtplusRandt addAttrRandtplayerLVtsteptgetLVMintgetLVMaxtcheckJobtrandListR–Rå((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytRandGreateEquipÔs4*  
 $ 
c Cs||jƒ}t|ƒ}tjƒ}    tj|d|dƒ|    _d|    _||    _d|    _    t
j ||    ƒt }
||
fS(Niii( R RƒR|tSingleEquipTmpDataRWtrandinttstarLVtholeCntR€tisSuitetChItemtEquipAddAdditionExR( R–RaRbRcRdReR€R~t    equipItemt tmpEquipDatat    broadcast((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRYþ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(RSRTRR R0RRNRÏRURRVR–R[R
RWRXtCreateNormalItem(RRZR€ROR\R]R^R_R`RaRdRet    skillRandRfRgRhRiRjRkR–Rå((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytRandNormalEquips2'  
 $ c    Csp|jƒ}t|ƒ}tjƒ}tj|d|dƒ|_d|_||_d|_    t
j ||ƒ|S(Niii( R RƒR|RmRWRnRoRpR€RqRrRs(    R–RaRdReR€RxR~RtRu((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyRw>s               cCsEtjƒ}|jƒ||_||_||_tj||ƒdS(N(tChPyNetSendPackttagMCMakeItemAnswerRytMakeTypetResultt
MakeItemIDt NetPackCommont SendFakePack(RtmakeTypet    isSuccesst
makeItemIDtmakeItemAnswer((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pytSyncMakeItemAnswerPs 
            i(qRRRRR\RPRRMRSR|R`R|RrR²R—R5R8R@RÐRzRRR<RRWtmathRwR:RtUseStuffMode_AllRšR›RR R'RR6RDRhRpRƒRˆR…RRRRRRRRRRRR/RR@RSR[RWRURbReRfRhRjRlRuRƒR‡R‹RR„R—R˜R™RŸR R¡R¥R­R¦RÎRÔRÐRßRçRíRõRîR÷RöRRRRRR$R/R”R3R5R†R    R<RBRMRRRlRYRyRwR…(((so.\ProjectSServer\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Item\UseItem\ItemCommon.pyt<module>sÖ                                             N =    0    
*            U                 "                  (+ 5                                                        ,    '    * ) . )     * @             (                                     -                             ,    %    &     *        )