mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 16:37:04 +00:00
[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:
parent
d98b9b9670
commit
4c3b61d4f5
11 changed files with 160 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue