Jump to content

[fix] Spell aura 251 (SPELL_AURA_MOD_ENEMY_DODGE)


Recommended Posts

* What bug does the patch fix? What features does the patch add?

Implements spell aura 251, used by spells:

45769 Sunwell Radiance

46556 Enemy Dodge Test

48250 Risky Feint

* For which repository revision was the patch created?

9851

* Is there a thread in the bug report section or at lighthouse?

don't know

* Who has been writing this patch? Please include either forum user names or email addresses.

darkstalker

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index aebaf8a..48fb53d 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -301,7 +301,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
    &Aura::HandleNoImmediateEffect,                         //248 SPELL_AURA_MOD_COMBAT_RESULT_CHANCE         implemented in Unit::RollMeleeOutcomeAgainst
    &Aura::HandleAuraConvertRune,                           //249 SPELL_AURA_CONVERT_RUNE
    &Aura::HandleAuraModIncreaseHealth,                     //250 SPELL_AURA_MOD_INCREASE_HEALTH_2
-    &Aura::HandleNULL,                                      //251 SPELL_AURA_MOD_ENEMY_DODGE
+    &Aura::HandleNoImmediateEffect,                         //251 SPELL_AURA_MOD_ENEMY_DODGE                   implemented in Unit::RollMeleeOutcomeAgainst and Unit::MeleeSpellHitResult
    &Aura::HandleModCombatSpeedPct,                         //252 SPELL_AURA_SLOW_ALL
    &Aura::HandleNoImmediateEffect,                         //253 SPELL_AURA_MOD_BLOCK_CRIT_CHANCE             implemented in Unit::CalculateMeleeDamage
    &Aura::HandleNULL,                                      //254 SPELL_AURA_MOD_DISARM_SHIELD disarm Shield
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 98a55c2..cef67f4 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2475,6 +2475,9 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst (const Unit *pVictim, WeaponAttack
        // Modify dodge chance by attacker SPELL_AURA_MOD_COMBAT_RESULT_CHANCE
        dodge_chance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE);

+        // Modify dodge chance by attacker SPELL_AURA_MOD_ENEMY_DODGE
+        dodge_chance += GetTotalAuraModifier(SPELL_AURA_MOD_ENEMY_DODGE)*100;
+
        tmp = dodge_chance;
        if (   (tmp > 0)                                        // check if unit _can_ dodge
            && ((tmp -= skillBonus) > 0)
@@ -2840,6 +2843,8 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell)
        int32 dodgeChance = int32(pVictim->GetUnitDodgeChance()*100.0f) - skillDiff * 4;
        // Reduce enemy dodge chance by SPELL_AURA_MOD_COMBAT_RESULT_CHANCE
        dodgeChance+= GetTotalAuraModifierByMiscValue(SPELL_AURA_MOD_COMBAT_RESULT_CHANCE, VICTIMSTATE_DODGE)*100;
+        // Modify dodge chance by attacker SPELL_AURA_MOD_ENEMY_DODGE
+        dodgeChance += GetTotalAuraModifier(SPELL_AURA_MOD_ENEMY_DODGE)*100;
        // Reduce dodge chance by attacker expertise rating
        if (GetTypeId() == TYPEID_PLAYER)
            dodgeChance-=int32(((Player*)this)->GetExpertiseDodgeOrParryReduction(attType) * 100.0f);

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 1 year later...

Spells 48250 and 46556 are the only ones with positive basepoints, so they (and they alone) would _increase_ the dodge chance with your patch.

about 46556 it is not possible to say much, looks like a test-spell to me.

spell 48250 seems to be used ingame, but the overall dbc data looks crappy (in description use of basepoints of effect0 instead of proper effect2..)

Don't know what to make of this.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use