mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Spells: Small cleanup in SpellEffects, spells always have caster
--HG-- branch : trunk
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user