From cdfd24c0aee76c7819c42d30267f0db305523ffc Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 14 九月 2021 19:11:42 +0800
Subject: [PATCH] 5071 【主干】【gt_1.101.1】【BT3】【bt3_1.101.1】外网出现boss无法死亡(修复boss伤血缓存对象异常导致坐标错误引起的无法死亡)
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
index 39b1ea1..29046dd 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
@@ -1051,6 +1051,14 @@
hurtList = PyGameData.g_npcHurtDict.pop(key)
hurtList.OnDelete()
return
+ curNPC = defendHurtList.curNPC
+ npcID = curNPC.GetNPCID()
+ if defendHurtList.npcID != npcID:
+ repNPC = GameWorld.FindNPCByID(defendHurtList.objID)
+ if repNPC:
+ defendHurtList.curNPC = repNPC
+ GameWorld.Log("Boss伤血管理curNPC异常,修复: npcID=%s,errNPCID=%s,repNPCID=%s" % (defendHurtList.npcID, npcID, defendHurtList.npcID))
+
return defendHurtList
def OnNPCHurtPlayerEnterTeam(playerID, playerName, befTeamID, newTeam, tick):
--
Gitblit v1.8.0