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
-˜ðhc@szddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z    ddl
Z
ddl Z ej ddƒej ddƒd„Z d„Zd„Zd„Zd    „Zd
„Zd „Zd „Zd „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„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((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt    ReloadNPC5s     cCsKtjtd|jƒdfƒ}|dkr>tjtjfS|||ƒS(Ns AIType_%d.%stOnGetOwnerRelation(Rt GetExecFuncRt    GetAITypetNoneRtType_Relation_FriendtDef_PASysMessage_None(tcurNPCtownertcallFunc((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR As" cCs?tjtd|jƒdfƒ}|dkr2dS|||ƒS(Ns AIType_%d.%stGetNPCAttackTagLimit(RR RR R(RttagObjR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRIs" cCsÄtjƒj|jƒtjfƒtjtj|ƒ}|r~|j    d|j
ƒƒtj |ddt jtjƒjƒƒntjtd|jƒdfƒ}|dkr°dS||||ƒdS(Nt    summondies AIType_%d.%stOnDie(tPassiveBuffEffMngtGetPassiveEffManagertRemovePassiveEfftGetIDt IPY_GameWorldtgotNPCRtGetSummonNPCOwnert    gotPlayertSetDicttGetNPCIDtOnPassiveSkillTriggerRRtTriggerType_SummonDieRt GetGameWorldtGetTickR RR (RtHurtTypetHurtIDRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRUs"" cCs@tjtd|jƒdfƒ}|dkr2dS||ƒdS(Ns AIType_%d.%st OnNPCSetDead(RR RR R(RR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR(fs
" 
cCsMtj|ƒtjtd|jƒdfƒ}|dkr?dS||ƒdS(Ns AIType_%d.%st OnNPCReborn(tFBLogictOnNPCRebornInFBRR RR R(RR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR)ms  " 
cCs_tj||||ƒtjtd|jƒdfƒ}|dkrHdS|||||ƒdS(Ns AIType_%d.%st
OnAttacked(Rt OnNPCAttackedRR RR R(tatkObjRtskillRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR-{s " cCsEtjtd|jƒdfƒ}|dkr2tS|||||ƒS(Ns AIType_%d.%st OnCheckCanDie(RR RR RtTrue(R.RR/RR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR0„s" cCstjtƒ|ƒdS(N(Rt GetPsycoFunct__Func_InitNPC(R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytInitNPCsc
Csštt_tjƒjƒ}tjd|ƒtjƒjƒ}g}tj    ddiƒ}||kr±t
d||dƒ}||kr±tj    ddƒ}tjd|ƒq±ntj ƒ}|j ƒ}x½t |ƒD]¯}|j|ƒ}    |    jƒ|kr|    jtƒqÖntj|    ƒ|    jƒdkrÖ|    jƒdkrÖtjd|    jƒ|    jƒ|    jƒ|    jƒfƒtd    ƒ‚qÖqÖWtjd
ƒdS( NsNPC Initing...FB %dtMapLineiiiis    hideNPCIDList=%ss@###NPC²ß»®Ìî±í´íÎó£¬NPC = %s , %s , Ë¢Ðµã = %sºÍÖØÉúµã = %s´íÎós ###NPC ²ß»®Ìî´í±íÀ­ s NPC Init OK!(RRRR$tGetCurGameWorldIndextLogtGetMaptGetMapIDt IpyGameDataPYtGetFuncEvalCfgtmaxt GetNPCManagert GetNPCCounttxranget GetNPCByIndexR!t
SetVisibletFalseR4tGetRefreshPosCounttGetPatrolPosCounttGetNamet    Exception(
RtgameWorldIndextmapIDt hideNPCIDListtactivityMapLineDicttactivityLineIDtgameNPCtnpcCounttiR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR3˜s0          $5 cCstjtƒ|ƒdS(N(RR2t__Func_NormalNPCAI(R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt NormalNPCAI½scCsÖtjƒ}g}xŸtd|jƒƒD]ˆ}|j|ƒ}|jƒdkrUq(n|jƒtjkr£tj    |ƒ}|dkr‹q(nt j |ƒr£q(q£n|j |ƒq(Wx|D]}t||ƒq»WdS(Ni(RR=trangetGetActiveNPCCounttGetActiveNPCByIndexRtGetGameNPCObjTypeRt
gnotSummont GetObjDetailRRt
IsGameBosstappendt ProcessNPCAI(RRLtnormal_NPC_ListtindexR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyROÇs        cCstjtƒ|ƒdS(N(RR2t__Func_BossSummonNPCAI(R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytBossSummonNPCAIöscCsktjƒ}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žtj|ƒ ržq.n|j ƒs°q.n|j |ƒq.Wx|D]}t ||ƒqÈWg}xQtd|jƒƒD]:}|j|ƒ}|jƒdkr(qûn|j |ƒqûWx|D]}t ||ƒq@Wt|||ƒdS(Ni(RR=RQtGetSummonNPCCounttGetSummonNPCAtRtGetTypeRtntElftGetOwnerRtIsAliveRXRYR$t GetTickByTypeRtTYPE_Map_Tick_BossAITicktTYPE_Map_Tick_Timet SetTickByTypeRWt GetBossCountt    GetBossAtt ProcessPetAI(RRLt gameElf_ListR[Rt    gameWorldtgameSummon_Listt gameBoss_List((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR\þsV    "   cCsÝ||jtjƒtjtjkr*dS|jtj|ƒg}xutd|jƒƒD]^}|j|ƒ}|jƒdkr†qYn|j    ƒs˜qYn|j
ƒsªqYn|j |ƒqYWx|D]}t ||ƒqÂWdS(Ni( RdRtTYPE_Map_Tick_PetAITickRfRgRQt GetPetCounttGetPetAtRt GetIsSummonRcRXRY(RlRLRt gamePet_ListR[tcurPet((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRjYs"   cCstjtƒ|ƒdS(N(RR2t__Func_NPCRefreshPoint(R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pytNPCRefreshPointscCsdS(N((R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRu‡scCsÑ|jtjƒrdS|jƒ}tjƒjtj|ƒ}|rŽ||krTdStjƒjtj|dƒtj    d|||fƒntj
t dt |ƒdfƒ}|dkrÀdS|||ƒdS(Nis1NPCÐã½áÊø£¬¿ªÊ¼´¦ÀíAI!npcID=%s,tick=%s,endTick=%ss AIType_%s.%st    ProcessAI(t GetDictByKeyRtDef_Obj_Dict_TurnFightPosInfoR!Rt    GetGameFBtGetGameFBDictByKeytDef_FBDict_NPCShowEndTickt SetGameFBDicttDebugLogR Rt    GetAINameR(RRtnpcIDtendTickR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRY‘s      "  cCs,|jƒtjtjgkr"dS|jƒS(NtPriWood(R`RtntPriWoodPilePVEtntPriWoodPilePVPR (R((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR²scCs9tjtd|jƒdfƒ}|r5|||ƒSdS(Ns AIType_%d.%st OnCollectEnd(RR RR (t    curPlayerRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyR…¿s" cCs||jƒ}|jƒtjkr%tStj|ƒtj|ƒdkrKtStj    |tj|ƒƒt
j d||ƒtS(Nis!²»ËÀbossѪÁ¿Îª0ÉèÖÃÂúѪ! npcID=%s( R!R`Rt    ntUndeathRBtGameObjtGetHPtGetMaxHPR1tSetHPRR~(RR€((saD:\SG_ServerCode\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(
RR~R=t FindNPCByIDt
SkillShelltNotifyNPCSkillWarnR RR R(RtobjIDRR((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyRÖs"  (#RRRRRttimetmathRˆRR*RR:t    ImportAllR
R RRR(R)R-R0R4R3RPROR]R\RjRvRuRYRR…RŒR(((saD:\SG_ServerCode\ServerPython\ZoneServerGroup\map1_8G\MapServer\MapServerData\Script\NPC\ChNPC.pyt<module> sF                                                               %    
    /        [    &        
    !