Diminishing Return

Some work done on diminishing returns, especially on groups witch were wrong, charge and scatter shot has its own groups now.

Will also fix diminishing for spells such as Wyvern Sting, freezing trap, turn evil, psychic horror (horror effect shared with Death Coil), Dragon’s Breath and also some pet stuns.

Data is taken from Elitist Jerks, Arena Junkies and addons tracking diminishing return timers.

diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index eff6f5b…e56b665 100755
— a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12850,8 +12850,9 @@ DiminishingLevels Unit::GetDiminishing(DiminishingGroup group)
if (!i->hitTime)
return DIMINISHING_LEVEL_1;

  •    // 16 - 20 seconds sometimes, though under unknown conditions
       // If last spell was casted more than 15 seconds ago - reset the count.
    
  •    if (i->stack == 0 && getMSTimeDiff(i->hitTime,getMSTime()) > 15000)
    
  •    if (i->stack == 0 && getMSTimeDiff(i->hitTime, getMSTime()) > 15000)
       {
           i->hitCount = DIMINISHING_LEVEL_1;
           return DIMINISHING_LEVEL_1;
    

diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 6e2e338…b5d0f93 100755
— a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -2674,31 +2674,28 @@ enum DiminishingReturnsType
DRTYPE_ALL = 2 // this spell is diminished in every case
};

-// Diminishing Return Groups
enum DiminishingGroup
{

  • // Common Groups
  • DIMINISHING_NONE = 0,
  • DIMINISHING_CONTROL_STUN, // Player Controlled stuns
  • DIMINISHING_TRIGGER_STUN, // By aura proced stuns, usualy chance on hit talents
  • DIMINISHING_CONTROL_ROOT, // Immobilizing effects from casted spells
  • DIMINISHING_TRIGGER_ROOT, // Immobilizing effects from triggered spells like Frostbite
  • DIMINISHING_CHARM,
  • DIMINISHING_POLYMORPH, // Also: Gouge, Sap, Repentance, Hungering Cold
  • DIMINISHING_KNOCKOUT, // Sap, Knockout mechanics
  • DIMINISHING_FEAR_BLIND, // Intimidating Shout, Howl of Terror, Blind
  • // Warlock Specific
  • DIMINISHING_DEATHCOIL, // Death Coil Diminish only with another Death Coil
  • // Druid Specific
  • DIMINISHING_CYCLONE, // From 2.3.0
  • // Shared Class Specific
  • DIMINISHING_CHEAPSHOT_POUNCE,
  • DIMINISHING_DISARM, // From 2.3.0
  • DIMINISHING_SILENCE, // From 2.3.0
  • DIMINISHING_FREEZE_SLEEP, // Hunter’s Freezing Trap
  • DIMINISHING_BANISH,
  • DIMINISHING_TAUNT,
  • DIMINISHING_LIMITONLY // Don’t Diminish, but limit duration to 10s
  • DIMINISHING_NONE = 0,
  • DIMINISHING_BANISH = 1,
  • DIMINISHING_CHARGE = 2,
  • DIMINISHING_OPENING_STUN = 3, // Cheap Shot and Pounce
  • DIMINISHING_CONTROLLED_STUN = 4,
  • DIMINISHING_CONTROLLED_ROOT = 5,
  • DIMINISHING_CYCLONE = 6,
  • DIMINISHING_DISARM = 7,
  • DIMINISHING_DISORIENT = 8,
  • DIMINISHING_ENTRAPMENT = 9,
  • DIMINISHING_FEAR = 10,
  • DIMINISHING_HORROR = 11,
  • DIMINISHING_MIND_CONTROL = 12,
  • DIMINISHING_ROOT = 13,
  • DIMINISHING_STUN = 14,
  • DIMINISHING_SCATTER_SHOT = 15,
  • DIMINISHING_SILENCE = 16,
  • DIMINISHING_SLEEP = 17,
  • DIMINISHING_TAUNT = 18,
  • DIMINISHING_LIMITONLY = 19 // No diminishing return, but duration limited to 10 seconds
    };

