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
-!wic@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
dZ e d„Z d„Zejd„Zd„Zd„Zd„Zd    „Zd
„Zd „Zddd „Zddd „Zdd„ZdS(iÿÿÿÿNtNamecCsDtjƒ}|jtj|ƒ}|j|ƒ}|s:iS|jƒS(N(t    DBDataMgrt GetGameRecMgrtGetRecTypeIDMgrt ShareDefinetDef_GameRecType_BatPresett GetOneRecDatat GetUserDict(tplayerIDtisAddNewt
gameRecMgrt preSetRecMgrtrecData((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pytGetPresetRecDict s  cCs"t|ƒt|ƒt|ƒdS(N(tSync_FuncPresetInfotSync_FuncPresetSwitchInfotSync_BatPresetSwitchInfo(t    curPlayer((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyt OnPlayerLogin)s
 
 
cCs®|jtj|ƒ}|td|ƒ@r-tStjd|ƒ}|sIdS|t|ƒkr_dS||d}|jƒr}dS|td|ƒO}t    j
|tj||ƒtS(Nit PresetUnlocki( tNomalDictGetPropertytChConfigtDef_PDict_PresetStatetpowtTruet IpyGameDataPYtGetIpyGameDataListtlent GetUnlockTypet PlayerControltNomalDictSetProperty(RtpresetIDtfuncPresetTypet presetStatet ipyDataListtipyData((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pytGetFuncPresetIDState0s cCs‹tjƒj|ƒ}|j}|j}t|||ƒrTtjd||fƒdStjd|ƒ}|spdS|t    |ƒkrtjd||fƒdS||d}|j
ƒ}|j ƒ}    |dkr|    }
i|d6|d6} t j |tj|
d| ƒsfdSnX|dkrb|    } |jtjƒ} | | krftjd    ||| |
fƒdSndS|jtj|ƒ}|td|ƒO}t j|tj||ƒtjd
|||fƒt|||ƒ|tjkr‡t|tjƒ}tjd |ƒxotjD]d}|tjkr*qnt|||ƒ}t j|tj||f|ƒtjd ||fƒqWt||ƒndS( Ns+¸ÃÔ¤ÉèÒѽâËø! funcPresetType=%s,presetID=%sRs+¸ÃÔ¤Éè²»´æÔÚ! funcPresetType=%s,presetID=%siR RtFuncPresetUnlockisMÃü¸ñ¸ÐÎòµÈ¼¶²»×ãÎÞ·¨½âËø¸ÃÔ¤Éè! funcPresetType=%s,presetID=%s,ganwuLV=%s < %ss:¹¦ÄÜÔ¤Éè½âËø: funcPresetType=%s,presetID=%s,presetState=%ss>ÐÂÔöÈ«¾ÖÔ¤ÉèÖ±½ÓʹÓÃÖ÷ÏßÔ¤É追±´×Ó¹¦ÄÜÔ¤Éè! mainBatPresetID=%ss%    funcPresetType=%s,funcPresetID=%s(t    GameWorldtGetPlayerManagertGetPlayerByIndextFuncPresetTypetPresetIDR$tDebugLogRRRRtGetUnlockValueRtPayMoneyt IPY_GameWorldtTYPE_Price_Gold_MoneyRRtDef_PDict_MGGanwuLVRRRRRtFuncPreset_BattletGetBatPresetIDtBatPreset_MaintFuncPresetListtGetFuncPresetIDtDef_PDict_PresetFuncIDR(tindext
clientDatattickRR RR"R#t
unlockTypet unlockValuetneedGoldtinfoDicttneedGWLVtganwuLVR!tmainBatPresetIDt funcPresetID((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pytOnFuncPresetUnlockMsV              c CsÝtjƒj|ƒ}|jƒ}|j}|j}|j}t|||ƒsRdSt|t    ƒ}t
|krzi|t
<n|t
}    t |ƒ|    kr©i|    t |ƒ<n|    t |ƒ}
||
t |ƒ<t |||ƒdS(N( R&R'R(t GetPlayerIDR)R*t
PresetNameR$R RtPresetKey_NametstrR( R7R8R9RRR Rt
presetNametuserDicttpresetNameDicttfuncPresetNameDict((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pytOnFuncPresetUpdName’s"               
c CsÝtjƒj|ƒ}|j}|j}|j}|tjkrTtjd|ƒdSt    ||ƒsxtjd|ƒdSt    |||ƒs¥tjd||fƒdSt
|||ƒ}||krátjd|||fƒdStjd||||fƒ|tj kr“t j |ƒ}|j|ƒ}    |    js†|j|ƒ}
i} | j|
jƒtjd|| fƒtj||| ƒn|    jƒntj|tj||f|ƒt j |ƒj|ƒt|||ƒdS(NsIÈ«¾ÖÕ½¶·Ô¤Éè²»ÔÚ´ËÐ޸ģ¬ÇëʹÓÃB263·â°üÐÞ¸ÄÈ«¾ÖÔ¤Éè·½°¸! funcPresetType=%ssÈ«¾ÖÔ¤Éèδ½âËø! batPresetID=%ss/¹¦ÄÜÔ¤Éèδ½âËø! toPresetID=%s,funcPresetType=%ssB¹¦ÄÜÔ¤Éè²»±ä²»´¦Àí! batPresetID=%s,funcPresetType=%s,toPresetID=%ssO¹¦ÄÜÔ¤Éè·½°¸Çл»: batPresetID=%s,funcPresetType=%s,nowPresetID=%s,toPresetID=%ssD¸ÃÎ佫·½°¸Îª¿ÕÖ±½ÓÏȸ´ÖƵ±Ç°·½°¸! nowPresetID=%s,itemIndexPosDict=%s(R&R'R(t BatPresetIDR)R*RR1R+R$R5tFuncPreset_Herot PlayerOnlinetGetOnlinePlayert GetHeroPresett heroItemDicttupdatet
PlayerHerotDoSaveHeroPresettOnSwitchRRRR6tRefreshBatPresetR( R7R8R9Rt batPresetIDR t
toPresetIDt nowPresetIDtolPlayert
heroPresett nowHeroPresettitemIndexPosDict((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pytOnFuncPresetSwitch²s@                   cCsætjƒj|ƒ}|j}|j}|tjkr:dSt||ƒs^tjd|ƒdSt    ||ƒ|krŽtjd||fƒdSt
j |t j ||ƒtjd||fƒtj|ƒj|ƒt||ƒdS(Ns"È«¾ÖÕ½¶·Ô¤Éèδ½âËø! batPresetID=%ss7È«¾ÖÕ½¶·Ô¤Éè²»±ä²»´¦Àí! batPresetType=%s,batPresetID=%ss5È«¾ÖÕ½¶·Ô¤Éè·½°¸Çл»: batPresetType=%s,batPresetID=%s(R&R'R(t BatPresetTypeRLRt BatPresetListR$R+R2RRRtDef_PDict_PresetBatIDRNRORVR(R7R8R9Rt batPresetTypeRW((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pytOnBatPresetSwitchès          cCstd|jtj|ƒƒS(Ni(tmaxRRRa(RRb((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyR2scCs#td|jtj||fƒƒS(Ni(RdRRR6(RRWR ((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyR5scCs|dkrtj}n    |g}g}x¡|D]™}tjƒ}||_g}|dkr¡|dkr¡tjd|ƒ}|r˜tddt    |ƒƒng}n|dkr¹|g}ni}    |rìt
|j ƒƒ}
|
j t iƒ}    ng|_x—|D]} |dkr't|| |ƒ r'qüntjƒ} | | _|    j t|ƒiƒj t| ƒdƒ| _t    | jƒ| _|jj| ƒqüWt    |jƒ|_|jtj|ƒ|_|j|ƒq.W|sÕdStjƒ} || _t    | jƒ| _tj|| ƒdS(NRit(tNoneRR4tChPyNetSendPackttagSCFuncPresetInfoR)RRtrangeRR RCtgetREt
PresetListR$ttagSCFuncPresetR*RFRDtNameLentappendt    PresetCntRRRt UnlockStatettagSCFuncPresetInfoListtFuncCntt NetPackCommont SendFakePack(RR RtpresetTypeListtfuncPresetListt
presetTypetfuncPresetInfot presetIDListR"RIRHtpsIDtpresett
clientPack((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyR    sH            (            -     c
Cs{|dkrItjdtjƒ}|r@tddt|ƒƒng}n    |g}g}xÛ|D]Ó}t||ƒszq_ntj    ƒ}||_
g|_ xxtj D]m}|tjkr½q¢n|rÕ||krÕq¢ntj ƒ}||_ t|||ƒ|_|j j|ƒq¢Wt|j ƒ|_|j|ƒq_W|s@dStjƒ}    ||    _t|    jƒ|    _tj||    ƒdS(NRi(RfRRRR1RiRR$RgttagSCFuncPresetBatRLR4ttagSCFuncPresetFuncR)R5t FuncPresetIDRnRrttagSCFuncPresetSwitchInfoR`t BatPresetCntRsRt(
RRWR R"tbatPresetIDListt batPresetListt    batPresettfuncTypet
funcPresetR|((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyR8s: (                        cCs«|stj}n    |g}g}xB|D]:}tjƒ}||_t||ƒ|_|j|ƒq(W|spdStjƒ}||_t    |jƒ|_
t j ||ƒdS(N( RR`RgttagSCBatPresetSwitchR_R2RLRnttagSCBatPresetSwitchInfoRt
BatFuncCntRsRt(RRbtbatPresetTypeListRƒR„R|((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyR\s                 (RRRRRgR.RsRNRSR&RREtFalseR RR1R$RBRKR^RcR2R5RfRRR(((skD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPreset.pyt<module>s.                        E         6            /$