xdh
2018-11-01 5aa770c677e84bc3aebab8b9e3478387a011e4d9
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
™ôÚ[c@s/ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZd„Zd„Zd„Zd„Zdd„Zd„Zd„Zd    „Z d
„Z!d „Z"d „Z#d „Z$e%d„Z&d„Z'd„Z(d„Z)d„Z*d„Z+e,e,d„Z-d„Z.d„Z/d„Z0d„Z1d„Z2d„Z3d„Z4d„Z5dS(iÿÿÿÿNcCsdS(N((t    curPlayer((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytDoLogic_PetInfo_OnDay0scCstjd|jƒƒtS(Ns DoPetOpen...(t    GameWorldtDebugLogt GetPlayerIDtTrue(R((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyt    DoPetOpen7scCsdS(N((R((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytDoLVUPLogic_PetTscCstjd|ƒS(NtPetInfo(t IpyGameDataPYtGetIpyGameData(tpetNPCID((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyt GetPetIpydataXsc Csntjƒ}|j|ƒ}|s6tjd|ƒdSt|ƒ}|s]tjd|ƒdStjtjƒ}|sydS|j    t
ƒ|j t j |ƒ|j t jt jƒ|dkrÇ|jƒn|}|j t jtd|dƒƒ|j t j|jƒƒ|jƒ}|jƒ}    xIt|ƒD];\}
} |    |
} || krSq+n|jt j| ƒq+W|S(Ns0FindNPCDataByID can not find npcData petNPCID=%ss/tagPetInfo.txt can not find petData petNPCID=%siÿÿÿÿii(Rt GetGameDatatFindNPCDataByIDtErrLogR t
ItemCommontCreateSingleItemtChConfigtDef_ItemID_PetDatat    SetIsBindRt SetUserAttrt ShareDefinetDef_IudetPet_NPCIDtDef_IudetPet_StatetDef_PetState_Nullt GetInitRanktDef_IudetPet_ClassLVtmaxtDef_IudetPet_QualityLVt
GetQualityt
GetSkillIDtGetSkillUnLockt    enumeratet AddUserAttrtDef_IudetPet_Skill( RR tclasslvtgameDatat
petNpcDatat
petIpyDatat
newPetItemt    initClasst petSkillListtpetSkillUnLockListtitskillidtlimitPetClassLV((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytGetNewPetDataItem[s4      
 cCs#|s
dSt|ƒ}t||ƒS(N(tGetPetObjItemIndextGetPetDataItemByIndex(t curPetOwnertrolePett packItemIndex((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytGetPetDataItem€s cCsX|jƒjtjƒ}|j|ƒ}tj|ƒsTtjd||j    ƒƒdS|S(Ns$PetDataItem is none! PetItemIndex=%s(
tGetItemManagertGetPackRtrptPettGetAtRtCheckItemCanUseRRR(Rt petItemIndext petDataPackt petDataItem((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyR1‡s cCsv|jƒjtjƒ}xWt|jƒƒD]C}|j|ƒ}|jƒrRq+n||jtj    ƒkr+|Sq+WdS(N(
R6R7RR8trangetGetCountR9tIsEmptyt GetUserAttrR(RR R<t petDataIndextpetItem((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytGetPetDataItemByNPCID’s cCs |jƒjS(N(t
GetRolePett Friendliness(R3((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyR0scCs ||_dS(N(RF(t    petStructR;((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytSetPetObjItemIndexžscCsv|jƒjtjƒ}xWt|jƒƒD]C}|j|ƒ}|jƒrRq+n||jtj    ƒkr+|Sq+WdS(Niÿÿÿÿ(
R6R7RR8R>R?R9R@RAR(RR R<RBRC((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytGetPetDataItemIndexByNPCID¡s cCsŠtjƒj|ƒ}tjƒ}|jƒ}|jƒ}||jtj    ƒtj
tj    krcdS|j tj    |ƒt |||ƒdS(N( RtGetPlayerManagertGetPlayerByIndext IPY_GameWorldtIPY_CPetStateChangetGetPetIDtGetStatet GetTickByTypeRtTYPE_Player_Tick_ChangePetStatetTYPE_Player_Tick_Timet SetTickByTypetDoChangePetState(tindexttickRtpackR;tstate((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytPetStateChange¿s   c
Cs=|dkrdS|tjkr#dSt||ƒ}|s<dS|jtjƒ}|jtjƒ}t|ƒ}|svdS|jƒ}||dkr§tj    d|ƒdS|jtj
ƒ}    tj    d||    |fƒ|    tj kròt j |ƒn|tjkrn|tj kr#t||ƒn|r9t|tƒndS(Niis&    ÁéÊÞÇл»Íâ¹Û,½×¼¶²»×ã%s,²»¿ÉÇл»£¡s4³èÎï״̬±ä¸ü!petItemIndex=%s,curState=%s,tagState=%s(RtDef_PetStateListR1RARRR tGetUseNeedRankRRRtDef_PetState_Fightt
PetControltReCallFightPetRt__DoPetGoOutToFighttRefreshPetItemAddAttrR(
RR;ttagStatet    isRefreshRCt
curClasslvR tipyDatat needClasslvtcurState((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyRTÑs8       
c Csÿ|jtjƒ}tjƒj|ƒ}|sBtjd|ƒdS|jƒ}|j|ƒ}|dkr~tj
d|ƒdS|j ƒ}|j }|j ƒ|_t|j ƒ|_d|_|jƒ}t||ƒ|j|ƒt|ƒ\}    }
tj||    ƒtj|ƒ} | jdtƒtj||jƒtƒ|jƒtj||ƒs{tj d|ƒ|j!|ƒdStj"|ƒt#j$|j%ƒ|j&ƒt'j(ƒ} tj)|| j%ƒ| j&ƒƒ|j*tj+tj,ƒt-j.|t'j/|dƒt0S(Ns.PetStateChange FindNPCDataByID, pet npcID = %ss-PetStateChange PetList_Add, Ìí¼Ó³èÎï = %sʧ°Üit canSyncClients"²»¿É³öÕ½£¡PetList_SetFree petID=%s(1RARRRR RtLogt    GetPetMgrt PetList_AddtNoneRREtPetIDt    GetIsBindtBindTypetstrtNametPostGetItemPlaceIndexRHt
SetRolePettGetPetLearnSkillR]tDoLogic_PlayerPetLearnSkillListt    NPCCommont
NPCControltRefreshNPCStatetFalsetSetPetHPtGetMaxHPtSync_SkillListtCheckPetCanFightRtPetList_SetFreeR^tGameMaptGetEmptyPlaceInAreatGetPosXtGetPosYRtDef_SummonAppearDistt    SummonPetRRR\t PlayerControltNomalDictSetPropertytDef_PDict_FightPetIndexR( RRCtnpcIDR&tpetMgrR3RGtpetIDR;tlearnSkillListtpassiveSkillListt
petControlt    resultPos((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyR_sD              
  $cCs7|jtjƒ}|sdSt||dtjƒdS(Ni(tNomalDictGetPropertyRR‡RTRR\(Rt fightPetIndex((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyt AutoSummonPetWs
c CsKi}g}tj}|jƒj|ƒ}xït|jƒƒD]Û}|j|ƒ}|jƒrdq=nx±t|jtj    ƒƒD]—}|j
tj    |ƒ}t j ƒj |ƒ}|s¹q}ntj|ƒrÛ|j|ƒq}n|jƒ}    |    |kr||    j|ƒq}|g||    <q}Wq=Wg|jƒD]}
t|
ƒ^q)} | |fS(N(RR8R6R7R>R?R9R@tGetUserAttrCountR#tGetUserAttrByIndexRR tGetSkillBySkillIDt SkillCommont isPassiveAttrtappendtGetSkillTypeIDtvaluesR( RtlearnSkillDictRŒt petPackIndextpetPackR,RCtskillIDt curSkilDatat skillTypeIDtatlearnSkillIDList((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyRt`s,        %cCsétj}|jƒj|ƒ}d}x¤t|jƒƒD]}|j|ƒ}|jƒr^q7nxft|jtj    ƒƒD]L}|j
tj    |ƒ}t j ƒj |ƒ}|s³qwn||jƒ7}qwWq7W|jtjtj|ƒdS(Ni(RR8R6R7R>R?R9R@R’R#R“RR R”t GetFightPowertSetDictRtDef_PlayerKey_MFPSkilltDef_MFPType_Pet(RR›Rœt allFightPowerR,RCRRž((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytSetPetSkillFightPower|s     cCs>tjƒj|ƒ}|j}|j}t|||tƒdS(N(RRJRKtPetNPCIDt    IsUseGoldt DoActivatePetR(RUt
clientDataRVRR t    isUseGold((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyt OnActivatePet—s
        cCsž|s
dSt}tj}|jƒj|ƒ}x}t|jƒƒD]i}|j|ƒ}|jƒrnt    }qAn|j
tj ƒ}    |    |krAt j d||    |fƒdSqAW|sÈtj|dƒdSt|ƒ}
|
sÞdS|
jƒ} |
jƒ} |jƒjtjƒ} tj| | | ƒ\}}|sJt j d| | fƒdSt||ƒ}|scdStj|ƒj||ƒs‚dStj|tjtt |ƒƒƒtj!|| || ttj"ƒt#j$||ƒ|
j%ƒpâd}tj&d||j'ƒ|gƒ|j(ƒj)ƒ}|sXt*||ƒ}t j d||fƒt+||tj,ƒn+|rƒt-|ƒ\}}t.j/||ƒnt0|t    ƒt1|ƒt    S(Ns1ÒѾ­ÓµÓиóèÎ i=%s,petItemNPCID=%s,petNPCID=%stPet_liubo_76326s)DoActivatePet() item(%s[%s]) isn't enoughtGetPetisEûÓгèÎï³öÕ½£¬»ñµÃгèÎĬÈϳöÕ½¸Ã³èÎpetNPCID=%s,petItemIndex=%s(2RyRR8R6R7R>R?R9R@RRARRRR…t
NotifyCodeR tGetUnLockNeedItemIDtGetUnLockNeedItemCntRLtrptItemRtGetItem_FromPack_ByIDR/t ItemControlertPlayerItemControlert    PutInItemtPlayerMagicWeapontSetMWPrivilegeDataRtMWPrivilege_PettlentGetActivePetIDt
ReduceItemt ItemDel_Pett
EventShelltEventRespons_OnActivatePett GetUnlockSyst WorldNotifytGetNameRit GetFightPetRIRTR\RtR]RuR`R§(RR R¬t    isUseItemthasSpaceR›RœR,tpackItemt petItemNPCIDRdt
needItemIDt needItemCnttitemPackt    hasEnoughtitemListR(tsysMarkR3R;R‹RŒ((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyRªžs`         " 
cCsëtjƒ}|jƒ}|dks0||krKtjd||fƒdS|j|dƒjƒ}|j|dƒjƒ}tj    }|j
ƒj |ƒ}xªt |j ƒƒD]–}    |j|    ƒ}
|
jƒrÕq®n|
jtjƒ} | |kr®|
jtjtd|dƒƒ|
jtj|ƒtjd|    | |fƒdSq®Wt|||ƒ} | sddStj    }tj|ƒj|| ƒsŒdStj|tjtt |ƒƒƒt!|ƒt"||ƒ} t#|| tj$ƒt%|t&ƒdS(Nis2¼¤»î³èÎﳬ¹ý³èÎï±íÊý¾ÝÊý: index=%s,petInfoCount=%sis1ÒѾ­ÓµÓиóèÎ i=%s,petItemNPCID=%s,petNPCID=%s('R    tIPY_DatatGetPetInfoCountRRtGetPetInfoByIndextGetIDRRR8R6R7R>R?R9R@RARRRRRRR/RµR¶R·R¸R¹RRºR»R¼R§RIRTR\R`R(RRUR$t
ipyDataMgrt petInfoCountR tqualityR›RœR,RÇRÈR(R;((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyt DoPetActivateÜs>             "
 cCs…g}tj}|jƒj|ƒ}xZt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Ü먦Æôscan not found pet npcID = %sis³èÎïÉý½× ÒÑÂú¼¶¡£¡£¡£classLV=%st PetClassCostit    PetUpItemisPetClassUp Éý½×µÀ¾ß²»×ã¡£¡£¡£tPetUpLvt
