diff options
| author | click <none@none> | 2010-12-11 12:00:57 +0100 |
|---|---|---|
| committer | click <none@none> | 2010-12-11 12:00:57 +0100 |
| commit | 81db111ffd70338de973fa8b1969367d8ca9624e (patch) | |
| tree | 18219a1b8308bd07a8dca3cb953006d6c42e7556 /src/server/game/Spells | |
| parent | 0e33e73d3966057966d71b802e153ae100f7e463 (diff) | |
Core/Spells: Fix mage talent Frost Warding (and a little cleanup on CalcAbsorbResist) - patch by DrTenma
Fixes issue 2715.
Closes issue 3770.
--HG--
branch : trunk
Diffstat (limited to 'src/server/game/Spells')
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuraEffects.h | 60 |
1 files changed, 59 insertions, 1 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index 0ceea63ad76..80809c9d0bb 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -264,4 +264,62 @@ class AuraEffect void HandleAuraModFakeInebriation(AuraApplication const * aurApp, uint8 mode, bool apply) const; }; -#endif
\ No newline at end of file +namespace Trinity +{ + // Binary predicate for sorting the priority of absorption aura effects + class AbsorbAuraOrderPred + { + public: + AbsorbAuraOrderPred() { } + bool operator() (AuraEffect * aurEffA, AuraEffect * aurEffB) const + { + SpellEntry const * spellProtoA = aurEffA->GetSpellProto(); + SpellEntry const * spellProtoB = aurEffB->GetSpellProto(); + + // Wards + if ((spellProtoA->SpellFamilyName == SPELLFAMILY_MAGE) || + (spellProtoA->SpellFamilyName == SPELLFAMILY_WARLOCK)) + if (spellProtoA->Category == 56) + return true; + if ((spellProtoB->SpellFamilyName == SPELLFAMILY_MAGE) || + (spellProtoB->SpellFamilyName == SPELLFAMILY_WARLOCK)) + if (spellProtoB->Category == 56) + return false; + + // Sacred Shield + if (spellProtoA->Id == 58597) + return true; + if (spellProtoB->Id == 58597) + return false; + + // Fel Blossom + if (spellProtoA->Id == 28527) + return true; + if (spellProtoB->Id == 28527) + return false; + + // Divine Aegis + if (spellProtoA->Id == 47753) + return true; + if (spellProtoB->Id == 47753) + return false; + + // Ice Barrier + if (spellProtoA->Category == 471) + return true; + if (spellProtoB->Category == 471) + return false; + + // Sacrifice + if ((spellProtoA->SpellFamilyName == SPELLFAMILY_WARLOCK) && + (spellProtoA->SpellIconID == 693)) + return true; + if ((spellProtoB->SpellFamilyName == SPELLFAMILY_WARLOCK) && + (spellProtoB->SpellIconID == 693)) + return false; + + return false; + } + }; +} +#endif |
