[11798] Implement select spellDifficulty support in RemoveAurasDueToSpell

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
kid 10 2011-08-18 22:02:48 +02:00 committed by Schmoozerd
parent a9e435c078
commit 6f156a2583
2 changed files with 6 additions and 1 deletions

View file

@ -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; )
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11797"
#define REVISION_NR "11798"
#endif // __REVISION_NR_H__