mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[11447] Make SPELL_AURA_MIRROR_IMAGE work also for TARGET_SCRIPT
Not the best solution though, and should figure out a more nice way to deal with it. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
605fb79847
commit
8ee769a3cd
2 changed files with 6 additions and 2 deletions
|
|
@ -5535,10 +5535,14 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
{
|
||||
Unit* pTarget = m_targets.getUnitTarget();
|
||||
|
||||
// In case of TARGET_SCRIPT, we have already added a target. Use it here (and find a better solution)
|
||||
if (m_UniqueTargetInfo.size() == 1)
|
||||
pTarget = m_caster->GetMap()->GetAnyTypeCreature(m_UniqueTargetInfo.front().targetGUID);
|
||||
|
||||
if (!pTarget)
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
if (pTarget->GetTypeId() != TYPEID_UNIT) // Target must be creature
|
||||
if (pTarget->GetTypeId() != TYPEID_UNIT) // Target must be creature. TODO: Check if target can also be player
|
||||
return SPELL_FAILED_BAD_TARGETS;
|
||||
|
||||
if (pTarget == m_caster) // Clone self can't be accepted
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11446"
|
||||
#define REVISION_NR "11447"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue