Core/Spells: Small cleanup in SpellEffects, spells always have caster

--HG--
branch : trunk
This commit is contained in:
Shocker
2010-12-22 20:18:34 +02:00
parent 42304c0b25
commit 446c300505

View File

@@ -2690,7 +2690,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
void Spell::EffectOpenLock(SpellEffIndex effIndex)
{
if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
{
sLog.outDebug("WORLD: Open Lock - No Player Caster!");
return;
@@ -4713,7 +4713,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
// Retribution by Sevenfold Retribution
case 51854:
{
if (!m_caster || !unitTarget)
if (!unitTarget)
return;
if (unitTarget->HasAura(51845))
unitTarget->CastSpell(m_caster, 51856, true);
@@ -5386,7 +5386,7 @@ void Spell::EffectAddComboPoints(SpellEffIndex /*effIndex*/)
void Spell::EffectDuel(SpellEffIndex effIndex)
{
if (!m_caster || !unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER || unitTarget->GetTypeId() != TYPEID_PLAYER)
if (!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
Player *caster = (Player*)m_caster;
@@ -5965,7 +5965,7 @@ void Spell::EffectSkinning(SpellEffIndex /*effIndex*/)
{
if (unitTarget->GetTypeId() != TYPEID_UNIT)
return;
if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER)
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return;
Creature* creature = unitTarget->ToCreature();