PetUpLvMaxR;R t
PetClassUp(ORRJRKt GameFuncCommt GetFuncCanUseRtGameFuncID_PetRRt PetItemIndext
UseItemCntt    IsAutoBuyR1RARR RRRR t
GetMaxRankR    R
t GetUpNeedExptDef_IudetPet_ExpR6R7RLR³tGetFuncEvalCfgRtGetItem_FromPack_ByID_ExExtextendR9R:R?tGetItemByTypeIDtGetAutoBuyItemNeedGoldRtDef_Cost_Reason_SonKeyR…tPayMoneytTYPE_Price_Gold_MoneytDef_Cost_BuyStoreItemRÃtGetEffectByIndextGetEffectValuetxrangeRR½RR¾RRR tGetSkillUnLockSysR!R"R#R”R•R–R—R»RÂRiRÄR]RuR§R`t PlayerSuccesstDoAddSuccessProgresstSuccType_PetClassLVtupdatetevalt GetUserDatatDataRecordPacktDR_ClassUpSystem(3RUR«RVRtplayerIDRàt costItemCountt    isAutoBuyR=R R&tclassLVR't
maxClassLVRdtneedExptcurPetClassExpt curItemPackt itemIndexListtcostItemIDListtnowCnttitemIDRÌt    indexListtfindItemIsBindtlackCntt    itemIndextcurItemtitemCntt autoBuyItemIDtlackCosttinfoDictt
playerNametcurEfftaddExptupdExpt
updClassLVtlvt    upNeedExptdelCntR*R+t sysMarkListR‹R,R-R.RžRÎtfightPett extraInfoDict((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyRÜsì                  %    
 
 
"         
 "# 
#cCszt|ƒ|r5tj|ƒjdtjdtƒntj|ƒjdtƒ|jƒjƒ}|rvtj    |ƒndS(Nt billboardFunctisForce(
tCalcPetItemAddPlayerAttrR…tRefreshPlayerAttrStatetPlayerBillboardtUpdatePyPetBillboardRRiRÄR]tRefurbishPetAttr(RtisUpdBillboardR((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyR`¸s
%c    Cs¢t|ƒ\}}x‰|D]}tjƒj|ƒ}|s@qnxWt|jƒƒD]C}|j|ƒ}|jƒtj    krƒqSnt
j |||ƒqSWqWdS(N( RtRR R”RñtGetEffectCountt    GetEffectt GetEffectIDRtDef_SkillEffs_Pett
SkillShelltCalcBuffEffAttr(    RR3tallAttrListPetR‹RŒRtcurSkillt effectIndext    curEffect((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytCalcSkill_PetBattleEffectÆs cCsktj|ƒ}x'|D]\}}tj|||ƒqWtj||tjƒtj    ||tj
ƒdS(N( RvtGetNPCBuffRefreshListR'tCalcCurBuffer_EffecttCalcNoLineEffecttChangeNPCAttrInNoLineEffectListRtCalcAttr_BattleNolinetCalcLineEffecttChangeNPCAttrInLineEffectListtCalcAttr_Battle(R3R)tbuffRefreshListt    buffStatet    canPileup((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pytCalcBuffer_PetBattleEffectÚs cCs gtdƒD] }i^q }gtdƒD] }i^q,}gtdƒD] }i^qK}gtdƒD] }i^qj}t|ƒ\}}tjtj||ƒtjtj||ƒ|jtj    ƒ}t
j ||tj ƒt |ƒ\}    }
x|
D]ú} tjƒj| ƒ} | s"qûn| jƒtjkr›x[t| jƒƒD]G} | j| ƒ}|jƒ}|jdƒ}tj||||ƒqJWqûnxWt| jƒƒD]C} | j| ƒ}|jƒtjkrÞq®ntj|||ƒq®WqûWtj|tj|ƒtj|tj|ƒtj|tj|ƒtj|tj|ƒd}tj }|j!ƒj"|ƒ}xut|j#ƒƒD]a}|j$|ƒ}|j%ƒr¯qˆn|j&tj'ƒ}t(|ƒ}|sÙqˆn||j)ƒ7}qˆW|j*tj+tj,|ƒdS(Nii(-R>tGetPetAtkValueR…tCalcAttrDict_TypeRtDef_Effect_PetMinAtktDef_Effect_PetMaxAtkRRtDef_PDict_TotalSignNumtPlayerAttrFruittCalcAttrFruitAddAtrrtDef_AttrFruitFunc_PetRtRR R”R˜tDef_SkillID_PetSignDayRñR#R$R%RðR&R'R(tSetCalcAttrListValuetDef_CalcAttrFunc_PettDef_CalcAttrFunc_PetSoultDef_CalcAttrFunc_PetSigntDef_CalcAttrFunc_PetSkillR8R6R7R?R9R@RARR tGetInitFightPowerR£tDef_PlayerKey_MFPExR¥(Rt_R)tallAttrListPetSigntallAttrListPetSoult skillAttrListt totalMinAtkt totalMaxAtkt totalSignNumR‹RŒRR*R+R,teffIDteffValuet    initFPAddR›RœR,RCRÈR'((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyRësX        c Csêtj|tjƒsdSd}tj}|jƒj|ƒ}x”t|jƒƒD]€}|j    |ƒ}|j
ƒrwqPn|j tj ƒ}|j tj ƒ}tjd||dƒ}||rÉ|jƒnd7}qPW|}    |}
|    |
fS(NiRØi(ii(RÝRÞRRßR8R6R7R>R?R9R@RARRR    R
t    GetAtkAdd( Rt classAddAtkR›RœR,RÇRÈR$t classIpyDataRNRO((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyR:'s       (6RRvRRLRùRR'RµR…RóRÝRR•R]R¿RR    R?RR¸tPassiveBuffEffMngR0R3trandomtmathRRRR R/R5R1RDR0RHRIRYRRTR_R‘RtR§R­RyRªRÖR¼RÜR`R-R9RR:(((sY.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\Player\PlayerPet.pyt<module>sf                                          %                               @    F                    >    (        Ÿ                <