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
q¸ec@sëddlZddlZddlZddlZddlZddlZddlZddlZddlZd„Z    d„Z
d„Z d„Z d„Z dd„Zd    „Zd
„Zed „Zd „Zd „Zd„Zd„ZdS(iÿÿÿÿNcCsd|dkrdS|jƒj}|dkr/dStj|tjƒ}|dkr`|jƒr`dS|S(Ni(tNonet
GetRolePettPlayerIDt    GameWorldtGetObjt IPY_GameWorldt    gotPlayertIsEmpty(tcurPett curPlayerIDtcurObj((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt GetPetOwner*s  cCsB|jƒ}|tjkrtS|jƒ}|tjkr>tStS(N(tGetGameObjTypeRtgotNPCtFalsetGetGameNPCObjTypetgnotPettTrue(R
t
curObjTypet
npcObjType((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytIsPet?s  cCsQ|jƒ}|tjkrtS|jƒ}|tjkr>tS|jƒtjkS(s– ÊÇ·ñÁé³èNPC£¬ÕÙ»½ÊÞÀàÐÍ£¬Íæ¼Ò¡¢Íæ¼Ò¾µÏñ¡¢NPCͨÓ㬾ù¿ÉÓÐÁé³èÕÙ»½ÊÞ
            Çø±ðÓÚ IsPet Îª¾É°æµÄ PY_GameWorld.gnotPet ÊµÀý¶ÔÏ󣬽öÍæ¼ÒʵÀýÓÐ
    (R RR RRt
gnotSummontGetTypetntPet(R
RR((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytIsPetNPCMs  cCs“|dkrdS|jƒ}|tjkr/dSd}|jƒ}|tjkrtj|ƒ}|r|jƒ}|rŒtj|ƒ}qŒqn|S(s{ »ñµÃ³èÎïµÄÓµÓÐÕߣ¬¿ÉÄÜÎªÍæ¼Ò¡¢Íæ¼Ò¾µÏñ¡¢NPC
        Çø±ðÓÚ GetPetOwner Îª¾É°æµÄ PY_GameWorld.gnotPet ¹éÊôÕß½öÖ§³ÖÍæ¼Ò
    N(    RR RR RRRt GetObjDetailtGetOwner(Rt
atkObjTypet summonOwnerRt curNPCDetailt curNPCOwner((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytGetPetNPCOwnerYs    cCs7tj|tƒ}x|D]\}}|jƒqWdS(N(t    NPCCommontGetNPCBuffRefreshListRtClear(RtbuffRefreshListt    buffStatet    canPileup((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt ClearPetBuffvsicCsdx]t|jƒƒD]I}|j|ƒ}t|ƒs:qn|r||jtjƒkr|SqWdS(N(trangetGetSummonCounttGetSummonNPCAtRt GetDictByKeytChConfigtDef_Obj_Dict_FightPetPlaceNum(R
tplaceNumtindext curSummonNPC((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt GetFightPets cCskttjddƒƒ}dg|}|s/|Si}x6|D].}|jddƒ}|s`q<n|||<q<W|sx|S|jƒ|jƒ}}xÓt|ƒD]Å}    |    d}
|
|krÀqžn||
} | jddƒ} | sèqžn| jddƒ} | jdgƒ}tj    || |||ƒ}|s3qžn|j
t j |
ƒ|j
t j | ƒ|||    <qžW|S(Nt PetGoOutFightitstateitnpcIDtqualitytskills(tlent IpyGameDataPYtGetFuncEvalCfgRtgettGetPosXtGetPosYR'R t    SummonNPCtSetDictR+R,tDef_Obj_Dict_FightPetQuality(R
t petCacheInfotfightPlaceCounttfightPetObjListt fightPetDictt    cacheInfoR2tposXtposYR.R-tpetInfotpetNPCIDR4t skillIDListtpetObj((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytCalloutFightPet‰s<  
 
cCstS(N(R(t    curPlayer((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytReCallFightPetµscCs!tj|||ƒ|sdSdS(N(tGameObjtSetHP(trolePettvaluet canSyncClient((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytSetPetHP¸scCsdS(N((RORP((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytAddPetHPÀscCsŽt|ƒ}|sdS|j|jƒƒ|j|jƒƒtj|tj|ƒƒtj    d|j
ƒ|j ƒ|jƒ|jƒfƒdS(Ns5RefurbishPetAttr ID=%s,npcID=%s,maxAtk=%s,atkSpeed=%s( Rt    SetMinAtkt    GetMinAtkt    SetMaxAtkt    GetMaxAtkRMt SetAtkSpeedt GetAtkSpeedRtDebugLogtGetIDtGetNPCID(RtpetOwner((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytRefurbishPetAttrÆs     ,cCsdtjƒ}|jƒ}xE|D]=}|j|ƒ}|sOtjd|ƒdS|j|ƒqWdS(Ns8PlayerPetLearnSkillList LeanrSkillID = %s, noFindInTable(Rt GetGameDatatGetSkillManagertGetSkillBySkillIDtErrLogtLearnSkillByID(ROtlearnSkillListtgameDatatrolePetSkillManagert    leSkillIDtlearnSkillData((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pytDoLogic_PlayerPetLearnSkillListÛs   cCs^tj|ƒ}|rHtjd|ƒ}|r?|jƒr?tnt}ntjƒj    ƒ}|S(NtChinMap(
t PlayerControltGetCustomMapIDR7tGetIpyGameDatat GetCanOutPetRRRtGetMaptGetMapCanOutPet(RKt customMapIDt
ipyMapDatat    canOutPet((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyRpìs !(RRt    PlayerPetRkR RMtPassiveBuffEffMngR7R+R RRRR&R0RJRLRRRRSR^RiRp(((sjE:\SnxxServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PetControl.pyt<module>s*                                  
    ,