aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.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/Spell.cpp
parentf74e969a069646eca6227bdede974223c07e9c94 (diff)
More warning removal (Some code modifications and cleanup when needed)
--HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 8a50bbda609..f432d73767b 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1335,7 +1335,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
}
// Get Data Needed for Diminishing Returns, some effects may have multiple auras, so this must be done on spell hit, not aura add
- if (m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell))
+ m_diminishGroup = GetDiminishingReturnsGroupForSpell(m_spellInfo,m_triggeredByAuraSpell);
+ if (m_diminishGroup)
{
m_diminishLevel = unit->GetDiminishing(m_diminishGroup);
DiminishingReturnsType type = GetDiminishingReturnsGroupType(m_diminishGroup);
@@ -1372,8 +1373,9 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
if (m_originalCaster)
{
- if (m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit,
- m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_currentBasePoints[0] : &basePoints[0], m_CastItem))
+ m_spellAura = Aura::TryCreate(aurSpellInfo, effectMask, unit,
+ m_originalCaster,(aurSpellInfo == m_spellInfo)? &m_currentBasePoints[0] : &basePoints[0], m_CastItem);
+ if (m_spellAura)
{
// Now Reduce spell duration using data received at spell hit
int32 duration = m_spellAura->GetMaxDuration();
@@ -4584,7 +4586,8 @@ SpellCastResult Spell::CheckCast(bool strict)
if (m_targets.getTargetMask() == TARGET_FLAG_SELF &&
m_spellInfo->EffectImplicitTargetA[1] == TARGET_UNIT_TARGET_ENEMY)
{
- if (target = m_caster->GetUnit(*m_caster, m_caster->ToPlayer()->GetSelection()))
+ target = m_caster->GetUnit(*m_caster, m_caster->ToPlayer()->GetSelection());
+ if (target)
m_targets.setUnitTarget(target);
else
return SPELL_FAILED_BAD_TARGETS;