cehua_wcy
2018-08-27 c6f03d29b8c78ea2298276ddb808bd2289baa9b3
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
x{[c@s’ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ddl Z ddl Z ddlZddlZddlZejddƒejddƒd„Zd„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#dS(iÿÿÿÿNs Script\NPC\tNPCAItcCsMtjƒd}tj|dƒtjƒd}tj|dƒtt_dS(NsScript\NPC\NPCAIRs
Script\NPCR(tChConfigt
GetAppPatht    GameWorldt ReloadScripttOnNPCDiet    NPCCommon(ttickt
scriptPath((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt    ReloadNPC:s     cCsKtjtd|jƒdfƒ}|dkr>tjtjfS|||ƒS(Ns AIType_%d.%stOnGetOwnerRelation(Rt GetExecFuncRt    GetAITypetNoneRtType_Relation_FriendtDef_PASysMessage_None(tcurNPCtownertcallFunc((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR Fs" cCs?tjtd|jƒdfƒ}|dkr2dS|||ƒS(Ns AIType_%d.%stGetNPCAttackTagLimit(RR RR R(RttagObjR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRNs" cCshtjƒj|jƒtjfƒtjtd|j    ƒdfƒ}|dkrTdS||||ƒdS(Ns AIType_%d.%stOnDie( tPassiveBuffEffMngtGetPassiveEffManagertRemovePassiveEfftGetIDt IPY_GameWorldtgotNPCRR RR R(RtHurtTypetHurtIDR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRZs "" cCsMtj|ƒtjtd|jƒdfƒ}|dkr?dS||ƒdS(Ns AIType_%d.%st OnNPCReborn(tFBLogictOnNPCRebornInFBRR RR R(RR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRcs  " 
cCsYtjtd|jƒdfƒ}|dkr2dS|||||ƒtj||ƒdS(Ns AIType_%d.%st
OnAttacked(RR RR RtPlayerActivitytOnAttackNPCActivity(tatkObjRtskillRR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt OnNPCAttackedqs
" cCstjtƒ|ƒdS(N(Rt GetPsycoFunct__Func_InitNPC(R((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytInitNPCscCsêtt_tjdtjƒjƒƒtjƒ}|jƒ}x˜t|ƒD]Š}|j    |ƒ}tj
|ƒ|j ƒdkrK|j ƒdkrKtjd|j ƒ|jƒ|j ƒ|j ƒfƒtdƒ‚qKqKWtjdƒdS(NsNPC Initing...FB %diis@###NPC²ß»®Ìî±í´íÎó£¬NPC = %s , %s , Ë¢Ðµã = %sºÍÖØÉúµã = %s´íÎós ###NPC ²ß»®Ìî´í±íÀ­ s NPC Init OK!(RRRtLogt GetGameWorldtGetCurGameWorldIndext GetNPCManagert GetNPCCounttxranget GetNPCByIndexR*tGetRefreshPosCounttGetPatrolPosCounttGetNPCIDtGetNamet    Exception(RtgameNPCtnpcCounttiR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR)ˆs       $5 cCstjtƒ|ƒdS(N(RR(t__Func_NormalNPCAI(R((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt NormalNPCAIŸscCsÁtjƒ}g}xŠtd|jƒƒD]s}|j|ƒ}|jƒdkrUq(n|jƒtjkrŽtj    |ƒ}|dkrŽq(qŽn|j |ƒq(Wx|D]}t ||ƒq¦WdS(Ni( RR.trangetGetActiveNPCCounttGetActiveNPCByIndexRtGetGameNPCObjTypeRt
gnotSummont GetObjDetailRtappendt ProcessNPCAI(RR7tnormal_NPC_ListtindexR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR:©s       cCstjtƒ|ƒdS(N(RR(t__Func_BossSummonNPCAI(R((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytBossSummonNPCAIÔsc Csmtjƒ}g}x–td|jƒƒD]}|j|ƒ}|jƒdkrUq(n|jƒtjkrpq(n|j    ƒdkrˆq(n|j ƒsšq(n|j |ƒq(Wx|D]}t ||ƒq²Wtjƒ}||jtjƒtjtjkrÿdS|jtj|ƒg}x–td|jƒƒD]}|j|ƒ}|jƒdkr[q.n|jƒtjkrvq.n|j    ƒdkrŽq.n|j ƒs q.n|j |ƒq.Wx|D]}t ||ƒq¸Wg}xQtd|jƒƒD]:}|j|ƒ}|jƒdkrqën|j |ƒqëWx|D]}t ||ƒq0Wg}x_t|jƒƒD]K}|j|ƒ}|j ƒsžtjd|jƒƒq`n|j |ƒq`Wx|D]}t ||ƒq¶Wg}    xutd|jƒƒD]^}|j|ƒ}
|
jƒdkrqén|
jƒs(qén|
j ƒs:qén|    j |
ƒqéWx|    D]}
t |
|ƒqRWdS(Nis###ïÚ³µËÀÍö , %s(RR.R<tGetSummonNPCCounttGetSummonNPCAtRtGetTypeRtntElftGetOwnerRtIsAliveRBRCR,t GetTickByTypeRtTYPE_Map_Tick_BossAITicktTYPE_Map_Tick_Timet SetTickByTypet GetBossCountt    GetBossAtt GetTruckCountt
GetTruckAtR+R5t GetPetCounttGetPetAtt GetIsSummon( RR7t gameElf_ListRERt    gameWorldtgameSummon_Listt gameBoss_ListtgameTruck_Listt gamePet_ListtcurPet((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRFÜs€            cCstjtƒ|ƒdS(N(RR(t__Func_NPCRefreshPoint(R((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytNPCRefreshPoint^scCstj|ƒdS(N(tNPCCustomRefreshtProcessAllNPCRefresh(R((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR`fs cCs»|jƒ}tjƒjtj|ƒ}|rx||kr>dStjƒjtj|dƒtjd|||fƒntjt    d|j
ƒdfƒ}|dkrªdS|||ƒdS(Nis1NPCÐã½áÊø£¬¿ªÊ¼´¦ÀíAI!npcID=%s,tick=%s,endTick=%ss AIType_%d.%st    ProcessAI( R4Rt    GetGameFBtGetGameFBDictByKeyRtDef_FBDict_NPCShowEndTickt SetGameFBDicttDebugLogR RR R(RRtnpcIDtendTickR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRCqs      " cCs9tjtd|jƒdfƒ}|r5|||ƒSdS(Ns AIType_%d.%st OnCollectEnd(RR RR (t    curPlayerRR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRl—s" cCs||jƒ}|jƒtjkr%tStj|ƒtj|ƒdkrKtStj    |tj|ƒƒt
j d||ƒtS(Nis!²»ËÀbossѪÁ¿Îª0ÉèÖÃÂúѪ! npcID=%s( R4RJRt    ntUndeathtFalsetGameObjtGetHPtGetMaxHPtTruetSetHPRRi(RRj((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytOnUndeathBossAttacked×s "cCstjd||fƒtjƒj|ƒ}tj||ƒtjtd|jƒdfƒ}|dkrndS|||ƒdS(Ns----NPCAppearWarn:%s %ss AIType_%d.%st NPCAppearWarn(
RRiR.t FindNPCByIDt
SkillShelltNotifyNPCSkillWarnR RR R(RtobjIDRR((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRvås"  ($RRRRRRbt GameLogInfottimetmatht ReadChConfigR#t SkillCommont    BuffSkillRpRxR Rt    ImportAllR
R RRRR'R*R)R;R:RGRFRaR`RCRlRuRv(((sR.\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt<module> sH                                                               
    +        ‚             &    @