fix(Core/Spells): Spells requires cast from behind victim bypass Dete… (#13499)

fix(Core/Spells): Spells requires cast from behind victim bypass Deterrence.

Fixes #13212
This commit is contained in:
UltraNix
2022-10-29 12:18:27 +02:00
committed by GitHub
parent 74a6127bd7
commit 330d45bda8

View File

@@ -3155,20 +3155,18 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo
// xinef: if from behind or spell requires cast from behind
if (!victim->HasInArc(M_PI, this))
{
if (!victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
if (!victim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION) || spellInfo->HasAttribute(SPELL_ATTR0_CU_REQ_CASTER_BEHIND_TARGET))
{
// Can`t dodge from behind in PvP (but its possible in PvE)
if (victim->GetTypeId() == TYPEID_PLAYER)
{
canDodge = false;
}
// Can`t parry or block
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