fix(Core/Spells): Allow spells with SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET attribute to go through deterrence. (#11644)

* Update settings.json

* Revert "Update settings.json"

This reverts commit 1f6724477db4cff361c800b858d3bc1a6d11d6bb.

* detter
This commit is contained in:
avarishd
2022-05-09 00:19:39 +03:00
committed by GitHub
parent 9144cab27d
commit 4ce3515c60

View File

@@ -2946,7 +2946,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo
// Check for attack from behind
// xinef: if from behind or spell requires cast from behind
if (!victim->HasInArc(M_PI, this) || spellInfo->HasAttribute(SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET))
if (!victim->HasInArc(M_PI, this))
{
if (!victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
@@ -2957,6 +2957,11 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo
canParry = false;
canBlock = false;
}
else // Only deterrence as of 3.3.5
{
if (spellInfo->HasAttribute(SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET))
canParry = false;
}
}
// Check creatures flags_extra for disable parry