hxp
2019-12-10 43e5e84170e91ca2bc4c26d289a8bc5a891d06d0
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py
@@ -19,6 +19,7 @@
import NPCCommon
import GameWorld
import GameMap
import ChConfig
##AI逻辑处理
@@ -36,7 +37,13 @@
    #刷新自己的Buff
    npcControl.RefreshBuffState(tick)
    
    owner = NPCCommon.GetNpcObjOwnerDetail(curNPC)
    summonPlayerID = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_PriWoodPilePlayerID)
    if not summonPlayerID:
        return
    owner = GameWorld.GetObj(summonPlayerID, IPY_GameWorld.gotPlayer)
    if not owner:
        return
    if GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), owner.GetPosX(), owner.GetPosY()) > 3:
        resetPos = GameMap.GetEmptyPlaceInArea(owner.GetPosX(), owner.GetPosY(), 2)
        curNPC.ResetPos(resetPos.GetPosX(), resetPos.GetPosY())