mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
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:
@@ -3155,20 +3155,18 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit* victim, SpellInfo const* spellInfo
|
|||||||
// xinef: if from behind or spell requires cast from behind
|
// xinef: if from behind or spell requires cast from behind
|
||||||
if (!victim->HasInArc(M_PI, this))
|
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)
|
// Can`t dodge from behind in PvP (but its possible in PvE)
|
||||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||||
|
{
|
||||||
canDodge = false;
|
canDodge = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Can`t parry or block
|
// Can`t parry or block
|
||||||
canParry = false;
|
canParry = false;
|
||||||
canBlock = 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
|
// Check creatures flags_extra for disable parry
|
||||||
|
|||||||
Reference in New Issue
Block a user