Core/Misc: Remove unneeded ToCreature() casts

Remove some ToCreature() casts not needed anymore after 1ee90e1022 changes that moved IsPet(), IsTotem(), IsSummon(), IsGuardian(), IsHunterPet() and IsVehicle() from Creature to Unit
This commit is contained in:
jackpoz committed 2015-08-12 14:05:14 +02:00
1 parent d243630acf
commit ea4d9c0d9e
7 files changed
+23 -23

No files matched your search

+4 -4
View File
@@ -2981,7 +2981,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
if (m_originalCaster)
{
owner = m_originalCaster->ToPlayer();
if (!owner && m_originalCaster->ToCreature()->IsTotem())
if (!owner && m_originalCaster->IsTotem())
owner = m_originalCaster->GetCharmerOrOwnerPlayerOrPlayerItself();
}
@@ -3038,7 +3038,7 @@ void Spell::EffectSummonPet(SpellEffIndex effIndex)
if (m_caster->GetTypeId() == TYPEID_UNIT)
{
if (m_caster->ToCreature()->IsTotem())
if (m_caster->IsTotem())
pet->SetReactState(REACT_AGGRESSIVE);
else
pet->SetReactState(REACT_DEFENSIVE);
@@ -3868,7 +3868,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
case 52173: // Coyote Spirit Despawn
case 60243: // Blood Parrot Despawn
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->ToCreature()->IsSummon())
if (unitTarget->GetTypeId() == TYPEID_UNIT && unitTarget->IsSummon())
unitTarget->ToTempSummon()->UnSummon();
return;
case 52479: // Gift of the Harvester
@@ -3963,7 +3963,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
case 60123: // Lightwell
{
if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->ToCreature()->IsSummon())
if (m_caster->GetTypeId() != TYPEID_UNIT || !m_caster->IsSummon())
return;
uint32 spell_heal;