mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
More warning removal (Some code modifications and cleanup when needed)
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user