aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 68521f8f215..57d38054df2 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2289,7 +2289,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
// Dodge chance
// only players can't dodge if attacker is behind
- if (pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->HasInArc(M_PI,this))
+ if (pVictim->GetTypeId() == TYPEID_PLAYER && !pVictim->HasInArc(M_PI,this) && !pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
DEBUG_LOG ("RollMeleeOutcomeAgainst: attack came from behind and victim was a player.");
}
@@ -2316,7 +2316,7 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
// parry & block chances
// check if attack comes from behind, nobody can parry or block if attacker is behind
- if (!pVictim->HasInArc(M_PI,this))
+ if (!pVictim->HasInArc(M_PI,this) && !pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
DEBUG_LOG ("RollMeleeOutcomeAgainst: attack came from behind.");
}
@@ -2497,7 +2497,7 @@ void Unit::SendMeleeAttackStop(Unit* victim)
bool Unit::isSpellBlocked(Unit *pVictim, SpellEntry const * /*spellProto*/, WeaponAttackType attackType)
{
- if (pVictim->HasInArc(M_PI,this))
+ if (pVictim->HasInArc(M_PI,this) || pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
/* Currently not exist spells with ignore block
// Ignore combat result aura (parry/dodge check on prepare)
@@ -2660,7 +2660,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
if (attType == RANGED_ATTACK)
{
// only if in front
- if (pVictim->HasInArc(M_PI,this))
+ if (pVictim->HasInArc(M_PI,this) || pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS)*100;
tmp+=deflect_chance;
@@ -2671,7 +2671,7 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
}
// Check for attack from behind
- if (!pVictim->HasInArc(M_PI,this))
+ if (!pVictim->HasInArc(M_PI,this) && !pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
// Can`t dodge from behind in PvP (but its possible in PvE)
if (pVictim->GetTypeId() == TYPEID_PLAYER)
@@ -2813,7 +2813,7 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit *pVictim, SpellEntry const *spell)
return SPELL_MISS_RESIST;
// cast by caster in front of victim
- if (pVictim->HasInArc(M_PI,this))
+ if (pVictim->HasInArc(M_PI,this) || pVictim->HasAuraType(SPELL_AURA_IGNORE_HIT_DIRECTION))
{
int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS)*100;
tmp+=deflect_chance;