hzr
2018-08-09 3346f8aae7f8abbd4b27c4564cbb802e7e717cc9
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
ÙÉ^[c@siddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZdZd„Zd„Zed„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„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 ProcessCache0scCs»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.pyR9s                    c
Cs‘i}|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<t|tjƒ}i}i}x:tjD]/}tj||ƒ}|r_||d|<q_q_W||d<t|ƒ|d<t|ƒ|d<t|ƒ|d<t|ƒ|d<t |ƒ|d<t!|ƒ|d<t"|ƒ|d<t#|ƒ|d<t$|ƒ|d<t%j&|ƒ|d<t'j(|dt)ƒ}t'j(|dt)ƒ}t'j(t*|ƒdt)ƒ}    |||    fS(NtLVtRealmLVtJobtJobRanktVIPLVtNametFamilyIDt
FamilyNamet
FightPowertMinAtktMaxAtktDeftMaxHPt GeTuiClientIDtTimes%stFightPowerDicttEquipPartStarLVtEquipPartStonet    EquipWashtPettHorset    GodWeapontRunet MagicWeapontEquipPartSuitetFruitt ensure_ascii(+RtGetOfficialRanktGetJobt PlayerControlt
GetJobRanktGetVIPLvt GetPlayerNamet GetFamilyIDt GetFamilyNamet GetFightPowert    GetMinAtkt    GetMaxAtktGetDeftGetMaxHPtNomalDictGetPropertytChConfigtDef_PDict_GeTuiSettDef_PDict_NoGeTuiTimetGetAccountDatatGetGeTuiClientIDtintttimet__GetPackEquipCacheListt IPY_GameWorldtrptEquipt ShareDefinetModuleFightPowerTypeListtGetMFPFightPowert__GetEquipPartStarLVInfot__GetEquipPartStoneInfot__GetEquipWashInfot __GetPetInfot__GetHorseInfot__GetGodWeaponInfot __GetRuneInfot__GetMagicWeaponInfot__GetEquipPartSuiteInfotPlayerAttrFruittGetAttrFruitEatCntDicttjsontdumpsR    t__RemoveEmptyDataKey(
RtcurPlayerPropDicttcurEquipItemListtcurPlayerPlusDicttfightPowerDicttmfpTypet
fightPowerRRR ((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR PsP
cCs5x.|jƒD] }||s |j|ƒq q W|S(N(tkeystpop(tdataDicttkey((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyReœs
cCsYtj}tj|}i}x6|D].}tj|||ƒ}|r#|||<q#q#W|S(N(RSRTRKtPack_EquipPart_CanPlusStartChEquiptGetEquipPartStarLV(RtpTypet    indexListtstarLVInfoDicttitstarLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRX£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.pyRY®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_EquipWashtGetAllEquipWashPlaceRJRKtDef_PDict_EquipWashLVR    txrangetDef_EquipWashMaxAttrCounttDef_PDict_EquipWashValuetappendR(    Rt stoneInfoListt washPlaceListtplacetwashLVt    valueListthasValuetattrNumtvalue((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRZ¸s    )cCsfi}tjdƒ}xJ|jƒD]<}x3|D]+}tj||ƒ}|r/|||<q/q/Wq"W|S(Nt EquipSuitType(t IpyGameDataPYtGetFuncEvalCfgtvaluesRqtGetSuiteInfoByPlace(Rt suiteInfoDicttequipSuitTypeDicttequipIndexListRvt    suiteInfo((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR`Ë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(tGetItemManagertGetPackRUtrptPetR…tGetCounttGetAttIsEmptyt GetUserAttrtDef_IudetPet_NPCIDtDef_IudetPet_ClassLVRˆR?t GetAtkSpeed(RtpetInfotpetClassLVListt    equipPacktindextpackItemtpetNPCIDtclassLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR[Ö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
GetHorseIDRJRKtDef_PDict_Horser_LVtDef_PDictType_HorseRˆ(Rt    horseListt
ipyDataMgrRvtipyDatathorseIDthorseLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR\çs  "cCs|i}tjƒ}|j|jƒdƒjƒ}xDtd|dƒD]/}|jtj|ƒ}|rE|||<qEqEW|S(Ni(    R’R¯tGetGodWeaponByIndextGetGodWeaponCounttGetTypeR…RJRKtDef_PDict_GodWeaponLV(Rt godWeaponDictR¶tmaxTypetgwTypetgwLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR]ós cCs™i}tjddƒ}xttdt|ƒdƒD]Y}|jtj|dƒ}|s]q2ntj|ƒ}tj    |ƒ}||g||<q2Wt|ƒS(Nt
RuneUnlockii(
R’R“R…RRJRKtDef_PDict_Rune_Datat ItemControlert GetRuneItemIDtGetRuneItemPlusLV(RtruneDicttruneUnlockListtholeNumtruneDatat
runeItemIDtruneItemPlusLV((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR^þs cCs‰i}tjƒ}xpt|jƒƒD]\}|j|ƒ}|jƒ}|jƒ}tj||ƒr%|j    |dƒd||<q%q%W|S(Nii(
R’R¯R…tGetTreasureCounttGetTreasureByIndextGetIDtGetTreasureTypetPlayerMagicWeapontGetIsActiveMagicWeapontget(RtmwDictR¶RvttreasureIpyDatat magicWeaponIDt treasureType((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyR_ s   !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 GetItemTypeIDRPt    GetIsBindt
GetIsSuitet GetUserDataRˆRe(RtpackTypeRªtitemListR«tcurEquiptitemDicttuserData((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyRRs   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                      #        (#RKR RURR?RSRêRRÑRxR‚RaRÄR’RqRQRcRRR
R    RR ReRXRYRZR`R[R\R]R^R_RRRô(((sc.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerViewCacheTube.pyt<module>sB                     
             L