From 6f156a258399391e7cf7aa060294d4d249815940 Mon Sep 17 00:00:00 2001 From: kid 10 Date: Thu, 18 Aug 2011 22:02:48 +0200 Subject: [PATCH] [11798] Implement select spellDifficulty support in RemoveAurasDueToSpell Signed-off-by: Schmoozerd --- src/game/Unit.cpp | 5 +++++ src/shared/revision_nr.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 4354cf31e..f0c3ed7fa 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4469,6 +4469,11 @@ void Unit::RemoveAuraHolderFromStack(uint32 spellId, uint32 stackAmount, ObjectG void Unit::RemoveAurasDueToSpell(uint32 spellId, SpellAuraHolder* except, AuraRemoveMode mode) { + SpellEntry const* spellEntry = sSpellStore.LookupEntry(spellId); + if (spellEntry && spellEntry->SpellDifficultyId && IsInWorld() && GetMap()->IsDungeon()) + if (SpellEntry const* spellDiffEntry = GetSpellEntryByDifficulty(spellEntry->SpellDifficultyId, GetMap()->GetDifficulty(), GetMap()->IsRaid())) + spellId = spellDiffEntry->Id; + SpellAuraHolderBounds bounds = GetSpellAuraHolderBounds(spellId); for (SpellAuraHolderMap::iterator iter = bounds.first; iter != bounds.second; ) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b6182cfb1..a6ac0908a 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11797" + #define REVISION_NR "11798" #endif // __REVISION_NR_H__