enum SummonCategory
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index a344f58…f26fce8 100755
— a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2782,77 +2782,123 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
if (IsPositiveSpell(spellproto->Id))
return DIMINISHING_NONE;

  • for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
  • {
  •    if (spellproto->EffectApplyAuraName[i] == SPELL_AURA_MOD_TAUNT)
    
  •        return DIMINISHING_TAUNT;
    
  • }
  • // Explicit Diminishing Groups
    switch (spellproto->SpellFamilyName)
    {
    // Event spells
    case SPELLFAMILY_UNK1:
    return DIMINISHING_NONE;
  •    case SPELLFAMILY_GENERIC:
    
  •        // some generic arena related spells have by some strange reason MECHANIC_TURN
    
  •        if  (spellproto->Mechanic == MECHANIC_TURN)
    
  •            return DIMINISHING_NONE;
    
  •    case SPELLFAMILY_DEATHKNIGHT:
    
  •    {
    
  •        // Hungering Cold (no flags)
    
  •        if (spellproto->SpellIconID == 2797)
    
  •            return DIMINISHING_DISORIENT;
    
  •        // Mark of Blood
    
  •        else if ((spellproto->SpellFamilyFlags[0] & 0x10000000) && spellproto->SpellIconID == 2285)
    
  •            return DIMINISHING_LIMITONLY;
           break;
    
  •    case SPELLFAMILY_MAGE:
    
  •    }
    
  •    case SPELLFAMILY_DRUID:
       {
    
  •        // Frostbite
    
  •        if (spellproto->SpellFamilyFlags[1] & 0x80000000)
    
  •            return DIMINISHING_TRIGGER_ROOT;
    
  •        //Shattered Barrier: only flag SpellFamilyFlags[0] = 0x00080000 shared
    
  •        //by most frost spells, using id instead
    
  •        if (spellproto->Id == 55080)
    
  •            return DIMINISHING_TRIGGER_ROOT;
    
  •        // Frost Nova / Freeze (Water Elemental)
    
  •        if (spellproto->SpellIconID == 193)
    
  •            return DIMINISHING_CONTROL_ROOT;
    
  •        // Pounce
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x20000)
    
  •            return DIMINISHING_OPENING_STUN;
    
  •        // Cyclone
    
  •        else if (spellproto->SpellFamilyFlags[1] & 0x20)
    
  •            return DIMINISHING_CYCLONE;
    
  •        // Entangling Roots
    
  •        // Nature's Grasp
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x00000200)
    
  •            return DIMINISHING_CONTROLLED_ROOT;
    
  •        // Faerie Fire
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x400)
    
  •            return DIMINISHING_LIMITONLY;
    
  •        break;
    
  •    }
    
  •    case SPELLFAMILY_HUNTER:
    
  •    {
    
  •        // Hunter's mark
    
  •        if ((spellproto->SpellFamilyFlags[0] & 0x400) && spellproto->SpellIconID == 538)
    
  •            return DIMINISHING_LIMITONLY;
    
  •        // Scatter Shot (own diminishing)
    
  •        else if ((spellproto->SpellFamilyFlags[0] & 0x40000) && spellproto->SpellIconID == 132)
    
  •            return DIMINISHING_SCATTER_SHOT;
    
  •        // Entrapment (own diminishing)
    
  •        else if ((spellproto->SpellVisual[0] == 7484) && spellproto->SpellIconID == 20)
    
  •            return DIMINISHING_ENTRAPMENT;
    
  •        // Wyvern Sting mechanic is MECHANIC_SLEEP but the diminishing is DIMINISHING_DISORIENT
    
  •        else if ((spellproto->SpellFamilyFlags[1] & 0x1000) && spellproto->SpellIconID == 1721)
    
  •            return DIMINISHING_DISORIENT;
    
  •        // Freezing Arrow
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x8)
    
  •            return DIMINISHING_DISORIENT;
    
  •        break;
    
  •    }
    
  •    case SPELLFAMILY_PALADIN:
    
  •    {
    
  •        // Turn Evil
    
  •        if ((spellproto->SpellFamilyFlags[1] & 0x804000) && spellproto->SpellIconID == 309)
    
  •            return DIMINISHING_FEAR;
    
  •    }
    
  •    case SPELLFAMILY_PRIEST:
    
  •    {
    
  •        // Psychic Horror
    
  •        if (spellproto->SpellFamilyFlags[2] & 0x2000)
    
  •            return DIMINISHING_HORROR;
           break;
       }
       case SPELLFAMILY_ROGUE:
       {
    
  •        // Sap 0x80 Gouge 0x8
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x88)
    
  •            return DIMINISHING_POLYMORPH;
    
  •        // Gouge
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x8)
    
  •            return DIMINISHING_DISORIENT;
           // Blind
           else if (spellproto->SpellFamilyFlags[0] & 0x1000000)
    
  •            return DIMINISHING_FEAR_BLIND;
    
  •            return DIMINISHING_FEAR;
           // Cheap Shot
           else if (spellproto->SpellFamilyFlags[0] & 0x400)
    
  •            return DIMINISHING_CHEAPSHOT_POUNCE;
    
  •            return DIMINISHING_OPENING_STUN;
           // Crippling poison - Limit to 10 seconds in PvP (No SpellFamilyFlags)
           else if (spellproto->SpellIconID == 163)
               return DIMINISHING_LIMITONLY;
           break;
       }
    
  •    case SPELLFAMILY_MAGE:
    
  •    {
    
  •        // Frostbite
    
  •        if (spellproto->SpellFamilyFlags[1] & 0x80000000)
    
  •            return DIMINISHING_ROOT;
    
  •        // Shattered Barrier
    
  •        else if (spellproto->SpellVisual[0] == 12297)
    
  •            return DIMINISHING_ROOT;
    
  •        // Deep Freeze
    
  •        else if (spellproto->SpellIconID == 2939 && spellproto->SpellVisual[0] == 9963)
    
  •            return DIMINISHING_CONTROLLED_STUN;
    
  •        // Frost Nova / Freeze (Water Elemental)
    
  •        else if (spellproto->SpellIconID == 193)
    
  •            return DIMINISHING_CONTROLLED_ROOT;
    
  •        // Dragon's Breath
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x800000)
    
  •            return DIMINISHING_DISORIENT;
    
  •        break;
    
  •    }
       case SPELLFAMILY_WARLOCK:
       {
           // Death Coil
           if (spellproto->SpellFamilyFlags[0] & 0x80000)
    
  •            return DIMINISHING_DEATHCOIL;
    
  •            return DIMINISHING_HORROR;
           // Curses/etc
           else if (spellproto->SpellFamilyFlags[0] & 0x80000000)
               return DIMINISHING_LIMITONLY;
    
  •        // Howl of Terror
    
  •        else if (spellproto->SpellFamilyFlags[1] & 0x8)
    
  •            return DIMINISHING_FEAR_BLIND;
           // Seduction
           else if (spellproto->SpellFamilyFlags[1] & 0x10000000)
    
  •            return DIMINISHING_FEAR_BLIND;
    
  •        break;
    
  •    }
    
  •    case SPELLFAMILY_DRUID:
    
  •    {
    
  •        // Pounce
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x20000)
    
  •            return DIMINISHING_CHEAPSHOT_POUNCE;
    
  •        // Cyclone
    
  •        else if (spellproto->SpellFamilyFlags[1] & 0x20)
    
  •            return DIMINISHING_CYCLONE;
    
  •        // Entangling Roots: to force natures grasp proc to be control root
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x00000200)
    
  •            return DIMINISHING_CONTROL_ROOT;
    
  •        // Faerie Fire
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x400)
    
  •            return DIMINISHING_LIMITONLY;
    
  •            return DIMINISHING_FEAR;
           break;
       }
       case SPELLFAMILY_WARRIOR:
    

