From 6a8c2b3a073409ee503eec2a4a12d2ccca96791c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 03 六月 2019 15:09:42 +0800
Subject: [PATCH] 3891 【BUG】【2.0】封魔坛没有勾选双倍挑战,伤害排行第一时给了2个经验丹

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py
index 8dcbc23..d891106 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCAI/AIType_PriWood.py
+++ b/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())

--
Gitblit v1.8.0