Merge pull request #2721 from Chaplain/cleanup

Core: Clean up here and there.
This commit is contained in:
QAston
2011-08-23 21:01:54 -07:00
13 changed files with 18 additions and 20 deletions
-1
View File
@@ -2497,7 +2497,6 @@ void Spell::SelectEffectTargets(uint32 i, SpellImplicitTargetInfo const& cur)
// Search for ghoul if our ghoul or dead body not valid unit target
if (!(m_targets.GetUnitTarget() && ((m_targets.GetUnitTarget()->GetEntry() == 26125 && m_targets.GetUnitTarget()->GetOwnerGUID() == m_caster->GetGUID())
|| (m_targets.GetUnitTarget()->getDeathState() == CORPSE
&& m_targets.GetUnitTarget()->GetDisplayId() == m_targets.GetUnitTarget()->GetNativeDisplayId()
&& m_targets.GetUnitTarget()->GetTypeId() == TYPEID_UNIT
&& !(m_targets.GetUnitTarget()->GetCreatureTypeMask() & CREATURE_TYPEMASK_MECHANICAL_OR_ELEMENTAL)
&& m_targets.GetUnitTarget()->GetDisplayId() == m_targets.GetUnitTarget()->GetNativeDisplayId()))))
+1 -1
View File
@@ -999,7 +999,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
case 47170: // Impale Leviroth
{
if (!unitTarget && unitTarget->GetEntry() != 26452 && unitTarget->HealthAbovePct(95))
if (!unitTarget || (unitTarget->GetEntry() != 26452 && unitTarget->HealthAbovePct(95)))
return;
m_caster->DealDamage(unitTarget, unitTarget->CountPctFromMaxHealth(93));