From 9684c4b7c4fdad50a85e506207239ac89545d06c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 20 五月 2021 18:22:45 +0800
Subject: [PATCH] 5071 【BT2】【主干】【gt_1.100.6】外网出现boss无法死亡。(添加死亡检查日志明细)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
index dc86d02..2ecf2b6 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCCommon.py
@@ -5208,7 +5208,7 @@
     
     ##----------------------------------------- 归属 -----------------------------------------------
     
-    def RefreshDropOwner(self, tick, refreshInterval=3000, isDead=False):
+    def RefreshDropOwner(self, tick, refreshInterval=3000, isDead=False, checkCanDead=False):
         ## 刷新boss掉落归属
         # @return: 可攻击的掉落归属目标玩家
         
@@ -5219,8 +5219,11 @@
         if isDead:
             GameWorld.Log("Boss死亡: lineID=%s,objID=%s,npcID=%s,dropOwnerType=%s" 
                           % (GameWorld.GetGameWorld().GetLineID(), curNPC.GetID(), curNPC.GetNPCID(), dropOwnerType))
+        if checkCanDead:
+            GameWorld.Log("检查Boss死亡: lineID=%s,objID=%s,npcID=%s,dropOwnerType=%s" 
+                          % (GameWorld.GetGameWorld().GetLineID(), curNPC.GetID(), curNPC.GetNPCID(), dropOwnerType))
         #if dropOwnerType == ChConfig.DropOwnerType_MaxHurt:
-        maxHurtInfo = NPCHurtManager.RefreshHurtList(curNPC, tick, refreshInterval, isDead)
+        maxHurtInfo = NPCHurtManager.RefreshHurtList(curNPC, tick, refreshInterval, isDead, checkCanDead)
         if not maxHurtInfo:
             maxHurtInfo = NPCHurtMgr.RefreshHurtList(curNPC, tick, refreshInterval, isDead)
             
@@ -5238,7 +5241,7 @@
             if tagObj:
                 ownerType, ownerID = ChConfig.Def_NPCHurtTypePlayer, tagObj.GetPlayerID()
                 
-        if isDead:
+        if isDead or checkCanDead:
             GameWorld.Log("ownerType=%s, ownerID=%s, tagObjID=%s" % (ownerType, ownerID, 0 if not tagObj else tagObj.GetPlayerID()))
                 
         # 没有攻击目标,则刷新仇恨,支持主动怪
@@ -5251,6 +5254,8 @@
                 angryObjType = maxAngry.GetObjType()
                 #GameWorld.DebugLog("最大仇恨目标: ID=%s, Type=%s" % (angryID, angryObjType))
                 maxAngryObj = GameWorld.GetObj(angryID, angryObjType)
+                if isDead or checkCanDead:
+                    GameWorld.Log("最大仇恨目标: ID=%s, Type=%s,maxAngryObj=%s" % (angryID, angryObjType, maxAngryObj))
                 
             tagObj = maxAngryObj
             if angryObjType == IPY_GameWorld.gotPlayer and maxAngryObj and not ownerType:
@@ -5261,7 +5266,7 @@
                 else:
                     ownerType, ownerID = ChConfig.Def_NPCHurtTypePlayer, maxAngryObj.GetPlayerID()
             
-            if isDead:
+            if isDead or checkCanDead:
                 GameWorld.Log("angryObj, ownerType=%s, ownerID=%s" % (ownerType, ownerID))
                 
         self.UpdateDropOwner(tick, ownerType, ownerID, isDead)

--
Gitblit v1.8.0