From ddb5f583630a60ef683abb4df6eb7d9fcfa6e088 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 26 六月 2019 10:46:34 +0800
Subject: [PATCH] 860312 防范部分扣血逻辑会对高境界BOSS造成大于1的伤害

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
index b3cc67c..c176c7c 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py
@@ -1249,6 +1249,8 @@
     curObjType = curObj.GetGameObjType()
     curSkill = GameWorld.GetGameData().FindSkillByType(skillTypeID, 1)
     
+    atkObjType = buffOwner.GetGameObjType() if buffOwner else -1
+    
     # 技能对指定BOSS无效果-----------------
     if curObjType == IPY_GameWorld.gotNPC and curObj.GetIsBoss() not in ChConfig.Def_SkillAttack_NPCIsBoss:
         if curSkill and GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss:
@@ -1259,6 +1261,12 @@
     if curObjHP_BeforeAttack == 0:
         # 没有血量不能再触发
         return
+    
+    if buffOwner:
+        aRealmLV, dRealmLV = AttackCommon.GetPVERealmLVs(buffOwner, curObj, atkObjType, curObjType) # 获取境界
+        if curObjType == IPY_GameWorld.gotNPC and ChConfig.IsGameBoss(curObj) and dRealmLV > aRealmLV:
+            # 攻击高境界的BOSS 伤害固定为1
+            lostValue = 1
     
     if skillAffect:
         lostValue = AttackCommon.CalcHurtHPWithBuff(buffOwner, curObj, lostValue, curSkill, tick)
@@ -1310,7 +1318,7 @@
         attackerOwner = None
         
         #---根据BUFF主人类型决定是否给攻击者主人仇恨---
-        if buffOwner.GetGameObjType() == IPY_GameWorld.gotNPC:
+        if atkObjType == IPY_GameWorld.gotNPC:
             attackerOwner = NPCCommon.GetNpcObjOwnerDetail(buffOwner)
 
         #添加仇恨
@@ -1324,7 +1332,7 @@
                 curNPCControl.AddObjToAngryList(attackerOwner, 1)
     
     # 加伤血
-    if buffOwner.GetGameObjType() == IPY_GameWorld.gotNPC:
+    if atkObjType == IPY_GameWorld.gotNPC:
         attackerOwner = NPCCommon.GetNpcObjOwnerDetail(buffOwner)
     else:
         attackerOwner = buffOwner

--
Gitblit v1.8.0