aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-11 18:58:34 +0200
committerQAston <none@none>2009-04-11 18:58:34 +0200
commit2e0ffba0bcea53f8b5ce15a51174c34cbc55d202 (patch)
treeccbd89ec8f207d7d74dcfb5a9ee2d480862eb44f /src/game/Spell.cpp
parenta5e7907ff5e6c1510f85513f5ec16f21336d5a45 (diff)
*Fix beacon of light.
*Fix a crash in Spell::CanAutoCast. --HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 7c40049fd32..691aa35d774 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4641,8 +4641,9 @@ bool Spell::CanAutoCast(Unit* target)
}
else
{
- if( (target->GetAuraEffect(m_spellInfo->Id, j))->GetParentAura()->GetStackAmount() >= m_spellInfo->StackAmount)
- return false;
+ if( AuraEffect * aureff = target->GetAuraEffect(m_spellInfo->Id, j))
+ if (aureff->GetParentAura()->GetStackAmount() >= m_spellInfo->StackAmount)
+ return false;
}
}
else if ( IsAreaAuraEffect( m_spellInfo->Effect[j] ))