From 06c4ef3931389441c567fba0fb1913b3c0da10da Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Mon, 15 Jun 2009 12:15:22 +0400 Subject: [PATCH] [8020] Use proper aura stack size check for post-0.12 code --- src/game/Spell.cpp | 5 +++-- src/shared/revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 35f48cf95..99676426c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -4709,8 +4709,9 @@ bool Spell::CanAutoCast(Unit* target) } else { - if( target->GetAuras().count(Unit::spellEffectPair(m_spellInfo->Id, j)) >= m_spellInfo->StackAmount) - return false; + if(Aura* aura = target->GetAura(m_spellInfo->Id, j)) + if(aura->GetStackAmount() >= m_spellInfo->StackAmount) + return false; } } else if ( IsAreaAuraEffect( m_spellInfo->Effect[j] )) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ca65be9c1..1a71db475 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 "8019" + #define REVISION_NR "8020" #endif // __REVISION_NR_H__