xdh
2019-06-19 0c5b2ef1c91daf9b52555b36a8e06cda7a770614
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py
@@ -94,10 +94,20 @@
        return
    tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
    GameWorld.DebugLog("    与目标距离: %s" % tagDist)
    if tagDist > 20:
        resultPos = GameMap.GetEmptyPlaceInArea(curTag.GetPosX(), curTag.GetPosY(), 3)
        curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
        tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
#    if tagDist > 20:
#        resultPos = GameMap.GetEmptyPlaceInArea(curTag.GetPosX(), curTag.GetPosY(), 3)
#        curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
#        tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
    delayTick = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_AtkDelayTick)
    if delayTick:
        startAtkTick = curNPC.GetDictByKey(ChConfig.Def_NPC_Dict_AtkStartTick)
        if not startAtkTick:
            curNPC.SetDict(ChConfig.Def_NPC_Dict_AtkStartTick, tick)
            startAtkTick = tick
        if tick - startAtkTick < delayTick:
            GameWorld.DebugLog("未到攻击时间,暂不处理!objID=%s" % curNPC.GetID())
            return
        
    #---优先释放技能---
    if AICommon.DoAutoUseSkill(curNPC, curTag, tagDist, tick):