diff options
author | megamage <none@none> | 2009-06-07 11:49:50 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-06-07 11:49:50 -0500 |
commit | 18f50212b05fbc5fa67c5dc924824b8dea9150f4 (patch) | |
tree | 31db55b3da0dc06e375848e4ca59d1d479303bc3 /src | |
parent | aaeb7adedd13a33885ea95243ab9ab174bcdc4d9 (diff) |
*Fix a crash in spell::cast
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index cb67391dcbf..ecd2852dd7c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2238,6 +2238,9 @@ void Spell::cancel() void Spell::cast(bool skipCheck) { + // update pointers base at GUIDs to prevent access to non-existed already object + UpdatePointers(); + if(m_targets.getUnitTarget() && m_targets.getUnitTarget()->isAlive() && !m_targets.getUnitTarget()->isVisibleForOrDetect(m_caster, true)) { cancel(); @@ -2247,9 +2250,6 @@ void Spell::cast(bool skipCheck) SetExecutedCurrently(true); uint8 castResult = 0; - // update pointers base at GUIDs to prevent access to non-existed already object - UpdatePointers(); - // cancel at lost main target unit if(!m_targets.getUnitTarget() && m_targets.getUnitTargetGUID() && m_targets.getUnitTargetGUID() != m_caster->GetGUID()) { |