From 5a5c81a1284cf22d38fc7c61239caf5b7f6815cd Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 27 十一月 2018 14:53:11 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/SnxxServerCode

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py
index 2090645..ba01927 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py
@@ -25,6 +25,7 @@
 import BaseAttack
 import FBCommon
 import AICommon
+import GameMap
 
 import random
 
@@ -76,8 +77,8 @@
         #GameWorld.DebugLog("没有攻击目标,跟随玩家!objID=%s" % curNPC.GetID())
         dist = GameWorld.GetDist(fbPlayer.GetPosX(), fbPlayer.GetPosY(), curNPC.GetPosX(), curNPC.GetPosY())
         if dist > 12:
-            posX, posY = npcControl.GetMoveNearPos(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
-            curNPC.ResetPos(posX, posY)
+            resultPos = GameMap.GetEmptyPlaceInArea(fbPlayer.GetPosX(), fbPlayer.GetPosY(), 3)
+            curNPC.ResetPos(resultPos.GetPosX(), resultPos.GetPosY())
         elif dist > 5:
             npcControl.MoveToObj_Detel(fbPlayer, 5)
         return
@@ -92,9 +93,9 @@
         return
     tagDist = GameWorld.GetDist(curNPC.GetPosX(), curNPC.GetPosY(), curTag.GetPosX(), curTag.GetPosY())
     GameWorld.DebugLog("    与目标距离: %s" % tagDist)
-    if tagDist > 12:
-        posX, posY = npcControl.GetMoveNearPos(curTag.GetPosX(), curTag.GetPosY(), 3)
-        curNPC.ResetPos(posX, posY)
+    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())
         
     #---优先释放技能---

--
Gitblit v1.8.0