From 7344dece640c323185db18976dc61a2467d794b0 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 07 一月 2025 17:54:47 +0800
Subject: [PATCH] 10289 【越南】【英语】【砍树】【BT】运势-服务端(A801增加领取累计寻宝次数奖励事件名通知 TreasureCntAward)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
index fbca2a5..9061ee1 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/NPC/NPCHurtMgr.py
@@ -23,6 +23,7 @@
 import IPY_GameWorld
 import IpyGameDataPY
 import PlayerBossReborn
+import PlayerActHorsePetFeast
 import ChPyNetSendPack
 import NetPackCommon
 import ShareDefine
@@ -147,7 +148,7 @@
         #GameWorld.DebugLog("    hurtID=%s,hurtType=%s,updValue=%s (%s + %s), playerID=%s,updHurtPlayerValue=%s" 
         #                   % (hurtID, hurtType, updValue, befValue, addValue, playerID, updHurtPlayerValue), self.npcID, self.lineID)
         if isNewHurt:
-            self.__Sort()
+            self.Sort()
             
         return isNewHurt
     
@@ -159,7 +160,7 @@
             return 0
         return -1
     
-    def __Sort(self):
+    def Sort(self):
         ## 伤血排序
         self.__hurtSortList = sorted(self.__hurtDict.values(), cmp=self.__CmpHurtValue, reverse=True)
         return
@@ -183,6 +184,8 @@
             hurtValueObj.HurtValue = hurtValue % ShareDefine.Def_PerPointValue
             hurtValueObj.HurtValueEx = hurtValue / ShareDefine.Def_PerPointValue
             hurtValueList.append(hurtValueObj)
+            if len(hurtValueList) > 250:
+                break
             
         if not syncPlayerIDList:
             return
@@ -222,7 +225,7 @@
             self.checkHurtValidFunc()
             
         # 2. 排序
-        self.__Sort()
+        self.Sort()
         
         # 3. 同步前端
         self.__SyncHurtList()
@@ -238,7 +241,7 @@
         '''第一个可攻击的最大伤血对象
         @return: atkPlayer, hurtType, hurtID
         '''
-        
+        import AttackCommon
         atkPlayer, atkHurtType, atkHurtID = None, 0, 0
         curNPC = self.curNPC
         refreshPoint = curNPC.GetRefreshPosAt(curNPC.GetCurRefreshPointIndex())
@@ -261,7 +264,7 @@
                     playerDisableReason[playerID] = "dead"
                     continue
                 
-                if not player.GetVisible() or player.GetSightLevel() != curNPC.GetSightLevel():
+                if not player.GetVisible() or not AttackCommon.CheckSightLevel(player, curNPC):
                     playerDisableReason[playerID] = "no visible or sightLevel different"
                     continue
                 
@@ -356,6 +359,8 @@
         if self.npcID == IpyGameDataPY.GetFuncCfg("BossRebornServerBoss", 3):
             PlayerBossReborn.DoBossRebornActionBossOnKilledLogic(self)
             
+        PlayerActHorsePetFeast.DoActBossOnKilledLogic(self)
+        
         ## 同样榜单逻辑的不同功能奖励处理 ...
         
         return

--
Gitblit v1.8.0