[11996] Fix targeting for spells like 53022

Thanks to Inquisitor for pointing

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
Schmoozerd 2012-06-09 14:48:49 +02:00
parent 41072c5455
commit ef079ac0be
2 changed files with 5 additions and 3 deletions

View file

@ -2717,10 +2717,12 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
}
case TARGET_DYNAMIC_OBJECT_COORDINATES:
// if parent spell create dynamic object extract area from it
if(DynamicObject* dynObj = m_caster->GetDynObject(m_triggeredByAuraSpell ? m_triggeredByAuraSpell->Id : m_spellInfo->Id))
if (DynamicObject* dynObj = m_caster->GetDynObject(m_triggeredByAuraSpell ? m_triggeredByAuraSpell->Id : m_spellInfo->Id))
m_targets.setDestination(dynObj->GetPositionX(), dynObj->GetPositionY(), dynObj->GetPositionZ());
// else use destination of target if no destination set (ie for Mind Sear - 53022)
else if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) && m_targets.m_targetMask & TARGET_FLAG_UNIT)
m_targets.setDestination(m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ);
break;
case TARGET_DYNAMIC_OBJECT_FRONT:
case TARGET_DYNAMIC_OBJECT_BEHIND:
case TARGET_DYNAMIC_OBJECT_LEFT_SIDE:

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11995"
#define REVISION_NR "11996"
#endif // __REVISION_NR_H__