Core: Clean up here and there.

*replase postfix iterator increment\decrement with prefix in cycles
*replase strlen(*char) != 0 with *char[0] != '\0'
*replase strlen(rStr.c_str()) with rStr.length()
This commit is contained in:
Chaplain
2011-08-23 18:09:08 +03:00
parent 7e1f3ceb44
commit fb27848510
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));