aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorSpp <none@none>2010-04-19 17:03:10 +0200
committerSpp <none@none>2010-04-19 17:03:10 +0200
commitbe01821050dd30ff65e89b347d528efb20aba028 (patch)
tree6d33e686bf1c5d664a7104a208a4e057c6337b1e /src/game/SpellAuras.cpp
parentf74e969a069646eca6227bdede974223c07e9c94 (diff)
More warning removal (Some code modifications and cleanup when needed)
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 1828a3ec37f..eddbb230b16 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -557,9 +557,12 @@ void Aura::UpdateOwner(uint32 diff, WorldObject * owner)
Spell * modSpell = NULL;
Player * modOwner = NULL;
if (caster)
- if ((modOwner = caster->GetSpellModOwner())
- && (modSpell = modOwner->FindCurrentSpellBySpellId(GetId())))
- modOwner->SetSpellModTakingSpell(modSpell, true);
+ {
+ modOwner = caster->GetSpellModOwner();
+ modSpell = modOwner->FindCurrentSpellBySpellId(GetId());
+ if (modOwner && modSpell)
+ modOwner->SetSpellModTakingSpell(modSpell, true);
+ }
Update(diff, caster);