From 7c48580fab636fbc0d59793431e4ac6a6f6ccc65 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 17 六月 2021 17:38:21 +0800
Subject: [PATCH] 8983 【港台】【BT2】【港台-1.100.7】【BT2-1.100.1】循环相关的活动配置优化(修复循环结束日当日无法开启活动bug)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_20.py |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 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 1541e78..b15c5d7 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
@@ -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):

--
Gitblit v1.8.0