diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellAuras.cpp | 4 | ||||
-rw-r--r-- | src/game/Unit.cpp | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 82a907feb86..f42809d0290 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -341,8 +341,8 @@ pAuraHandler AuraHandler[TOTAL_AURAS]= &Aura::HandleAuraModAttackPowerOfArmor, //285 SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR implemented in Player::UpdateAttackPowerAndDamage &Aura::HandleNoImmediateEffect, //286 SPELL_AURA_ABILITY_PERIODIC_CRIT implemented in AuraEffect::PeriodicTick &Aura::HandleNoImmediateEffect, //287 SPELL_AURA_DEFLECT_SPELLS implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult - &Aura::HandleUnused, //288 unused - &Aura::HandleUnused, //289 unused + &Aura::HandleNoImmediateEffect, //288 SPELL_AURA_IGNORE_HIT_DIRECTION implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult Unit::RollMeleeOutcomeAgainst + &Aura::HandleNULL, //289 unused &Aura::HandleAuraModCritPct, //290 SPELL_AURA_MOD_CRIT_PCT &Aura::HandleNoImmediateEffect, //291 SPELL_AURA_MOD_XP_QUEST_PCT implemented in Player::RewardQuest &Aura::HandleNULL, //292 call stabled pet 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; |