[11443] Implement SPELL_AURA_MIRROR_IMAGE (247) and related receive/reply packets

Inspired by different patches posted in forum, thanks guys for the help it was :D

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2011-05-08 18:57:06 +02:00
parent d98b9b9670
commit 4c3b61d4f5
11 changed files with 160 additions and 6 deletions

View file

@ -5531,6 +5531,25 @@ SpellCastResult Spell::CheckCast(bool strict)
break;
}
case SPELL_AURA_MIRROR_IMAGE:
{
Unit* pTarget = m_targets.getUnitTarget();
if (!pTarget)
return SPELL_FAILED_BAD_TARGETS;
if (pTarget->GetTypeId() != TYPEID_UNIT) // Target must be creature
return SPELL_FAILED_BAD_TARGETS;
if (pTarget == m_caster) // Clone self can't be accepted
return SPELL_FAILED_BAD_TARGETS;
// It is assumed that target can not be cloned if already cloned by same or other clone auras
if (!pTarget->GetAurasByType(SPELL_AURA_MIRROR_IMAGE).empty())
return SPELL_FAILED_BAD_TARGETS;
break;
}
default:
break;
}