@@ -2860,72 +2906,50 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
// Hamstring - limit duration to 10s in PvP
if (spellproto->SpellFamilyFlags[0] & 0x2)
return DIMINISHING_LIMITONLY;

  •        // Intimidating Shout
    
  •        else if (spellproto->SpellFamilyFlags[0] & 0x40000)
    
  •            return DIMINISHING_FEAR_BLIND;
    
  •        // Charge Stun
    
  •        // Improved Hamstring
    
  •        else if (spellproto->AttributesEx3 & 0x80000 && spellproto->SpellIconID == 23)
    
  •            return DIMINISHING_ROOT;
    
  •        // Charge Stun (own diminishing)
           else if (spellproto->SpellFamilyFlags[0] & 0x01000000)
    
  •            return DIMINISHING_NONE;
    
  •        break;
    
  •    }
    
  •    case SPELLFAMILY_PALADIN:
    
  •    {
    
  •        // Repentance
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x4)
    
  •            return DIMINISHING_POLYMORPH;
    
  •        break;
    
  •    }
    
  •    case SPELLFAMILY_DEATHKNIGHT:
    
  •    {
    
  •        // Hungering Cold (no flags)
    
  •        if (spellproto->SpellIconID == 2797)
    
  •            return DIMINISHING_POLYMORPH;
    
  •        // Mark of Blood
    
  •        else if ((spellproto->SpellFamilyFlags[0] & 0x10000000)
    
  •            && spellproto->SpellIconID == 2285)
    
  •            return DIMINISHING_LIMITONLY;
    
  •            return DIMINISHING_CHARGE;
           break;
       }
    
  •    case SPELLFAMILY_HUNTER:
    
  •    // Must be below SPELLFAMILY_WARRIOR for Charge to work
    
  •    case SPELLFAMILY_GENERIC:
       {
    
  •        // Hunter's mark
    
  •        if ((spellproto->SpellFamilyFlags[0] & 0x400) && spellproto->SpellIconID == 538)
    
  •            return DIMINISHING_LIMITONLY;
    
  •        // Scatter Shot
    
  •        if ((spellproto->SpellFamilyFlags[0] & 0x40000) && spellproto->SpellIconID == 132)
    
  •            return DIMINISHING_NONE;
    
  •        break;
    
  •        // Pet charge effects (Infernal Awakening, Demon Charge)
    
  •        if (spellproto->SpellVisual[0] == 2816 && spellproto->SpellIconID == 15)
    
  •            return DIMINISHING_CONTROLLED_STUN;
    
  •        // Gnaw
    
  •        else if (spellproto->Id == 47481)
    
  •            return DIMINISHING_CONTROLLED_STUN;
       }
       default:
           break;
    
    }
  • // Get by mechanic
  • // Lastly, set diminishing depending on mechanic
    uint32 mechanic = GetAllSpellMechanicMask(spellproto);
  • if (mechanic == MECHANIC_NONE) return DIMINISHING_NONE;
  • if (mechanic & ((1<<MECHANIC_STUN) |
  •                (1<<MECHANIC_SHACKLE))) return triggered ? DIMINISHING_TRIGGER_STUN : DIMINISHING_CONTROL_STUN;
    
  • if (mechanic & ((1<<MECHANIC_SLEEP) |
  •                (1<<MECHANIC_FREEZE))) return DIMINISHING_FREEZE_SLEEP;
    
  • if (mechanic & (1<<MECHANIC_POLYMORPH)) return DIMINISHING_POLYMORPH;
  • if (mechanic & (1<<MECHANIC_ROOT)) return triggered ? DIMINISHING_TRIGGER_ROOT : DIMINISHING_CONTROL_ROOT;
  • if (mechanic & ((1<<MECHANIC_FEAR) |
  •                (1<<MECHANIC_TURN)))    return DIMINISHING_FEAR_BLIND;
    
  • if (mechanic & (1<<MECHANIC_CHARM)) return DIMINISHING_CHARM;
  • if (mechanic & (1<<MECHANIC_SILENCE)) return DIMINISHING_SILENCE;
  • if (mechanic & (1<<MECHANIC_DISARM)) return DIMINISHING_DISARM;
  • if (mechanic & (1<<MECHANIC_FREEZE)) return DIMINISHING_FREEZE_SLEEP;
  • if (mechanic & ((1<<MECHANIC_KNOCKOUT) |
  •                (1<<MECHANIC_SAPPED)))  return DIMINISHING_KNOCKOUT;
    
  • if (mechanic & (1<<MECHANIC_BANISH)) return DIMINISHING_BANISH;
  • if (mechanic & (1<<MECHANIC_HORROR)) return DIMINISHING_DEATHCOIL;
  • // Get by effect
  • for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
  • {
  •    if (spellproto->EffectApplyAuraName[i] == SPELL_AURA_MOD_TAUNT)
    
  •        return DIMINISHING_TAUNT;
    
  • }
  • if (mechanic & (1<<MECHANIC_CHARM))
  •    return DIMINISHING_MIND_CONTROL;
    
  • if (mechanic & (1<<MECHANIC_SILENCE))
  •    return DIMINISHING_SILENCE;
    
  • if (mechanic & (1<<MECHANIC_SLEEP))
  •    return DIMINISHING_SLEEP;
    
  • if (mechanic & ((1<<MECHANIC_SAPPED) | (1<<MECHANIC_POLYMORPH) | (1<<MECHANIC_SHACKLE)))
  •    return DIMINISHING_DISORIENT;
    
  • // Mechanic Knockout except Blast Wave
  • if (mechanic & (1<<MECHANIC_KNOCKOUT) && spellproto->SpellIconID != 292)
  •    return DIMINISHING_DISORIENT;
    
  • if (mechanic & (1<<MECHANIC_DISARM))
  •    return DIMINISHING_DISARM;
    
  • if (mechanic & (1<<MECHANIC_FEAR))
  •    return DIMINISHING_FEAR;
    
  • if (mechanic & (1<<MECHANIC_STUN))
  •    return triggered ? DIMINISHING_STUN : DIMINISHING_CONTROLLED_STUN;
    
  • if (mechanic & (1<<MECHANIC_ROOT))
  •    return triggered ? DIMINISHING_ROOT : DIMINISHING_CONTROLLED_ROOT;
    
  • return DIMINISHING_NONE;
    }

