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
x{[c@sçddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZdZd„Zd„Zd„Zd„Zd„Zd„Zd    „Zd
„Zd „Zed „Z d „Z!d„Z"d„Z#ed„Z$d„Z%ed„Z&d„Z'd„Z(d„Z)d„Z*d„Z+d„Z,d„Z-d„Z.dS(iÿÿÿÿNidcCsE|jƒ}|jƒ}|dkr(tS|jƒj|krAtStS(N(t    GetPetMgrt GetFightPettNonetFalset
GetRolePettPetIDtTrue(t    curPlayertcurPetIDtpetMgrt fightPetObj((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytCheckPetIsFight<s   c    Cs$|jƒjƒ}|dkr"dStj|ƒ}|jƒ}|jƒ}tj||ƒ}| swt    j
|ƒdkrÈxNt |j ƒƒD]7}|j |ƒ}| sŠt    j
|ƒdkrŠqŠqŠqŠWn| sät    j
|ƒdkrèdSd}tj||||ƒr
dStj||d|ƒdS(Ni(RRRt    NPCCommont
NPCControltGetUseSkillTagIDtGetUseSkillTagTypet    GameWorldtGetObjtGameObjtGetHPtrangetGetAngryNPCCounttGetAngryNPCByIndextAICommontDoAutoUseSkillt
BaseAttacktAttack(    RtticktrolePettrolePetControlt useSkillTagIDtuseSkillTagTypetcurTagtittagDist((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytPetFightMs&    cCsp|jƒjƒ}|dkr"dStj|ƒ}|j||dƒ\}}|j||ƒt|||ƒdS(Ni(RRRR R tGetMoveNearPost    ChangePostPetMove(RtdestPosXtdestPosYtfightPett
petControltmovePosXtmovePosY((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytFightPetFollowMoveys cCsœtjƒ}|jƒ|jƒ|_tj|_tj|_    ||_
||_ |j ƒ|_ |jƒ|_|jƒ|_|j|jƒ|jƒƒdS(N(t ChNetSendPackt
tagObjMovetCleartGetIDtObjIDt IPY_GameWorldtgotNPCtObjTypetmtNormaltMoveTypetDestPosXtDestPosYtGetSpeedtSpeedtGetPosXt    StartPosXtGetPosYt    StartPosYt    NotifyAllt    GetBuffert    GetLength(R)tposXtposYtsendPack((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyR&‹s 
          cCs?|jƒjƒ}|dkr"dStj|ƒ}|jƒdS(N(RRRR R t ClearNPCAngry(RR)R*((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytClearFightPetAngry s  
cCsd|dkrdS|jƒj}|dkr/dStj|tjƒ}|dkr`|jƒr`dS|S(Ni(RRtPlayerIDRRR3t    gotPlayertIsEmpty(tcurPett curPlayerIDtcurObj((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt GetPetOwner¯s  cCsB|jƒ}|tjkrtS|jƒ}|tjkr>tStS(N(tGetGameObjTypeR3R4RtGetGameNPCObjTypetgnotPetR(RMt
curObjTypet
npcObjType((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytIsPetÄs  cCs7tj|tƒ}x|D]\}}|jƒqWdS(N(R tGetNPCBuffRefreshListRR0(RKtbuffRefreshListt    buffStatet    canPileup((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt ClearPetBuffÕscCs>|j||ƒ|jtƒt|ƒtjƒj|ƒdS(N(tSummont SetIsBattleRt InitRolePettPassiveBuffEffMngtGetPassiveEffManagertRegistPassiveEff(RKtcurPosXtcurPosY((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt    SummonPetãs
 
cCsªtj|ƒ|jƒ}|jƒdkr>|jtjƒn
|jƒtj|ƒ}|j    |ƒ|j
ƒdkr¦t ||j ƒƒt jd|jƒjƒndS(Nis³èÎïÖØÉúѪÁ¿Îª0, PetID = %s(R tInitNPCt GetNPCAngryt GetAngryCounttInittChConfigtDef_Pet_Angry_CountR0R tRefreshNPCStateRtPetDead_ReStoreHPtGetMaxHPRtErrLogRR(Rt canSyncClienttnpcAngryR*((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyR\òs  
 cCsñ|jƒ}|jƒ}|dkr(tSt|ƒ|jtƒtj|ƒtj|ƒ}|j    dt
ƒt j |ƒ}t j ||ƒ}|r«|jtjtjƒn|jƒj}|jƒj}|j|ƒtjd||fƒt
S(NRms&Ëæ´ÓÕٻغóĬÈÏ·ÅÉú, petID=%s, npcID=%s(RRRRRYR[R t    SetDeadExR RiRt    PlayerPettGetPetObjItemIndextGetPetDataItemByIndext SetUserAttrt ShareDefinetDef_IudetPet_StatetDef_PetState_NullRRtNPCIDtPetList_SetFreeRtDebugLog(Rt
rolePetMgrR)R*t petItemIndextpetItemtpetIDtnpcID((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytReCallFightPet s$   
   cCs$t|ƒ}|sdSt|ƒdS(N(RNR(RKt curPetOwner((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt
SetPetDead.s
 
cCst|t|tdƒƒdS(Nid(tSetPetHPtinttDefPetRebornHPRate(RKtmaxHP((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyRj>scCs|j|ƒ|sdSdS(N(tSetHP(RtvalueRm((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyR‚Ks cCs0t|jƒ||jƒƒ}t||ƒdS(N(tminRRkR‚(RR‡t remainValue((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytAddPetHPYs c    Cskt|ƒ}|sdStj||ƒ}|s2dSd„tjgg}g}x%|D]}|j|d|ƒƒqTW|jtj|ƒƒ|j    tj
|ƒƒ|j tj |ƒƒ|j |jƒƒ|j|jƒƒgtdƒD] }i^qê}tj|||ƒtj||ƒtjd|jƒ|jƒ|jƒ|jƒ|jƒfƒ|sgdSdS(NcSs
|jƒS(N(t    GetMaxAtk(tpetObj((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt<lambda>osiis=RefurbishPetAttr ID=%s,npcID=%s,atk=%s,hit=%s,skillAtkRate=%s(RNRptGetPetDataItemR3tPetInfoRefresh_PhysicAtktappendt    SetMinAtkt PlayerControlt GetPetMinAtkt    SetMaxAtkt GetPetMaxAtktSetSkillAtkRatetGetPetSkillAtkRatetSetHittGetHittSetSpeedR:RtCalcSkill_PetBattleEffecttCalcBuffer_PetBattleEffectRRyR1tGetNPCIDR‹tGetSkillAtkRate(    RRmRt petDataItemtsyncListtbeforeValueListtsyncInfoR!t allAttrList((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytRefurbishPetAttrds.          5    cCswtjƒ}|jƒ}xE|D]=}|j|ƒ}|sOtjd|ƒdS|j|ƒqWtjƒj|ƒdS(Ns8PlayerPetLearnSkillList LeanrSkillID = %s, noFindInTable(    Rt GetGameDatatGetSkillManagertGetSkillBySkillIDRltLearnSkillByIDR]R^R_(RtlearnSkillListtgameDatatrolePetSkillManagert    leSkillIDtlearnSkillData((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytDoLogic_PlayerPetLearnSkillList·s   cCs{tjƒjƒs&tj|dƒtS|jƒ}|jtj    ƒtj
kratj|dƒtS|j ƒdkrwtSt S(NtPet_liubo_314885t AvoidSink09i( RtGetMaptGetMapCanOutPetR’t
NotifyCodeRt
GetPetDatatNomalDictGetPropertyRgtDef_Player_Dict_Wallow_LVtDef_GameWallow_LV_FirstRR(Rt    curPetObjtpetData((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytCheckPetCanFightÎs cCsdS(N((RR((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytDoLogic_PetInfo_OnLeaveServerûscCsV|jƒ}xCtd|jƒƒD],}|j|ƒ}t|ƒt||ƒq"WdS(Ni(RRt PetList_Cntt
PetList_Att__RefreshAndSyncPetInfot__AutoSummonPet_OnLogin(RRR    tindexR((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytDoLogic_PetInfo_OnLogins  
cCsj|jƒsdStjƒjƒs&dStj|jƒ|jƒtj    ƒ}t
||jƒ|jƒƒdS(N( t GetIsBattleRR±R²tGameMaptGetEmptyPlaceInAreaR<R>RgtDef_SummonAppearDistRb(RRt    resultPos((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyR¿s $cCsI|jƒ}x6td|jƒƒD]}|j|ƒ}t|ƒq"WdS(Ni(RRR¼R½R¾(RRR    RÀR((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytSync_PetInfo_ChangeMap*s
 cCsGtjƒjƒr#tj|ƒdSt|ƒs3dStj|dƒdS(NR¯(RR±R²Rpt AutoSummonPetRR’R³(R((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytDoLogic_PetLoadMapOK9s  cCst|tƒdS(N(R\R(R((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyR¾Ms (/R3RgRt ReadChConfigt    BuffSkillt
SkillShellRpR’R t SkillCommonRÃtOperControlManagerRttrandomtcopytmathRRRR]R.R„R R#R-R&RGRNRTRYRbRR\RRRjR‚RŠR¤R®RºR»RÁR¿RÇRÉR¾(((sZ.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt<module>sZ                             ,                                 "              S        -