From 31f23f47e183bc9ea886af369b4b4e1f290a6b1c Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期一, 22 十一月 2021 17:04:29 +0800
Subject: [PATCH] 9367 【BT5】【主干】战力压制拓展到21亿以上(主干冲突)

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
index c29d622..2adbd59 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py
@@ -892,6 +892,7 @@
 
 def CheckKillNPCByCnt(attacker, defender, isNotify=True):
     ''' 判断当日击杀该NPC次数是否已满 '''
+    # 函数命名问题,实际上此函数为检查可否攻击boss
     if defender.GetGameObjType() != IPY_GameWorld.gotNPC:
         #GameWorld.DebugLog("只判断被攻击的是NPC的情况")
         return True
@@ -928,6 +929,16 @@
                 sysMark = IpyGameDataPY.GetFuncEvalCfg('KillBossCntLimit', 3, {}).get(index, '')
                 PlayerControl.NotifyCode(atkPlayer, sysMark)
         return False
+    
+    npcDataEx = NPCCommon.GetNPCDataEx(npcID)
+    if npcDataEx and npcDataEx.GetFightPowerLackAtkLimit():
+        if npcDataEx.GetSuppressFightPower() > PlayerControl.GetFightPower(atkPlayer):
+            if isNotify:
+                PlayerControl.NotifyCode(atkPlayer, "BossFightPowerHint") 
+            #GameWorld.DebugLog("战力不足,无法攻击boss! npcID=%s,SuppressFightPower=%s > playerFightPower=%s" 
+            #                   % (npcID, npcDataEx.GetSuppressFightPower(), PlayerControl.GetFightPower(atkPlayer)))               
+            return False
+        
     return True
 
 

--
Gitblit v1.8.0