cehua_wcy
2019-03-06 2b230046c0d18d78a7dc82ab219a5a7f53d03a8f
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
4~\c@sxddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZdZd„Zd„Zed„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Zd„Z d„Z!d„Z"d„Z#dS(iÿÿÿÿNtProcessPlayerCachecCs$|jt|ƒt||tƒdS(N(tSetDicttDef_Process_TicktUpdateGameServerPlayerCachetTrue(t    curPlayerttick((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pytOnPlayerLogOut)scCs@||jtƒdkr<t||tƒ|jt|ƒndS(Nii<ièi,ià“(t GetDictByKeyRRtFalseR(RR((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyt ProcessCache3scCs»tjdƒt|ƒ\}}}tjƒ}|jƒ|_|jƒ|_||_    t
|ƒ|_ ||_ t
|ƒ|_ ||_t
|ƒ|_||_tj|ƒtjdƒdS(Ns+ViewCache### UpdateGameServerPlayerCache ins,ViewCache### UpdateGameServerPlayerCache out(t    GameWorldtDebugLogtGetPlayerCachetChMapToGamePyPackttagMGUpdatePlayerCachet GetPlayerIDtPlayerIDtGetLVtPlayerLVtPropDatatlent PropDataSizetItemDatat ItemDataSizetPlusDatat PlusDataSizet IsLogoutingt NetPackCommontSendPyPackToGameServer(RRRtcurPlayerPropDatatcurPlayerItemDatatcurPlayerPlusDatatsendPack((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR<s                    c Cs¿i}|jƒ|d<|jƒ|d<|jƒ|d<|jƒ|d<tj|ƒ|d<|jƒ|d<|jƒ|d<|jƒ|d<|j    ƒ|d    <|j
ƒ|d
<t j |ƒ|d <|j ƒ|d <tj|ƒ|d <|jƒ|d<|jƒ|d<|jƒ|d<|jƒ|d<|jtjƒ|tj<|jtjƒ|tj<|jƒjƒ|d<ttjƒƒ|d<|jtjtjƒ}tj|tjƒ}t||dƒ|dtj<|jtjtj ƒ}tj|tj ƒ}t||dƒ|dtj <t!j"|t#j$ƒ|dt#j$<t!j"|t#j%ƒ|dt#j%<t!j"|t#j&ƒ|dt#j&<t'|t(j)ƒ}i}i}x:t#j*D]/}tj+||ƒ}|r||d|<qqW||d<t,|ƒ|d<t-|ƒ|d<t.|ƒ|d<t/|ƒ|d<t0|ƒ|d<t1|ƒ|d<t2|ƒ|d<t3|ƒ|d<t4j5|ƒ|d <t6j7|d!t8ƒ}    t6j7|d!t8ƒ}
t6j7t9|ƒd!t8ƒ} |    |
| fS("NtAccIDtLVtRealmLVtJobtJobRanktVIPLVtNametFamilyIDt
FamilyNamet
FightPowertAppIDtEquipShowSwitcht ServerGroupIDtMinAtktMaxAtktDeftMaxHPt GeTuiClientIDtTimeis
CntMark_%ss%stFightPowerDicttEquipPartStarLVtEquipPartStonet    EquipWashtPettHorset    GodWeapontRunet MagicWeapontFruitt ensure_ascii(:tGetAccIDRtGetOfficialRanktGetJobt PlayerControlt
GetJobRanktGetVIPLvt GetPlayerNamet GetFamilyIDt GetFamilyNamet GetFightPowerR tGetPlayerPlatformtGetEquipShowSwitchtGetPlayerServerGroupIDt    GetMinAtkt    GetMaxAtktGetDeftGetMaxHPtNomalDictGetPropertytChConfigtDef_PDict_GeTuiSettDef_PDict_NoGeTuiTimetGetAccountDatatGetGeTuiClientIDtintttimetDef_Player_Dict_EnterFbCntDaytDef_FBMapID_SealDemontFBCommontGetEnterFBMaxCnttmaxtDef_FBMapID_ZhuXianBosst BossHurtMngtGetCanKillBossCntt ShareDefinetDef_Boss_Func_WorldtDef_Boss_Func_HometDef_Boss_Func_Dogzt__GetPackEquipCacheListt IPY_GameWorldtrptEquiptModuleFightPowerTypeListtGetMFPFightPowert__GetEquipPartPlusLVInfot__GetEquipPartStoneInfot__GetEquipWashInfot __GetPetInfot__GetHorseInfot__GetGodWeaponInfot __GetRuneInfot__GetMagicWeaponInfotPlayerAttrFruittGetAttrFruitEatCntDicttjsontdumpsR    t__RemoveEmptyDataKey( RtcurPlayerPropDicttenterCnttmaxCnttcurEquipItemListtcurPlayerPlusDicttfightPowerDicttmfpTypet
fightPowerRRR ((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR Ssh   
cCs5x.|jƒD] }||s |j|ƒq q W|S(N(tkeystpop(tdataDicttkey((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRv±s
cCsYtj}tj|}i}x6|D].}tj|||ƒ}|r#|||<q#q#W|S(N(RfRgRRtPack_EquipPart_CanPlusStartChEquiptGetEquipPartPlusLV(RtpTypet    indexListtstarLVInfoDicttitstarLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRj¸s      cCsgi}tjƒ}xN|D]F}tj||ƒ}|r|jdƒt|ƒkr|||<qqW|S(Ni(tOperate_EquipStonetGetAllStoneEquipIndexListtGetEquipIndexStoneIDListtcountR(Rt stoneInfoDicttstoneCanPlaceListt
equipIndext stoneIDList((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRkÃs  !c    CsÑg}tjƒ}x¸|D]°}|jtj|ƒd}g}t}xVtdtjdƒD]>}|jtj||fƒ}|r\|j    |ƒt
}q\q\W|r|j    i|d6|d6|d6ƒqqW|S(NitPlaceR#tValue( tOperate_EquipWashtGetAllEquipWashPlaceRQRRtDef_PDict_EquipWashLVR    txrangetDef_EquipWashMaxAttrCounttDef_PDict_EquipWashValuetappendR(    Rt stoneInfoListt washPlaceListtplacetwashLVt    valueListthasValuetattrNumtvalue((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRlÍs    )cCsÉi}g}|jƒjtjƒ}xt|jƒƒD]m}|j|ƒ}| s7|jƒreq7n|jtj    ƒ}|jtj
ƒ}|j i|d6|d6ƒq7W||d<t j |ƒ|d<|S(NtidtlvtPetLVtAtkSpeed(tGetItemManagertGetPackRatrptPetR˜tGetCounttGetAttIsEmptyt GetUserAttrtDef_IudetPet_NPCIDtDef_IudetPet_ClassLVR›RCt GetAtkSpeed(RtpetInfotpetClassLVListt    equipPacktindextpackItemtpetNPCIDtclassLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRmàs
cCs‘g}tjƒ}xxt|jƒƒD]d}|j|ƒ}|jƒ}|jtj|dtj    ƒ}|r%|j
i|d6|d6ƒq%q%W|S(NiR¤R¥( t IpyGameDataPYtIPY_DataR˜t GetHorseCounttGetHorseByIndext
GetHorseIDRQRRtDef_PDict_Horser_LVtDef_PDictType_HorseR›(Rt    horseListt
ipyDataMgrR‰tipyDatathorseIDthorseLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRnñs  "cCs|i}tjƒ}|j|jƒdƒjƒ}xDtd|dƒD]/}|jtj|ƒ}|rE|||<qEqEW|S(Ni(    R¹RºtGetGodWeaponByIndextGetGodWeaponCounttGetTypeR˜RQRRtDef_PDict_GodWeaponLV(Rt godWeaponDictRÁtmaxTypetgwTypetgwLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRoýs cCs“i}tjddƒ}xntd|dƒD]Y}|jtj|dƒ}|sWq,ntj|ƒ}tj|ƒ}||g||<q,Wt    |ƒS(Nt
RuneUnlockiii(
R¹t
GetFuncCfgR˜RQRRtDef_PDict_Rune_Datat ItemControlert GetRuneItemIDtGetRuneItemPlusLVR(RtruneDictt runeHoleCnttholeNumtruneDatat
runeItemIDtruneItemPlusLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRpscCs‰i}tjƒ}xpt|jƒƒD]\}|j|ƒ}|jƒ}|jƒ}tj||ƒr%|j    |dƒd||<q%q%W|S(Nii(
R¹RºR˜tGetTreasureCounttGetTreasureByIndextGetIDtGetTreasureTypetPlayerMagicWeapontGetIsActiveMagicWeapontget(RtmwDictRÁR‰ttreasureIpyDatat magicWeaponIDt treasureType((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRqs   !cCsô|jƒj|ƒ}g}xÒt|jƒƒD]¾}|j|ƒ}| s.|jƒr\q.ni}|jƒ|d<|jƒ|d<t|j    ƒƒ|d<t|j
ƒƒ|d<|j ƒ}|rÙ|dkrÙ||d<n|j t |ƒƒq.W|S(Nt    ItemIndextItemIDtIsBindtIsSuites{}tUserData(R¨R©R˜R«R¬R­tGetItemPlaceIndext GetItemTypeIDRWt    GetIsBindt
GetIsSuitet GetUserDataR›Rv(RtpackTypeR´titemListRµtcurEquiptitemDicttuserData((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRe"s   c
CsGtjdƒtjƒj|ƒ}|j}tjƒj|ƒ}|rt|ƒ\}}}tjƒ}    ||    _||    _    t
|    j    ƒ|    _ ||    _ t
|    j ƒ|    _ ||    _t
|    jƒ|    _tjd|    jƒ|    jƒfƒtj||    ƒtjdƒdStjƒ}    |jƒ|    _||    _tj|    ƒtjdƒdS(Ns"ViewCache### OnCMViewPlayerInfo ins6ViewCache### OnCMViewPlayerInfo len: %s , sendPack: %ss8ViewCache### OnCMViewPlayerInfo Return MapPlayerInfo outs:ViewCache### OnCMViewPlayerInfo SendToGameServer Query out(R R tGetPlayerManagertGetPlayerByIndexRtFindPlayerByIDR tChPyNetSendPackttagSCQueryPlayerCacheResultRRRRRRRt    GetLengtht OutputStringRt SendFakePackRttagMGQueryPlayerCacheRt FindPlayerIDR(
Rµt
clientPackRRt findPlayerIDt
findPlayerRRR R!((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pytOnCMViewPlayerInfo8s0                      #        ($RRR RaRRCRfRöRRÝR‹R•RrRÐR¹R„R[R_RXRtRRR
R    RR RvRjRkRlRmRnRoRpRqReR(((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyt<module>sD                       
             ^