From 62dfcf83db26f64cd5a46691d4755073473d2ff3 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 15 九月 2020 15:37:39 +0800
Subject: [PATCH] 1111 【主干】【长尾】【BT】防范boss伤血列表找不到boss实例导致报错;

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py |    4 ++++
 1 files changed, 4 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 73a3458..9eae451 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtManager.py
@@ -975,6 +975,10 @@
         defendHurtList = PlayerHurtList(lineID, objID, npcID)
         PyGameData.g_npcHurtDict[key] = defendHurtList
     defendHurtList = PyGameData.g_npcHurtDict[key]
+    if not defendHurtList.curNPC:
+        hurtList = PyGameData.g_npcHurtDict.pop(key)
+        hurtList.OnDelete()
+        return
     return defendHurtList
 
 def OnNPCHurtPlayerEnterTeam(playerID, playerName, befTeamID, newTeam, tick):

--
Gitblit v1.8.0