Jump to content

Deterrence


Guest przemratajczak

Recommended Posts

MaNGOS 9046

UDB 386

SD2: 1520

Bug:

Spell Deterrence has old "in front" requirement. Since 3.2.0 this condition was removed

HowToReproduce:

1) Create hunter and learn him spell 19263

2) Find NPC with equal lvl

3) prepare macro for shot spell (or find npc with ranged skill) .cast back 8995

4) cast Deterrence and use macro

if you will be faceing npc than shot will miss, else shot will get you

HowItShouldWork:

Despite of Orientation you should be able to avoid shot

proposed fix:

I'm c++ begginer and don't know MaNGOS structure enough, but found check for ranged melee attacks that prevents Deterrence from deflecting. Adding exeption restore functionality.

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index dc2e436..f1a4755 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2694,8 +2694,8 @@ SpellMissInfo Unit::MeleeSpellHitResult(Unit *pVictim, SpellEntry const *spell,
    // Ranged attack cannot be parry/dodge only deflect
    if (attType == RANGED_ATTACK)
    {
-        // only if in front
-        if (pVictim->HasInArc(M_PI,this))
+        // only if in front except Deterrence
+        if (pVictim->HasInArc(M_PI,this) || (spell->Attributes == 327696 && spell->AttributesEx & SPELL_ATTR_EX_UNK4))
        {
            int32 deflect_chance = pVictim->GetTotalAuraModifier(SPELL_AURA_DEFLECT_SPELLS)*100;
            tmp+=deflect_chance;

Also spell->Attributes == 327696 && spell->AttributesEx & SPELL_ATTR_EX_UNK4 has Bladestorm and Whirlwind that should also affect all surrounding targets. Maybe more generic fix is needed.

Link to comment
Share on other sites

  • 4 months later...

UDB 0.12.0 (390) for MaNGOS 9903 with SD2 SQL for rev. 1683.

Deterrance (http://www.wowhead.com/spell=19263)

"When activated, increases parry chance by 100%, reduces the chance ranged attacks will hit you by 100% and grants a 100% chance to deflect spells. While Deterrence is active, you cannot attack. Lasts 5 sec."

Effect #1 - Apply Aura: Mod Parry Percent - its OK

Effect #2 - Apply Aura: Spell Deflection % - Does not work.

Detterance at now have 1,5min Cooldown, but should be have 1min(http://www.wowwiki.com/Deterrence)

"Patch 3.0.8 (2009-01-20): Design changed to grant 100% parry and 100% chance to "deflect" spells coming from the front, but prevents the Hunter from attacking. Lasts 5 sec. 60 sec. cooldown. "

At now Detterance, parry only attack malee and ranged, but don't parry spell's.

"This ability now allows the hunter to parry spells and attacks from behind as well as in front. Now has a new visual spell effect. "

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