@@ -2937,6 +2961,13 @@ int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry cons
// Explicit diminishing duration
switch(spellproto->SpellFamilyName)
{

  •    case SPELLFAMILY_DRUID:
    
  •    {
    
  •        // Faerie Fire - limit to 40 seconds in PvP (3.1)
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x400)
    
  •            return 40 * IN_MILLISECONDS;
    
  •        break;
    
  •    }
       case SPELLFAMILY_HUNTER:
       {
           // Wyvern Sting
    

@@ -2954,13 +2985,6 @@ int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry cons
return 6 * IN_MILLISECONDS;
break;
}

  •    case SPELLFAMILY_DRUID:
    
  •    {
    
  •        // Faerie Fire - limit to 40 seconds in PvP (3.1)
    
  •        if (spellproto->SpellFamilyFlags[0] & 0x400)
    
  •            return 40 * IN_MILLISECONDS;
    
  •        break;
    
  •    }
       default:
           break;
    
    }
    @@ -2972,19 +2996,19 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
    {
    switch(group)
    {
  •    case DIMINISHING_CONTROL_STUN:
    
  •    case DIMINISHING_TRIGGER_STUN:
    
  •    case DIMINISHING_FREEZE_SLEEP:
    
  •    case DIMINISHING_CONTROL_ROOT:
    
  •    case DIMINISHING_TRIGGER_ROOT:
    
  •    case DIMINISHING_FEAR_BLIND:
    
  •    case DIMINISHING_CHARM:
    
  •    case DIMINISHING_POLYMORPH:
    
  •    case DIMINISHING_KNOCKOUT:
    
  •    case DIMINISHING_CONTROLLED_STUN:
    
  •    case DIMINISHING_STUN:
    
  •    case DIMINISHING_ENTRAPMENT:
    
  •    case DIMINISHING_CONTROLLED_ROOT:
    
  •    case DIMINISHING_ROOT:
    
  •    case DIMINISHING_FEAR:
    
  •    case DIMINISHING_MIND_CONTROL:
    
  •    case DIMINISHING_DISORIENT:
       case DIMINISHING_CYCLONE:
       case DIMINISHING_BANISH:
       case DIMINISHING_LIMITONLY:
    
  •    case DIMINISHING_CHEAPSHOT_POUNCE:
    
  •    case DIMINISHING_OPENING_STUN:
    
  •    case DIMINISHING_HORROR:
           return true;
       default:
           return false;
    

@@ -3007,22 +3031,23 @@ DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group)
switch(group)
{
case DIMINISHING_TAUNT:

  •    case DIMINISHING_CONTROL_STUN:
    
  •    case DIMINISHING_TRIGGER_STUN:
    
  •    case DIMINISHING_CHEAPSHOT_POUNCE:
    
  •    case DIMINISHING_CONTROLLED_STUN:
    
  •    case DIMINISHING_STUN:
    
  •    case DIMINISHING_OPENING_STUN:
       case DIMINISHING_CYCLONE:
    
  •    case DIMINISHING_CHARGE:
           return DRTYPE_ALL;
    
  •    case DIMINISHING_FEAR_BLIND:
    
  •    case DIMINISHING_CONTROL_ROOT:
    
  •    case DIMINISHING_TRIGGER_ROOT:
    
  •    case DIMINISHING_CHARM:
    
  •    case DIMINISHING_POLYMORPH:
    
  •    case DIMINISHING_FEAR:
    
  •    case DIMINISHING_CONTROLLED_ROOT:
    
  •    case DIMINISHING_ROOT:
    
  •    case DIMINISHING_MIND_CONTROL:
    
  •    case DIMINISHING_DISORIENT:
    
  •    case DIMINISHING_ENTRAPMENT:
       case DIMINISHING_SILENCE:
       case DIMINISHING_DISARM:
    
  •    case DIMINISHING_DEATHCOIL:
    
  •    case DIMINISHING_FREEZE_SLEEP:
       case DIMINISHING_BANISH:
    
  •    case DIMINISHING_KNOCKOUT:
    
  •    case DIMINISHING_SCATTER_SHOT:
    
  •    case DIMINISHING_HORROR:
           return DRTYPE_PLAYER;
       default:
           break;
    

If you notice something wrong, please post here.

just wondering, why the changes from https://github.com/TrinityCore/TrinityCore/commit/21f6248726e3964e67ea0f3a0e70b4bf46c21b9c went overboard.

iirc it was needed, because the the Winter Wondervolt Buff was diminished as Polymorph.

/e: oohhh riiight, pointing out potential issues results in negative votes. Nice one…

Didn’t think it was needed but I was wrong.

Updated patch to rev: https://github.com/TrinityCore/TrinityCore/commit/8886eb2f9d68b27272af12b3f6184a48e020db37 including those changes.

Thank you

If you are already on Diminishing returns, you think you are able to fix Diminishing returns for spells with a damaging effect?

For example atm If you completely Dr shockwave it returns “Spell_miss_immune” so the damage gets lost but it should still deal the damage and only the stun gets immuned.

the inability to be immune against single SpellEffects is another issue (but valid nonetheless)

It possible to add DR for spell shockwave ? I dont understand how this system work :X

Doesn’t shockwave have DR with this patch?

At clean TrinityCore it have but it (Shockwave) applied as positive spell and DR doesn’t applied to positive spells xD It can be easily fixed by adding a small hack to SpellMgr::_isPositiveEffect for him ^^

[CODE]author: telsamat

diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index d2a4cd9…12061d3 100755
— a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -771,6 +771,11 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
if (spellproto->SpellIconID == 45)
return true;
break;

  •    case SPELLFAMILY_WARRIOR:
    
  •        // Shockwave
    
  •        if (spellId == 46968)
    
  •            return false;
    
  •        break;
       case SPELLFAMILY_PRIEST:
           switch (spellId)
           {
    

[/code]
[/CODE]

Well then it has nothing to do with this /emoticons/default_smile.png Shockwave should be negative of course

ups I try it … thanks

Banish should be limited to 6 seconds in PvP

[CODE]diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 6dbbe54…2b13b34 100755
— a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2959,6 +2959,13 @@ int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry cons
return 6 * IN_MILLISECONDS;
break;
}

  •    case SPELLFAMILY_WARLOCK:
    
  •    {
    
  •        // Banish - limit to 6 seconds in PvP
    
  •        if (spellproto->SpellFamilyFlags[1] & 0x8000000)
    
  •            return 6 * IN_MILLISECONDS;
    
  •        break;
    
  •    }
       case SPELLFAMILY_DRUID:
       {
           // Faerie Fire - limit to 40 seconds in PvP (3.1)
    

[/code]
[/CODE]

There are some bogus category names, like DIMINISHING_DISORIENT for sap/poly/some freeze

Yeah you are right, couldn’t come up with a better idea though, old name was polymorph, but it applies to Wyvern Sting, Hungering Cold, Sap, Polymorph, Freezing Arrow, Gouge, Dragon’s Breath and some more. It’s the most generic one with a really wide use of different mechanics.