From da9cd08caad3ede2cf38735623ca362834ce5ac0 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 1 Jun 2022 13:54:41 -0400 Subject: [PATCH] Core/Spells: Implemented SPELL_ATTR5_IGNORE_AREA_EFFECT_PVP_CHECK Port From (https://github.com/TrinityCore/TrinityCore/commit/d71ca7a8f5aab79a7ee662dbc5632a0de7dede3f) --- Source/Framework/Constants/Spells/SpellConst.cs | 2 +- Source/Game/Entities/Object/WorldObject.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Framework/Constants/Spells/SpellConst.cs b/Source/Framework/Constants/Spells/SpellConst.cs index 5d4dfdc04..6b56fc929 100644 --- a/Source/Framework/Constants/Spells/SpellConst.cs +++ b/Source/Framework/Constants/Spells/SpellConst.cs @@ -1763,7 +1763,7 @@ namespace Framework.Constants AllowWhileStunned = 0x08, // Allow While Stunned TriggersChanneling = 0x10, // Triggers Channeling LimitN = 0x20, // Limit N Description Remove Previous Application To Another Unit If Applied - IgnoreAreaEffectPvpCheck = 0x40, /*Nyi*/ // Ignore Area Effect Pvp Check + IgnoreAreaEffectPvpCheck = 0x40, // Ignore Area Effect Pvp Check NotOnPlayer = 0x80, /*Nyi*/ // Not On Player NotOnPlayerControlledNpc = 0x100, /*Nyi*/ // Not On Player Controlled Npc ExtraInitialPeriod = 0x200, // Extra Initial Period Description Immediately Do Periodic Tick On Apply diff --git a/Source/Game/Entities/Object/WorldObject.cs b/Source/Game/Entities/Object/WorldObject.cs index a4d5a8c0d..94e04cc79 100644 --- a/Source/Game/Entities/Object/WorldObject.cs +++ b/Source/Game/Entities/Object/WorldObject.cs @@ -2641,7 +2641,7 @@ namespace Game.Entities // additional checks - only PvP case if (playerAffectingAttacker && playerAffectingTarget) { - if (playerAffectingTarget.IsPvP()) + if (playerAffectingTarget.IsPvP() || (bySpell != null && bySpell.HasAttribute(SpellAttr5.IgnoreAreaEffectPvpCheck))) return true; if (playerAffectingAttacker.IsFFAPvP() && playerAffectingTarget.IsFFAPvP())