From 2338f83c84cbd1bd27ff4c2c0ca70151e34c05e4 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期四, 27 二月 2020 18:43:08 +0800
Subject: [PATCH] 8384 【主干】【后端】优化控制buff类对boss的影响

---
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py                |   12 ++++++++++++
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py                 |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/GameSkills/SkillCommon.py    |    2 +-
 ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Attack/AttackLogic/AttackCommon.py |    2 +-
 4 files changed, 15 insertions(+), 3 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 b6f3bb4..221053e 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
@@ -2086,7 +2086,7 @@
                            ChConfig.TriggerType_Buff_MustBeHit):
         # 技能对指定BOSS无效果的返回MISS
         if defObjType == IPY_GameWorld.gotNPC and defObj.GetIsBoss() not in ChConfig.Def_SkillAttack_NPCIsBoss \
-        and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss:
+        and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss and SkillShell.IsNPCSkillResist(defObj):
             return 0, ChConfig.Def_HurtType_Miss
         
         #攻击方处于嘲讽,防守方处于免疫嘲讽者攻击则miss
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
index cf93871..53f44f8 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/BuffSkill.py
@@ -49,7 +49,7 @@
         #GameWorld.DebugLog('聚魂副本对怪物上buff curSkill=%s,buffOwner=%s'%(curSkill.GetSkillTypeID(),buffOwner.GetID()))
         
     if curObj.GetGameObjType() == IPY_GameWorld.gotNPC and curObj.GetIsBoss() not in ChConfig.Def_SkillAttack_NPCIsBoss \
-    and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss:
+    and SkillCommon.GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss and SkillShell.IsNPCSkillResist(curObj):
         # 释放后 对指定BOSS无效的技能
         return True
     
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 2a9084b..3bdb2ae 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
@@ -1313,7 +1313,7 @@
     
     # 技能对指定BOSS无效果-----------------
     if curObjType == IPY_GameWorld.gotNPC and curObj.GetIsBoss() not in ChConfig.Def_SkillAttack_NPCIsBoss:
-        if curSkill and GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss:
+        if curSkill and GetSkillBattleType(curSkill) == ChConfig.Def_BattleRelationType_CommNoBoss and SkillShell.IsNPCSkillResist(curObj):
             return
     
     notifyLostValue = lostValue
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 6309be3..f143363 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -579,6 +579,18 @@
     
     return True
 
+def IsNPCSkillResist(curNPC):
+    ## NPC是否技能抵抗,对应技能表中伤害类型HurtType为3的技能,即对boss无效的技能
+    
+    if curNPC.GetCurAction() == IPY_GameWorld.laNPCSkillWarning:
+        #GameWorld.DebugLog("预警状态下默认抵抗")
+        return True
+    
+    bossIpyData = IpyGameDataPY.GetIpyGameDataNotLog("BOSSInfo", curNPC.GetNPCID())
+    if bossIpyData and bossIpyData.GetSkillResist():
+        return True
+    
+    return False
 
 ##是否召唤兽对主人使用技能
 # @param curNPC NPC实例

--
Gitblit v1.8.0