cehua_LC
2018-09-21 c65ec6dabe61d84bac2c2e7f5e848c76f35f1d6e
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
´§—[c@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    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#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 CsMi}|jƒ|d<|jƒ|d<|jƒ|d<|jƒ|d<tj|ƒ|d<|jƒ|d<|jƒ|d<|jƒ|d<|j    ƒ|d    <|j
ƒ|d
<|j ƒ|d <|j ƒ|d <|j ƒ|d <|jƒ|d<|jtjƒ|tj<|jtjƒ|tj<|jƒjƒ|d<ttjƒƒ|d<|jtjtjƒ}tj|tjƒ}t||dƒ|dtj<tj|tjƒ|dtj<tj|tj ƒ|dtj <tj|tj!ƒ|dtj!<t"|t#j$ƒ}i}i}x:tj%D]/}tj&||ƒ}|r||d|<qqW||d<t'|ƒ|d<t(|ƒ|d<t)|ƒ|d<t*|ƒ|d<t+|ƒ|d<t,|ƒ|d<t-|ƒ|d<t.|ƒ|d<t/|ƒ|d<t0j1|ƒ|d<t2j3|dt4ƒ}    t2j3|dt4ƒ}
t2j3t5|ƒdt4ƒ} |    |
| fS( NtAccIDtLVtRealmLVtJobtJobRanktVIPLVtNametFamilyIDt
FamilyNamet
FightPowertMinAtktMaxAtktDeftMaxHPt GeTuiClientIDtTimeis
CntMark_%ss%stFightPowerDicttEquipPartStarLVtEquipPartStonet    EquipWashtPettHorset    GodWeapontRunet MagicWeapontEquipPartSuitetFruitt ensure_ascii(6tGetAccIDRtGetOfficialRanktGetJobt PlayerControlt
GetJobRanktGetVIPLvt GetPlayerNamet GetFamilyIDt GetFamilyNamet GetFightPowert    GetMinAtkt    GetMaxAtktGetDeftGetMaxHPtNomalDictGetPropertytChConfigtDef_PDict_GeTuiSettDef_PDict_NoGeTuiTimetGetAccountDatatGetGeTuiClientIDtintttimetDef_Player_Dict_EnterFbCntDaytDef_FBMapID_SealDemontFBCommontGetEnterFBMaxCnttmaxt BossHurtMngtGetCanKillBossCntt ShareDefinetDef_Boss_Func_WorldtDef_Boss_Func_HometDef_Boss_Func_Dogzt__GetPackEquipCacheListt IPY_GameWorldtrptEquiptModuleFightPowerTypeListtGetMFPFightPowert__GetEquipPartStarLVInfot__GetEquipPartStoneInfot__GetEquipWashInfot __GetPetInfot__GetHorseInfot__GetGodWeaponInfot __GetRuneInfot__GetMagicWeaponInfot__GetEquipPartSuiteInfotPlayerAttrFruittGetAttrFruitEatCntDicttjsontdumpsR    t__RemoveEmptyDataKey( RtcurPlayerPropDicttenterCnttmaxCnttcurEquipItemListtcurPlayerPlusDicttfightPowerDicttmfpTypet
fightPowerRRR ((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR Ss^   
cCs5x.|jƒD] }||s |j|ƒq q W|S(N(tkeystpop(tdataDicttkey((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRq¬s
cCsYtj}tj|}i}x6|D].}tj|||ƒ}|r#|||<q#q#W|S(N(R`RaRMtPack_EquipPart_CanPlusStartChEquiptGetEquipPartStarLV(RtpTypet    indexListtstarLVInfoDicttitstarLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRd³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.pyRe¾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_EquipWashtGetAllEquipWashPlaceRLRMtDef_PDict_EquipWashLVR    txrangetDef_EquipWashMaxAttrCounttDef_PDict_EquipWashValuetappendR(    Rt stoneInfoListt washPlaceListtplacetwashLVt    valueListthasValuetattrNumtvalue((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRfÈs    )cCsfi}tjdƒ}xJ|jƒD]<}x3|D]+}tj||ƒ}|r/|||<q/q/Wq"W|S(Nt EquipSuitType(t IpyGameDataPYtGetFuncEvalCfgtvaluesRtGetSuiteInfoByPlace(Rt suiteInfoDicttequipSuitTypeDicttequipIndexListR„t    suiteInfo((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(tGetItemManagertGetPackR[trptPetR“tGetCounttGetAttIsEmptyt GetUserAttrtDef_IudetPet_NPCIDtDef_IudetPet_ClassLVR–RAt GetAtkSpeed(RtpetInfotpetClassLVListt    equipPacktindextpackItemtpetNPCIDtclassLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRgæs
cCs‘g}tjƒ}xxt|jƒƒD]d}|j|ƒ}|jƒ}|jtj|dtj    ƒ}|r%|j
i|d6|d6ƒq%q%W|S(NiR¨R©( R tIPY_DataR“t GetHorseCounttGetHorseByIndext
GetHorseIDRLRMtDef_PDict_Horser_LVtDef_PDictType_HorseR–(Rt    horseListt
ipyDataMgrR„tipyDatathorseIDthorseLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRh÷s  "cCs|i}tjƒ}|j|jƒdƒjƒ}xDtd|dƒD]/}|jtj|ƒ}|rE|||<qEqEW|S(Ni(    R R½tGetGodWeaponByIndextGetGodWeaponCounttGetTypeR“RLRMtDef_PDict_GodWeaponLV(Rt godWeaponDictRÄtmaxTypetgwTypetgwLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRis cCs“i}tjddƒ}xntd|dƒD]Y}|jtj|dƒ}|sWq,ntj|ƒ}tj|ƒ}||g||<q,Wt    |ƒS(Nt
RuneUnlockiii(
R t
GetFuncCfgR“RLRMtDef_PDict_Rune_Datat ItemControlert GetRuneItemIDtGetRuneItemPlusLVR(RtruneDictt runeHoleCnttholeNumtruneDatat
runeItemIDtruneItemPlusLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRjscCs‰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.pyRks   !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 GetItemTypeIDRRt    GetIsBindt
GetIsSuitet GetUserDataR–Rq(RtpackTypeR¸titemListR¹tcurEquiptitemDicttuserData((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR_(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.pytOnCMViewPlayerInfo>s0                      #        (%RMR R[RRAR`RùRRàR†RRmRÓR RRVRYRSRoRRR
R    RR RqRdReRfRlRgRhRiRjRkR_R(((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyt<module>sF                       
             Y