From ef079ac0be47d083cf03e48c5407357d5be74445 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sat, 9 Jun 2012 14:48:49 +0200 Subject: [PATCH] [11996] Fix targeting for spells like 53022 Thanks to Inquisitor for pointing Signed-off-by: Schmoozerd --- src/game/Spell.cpp | 6 ++++-- src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index bfc115dc1..896e10cd1 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -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: diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index b2dbeeae4..8d0c1d401 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11995" + #define REVISION_NR "11996" #endif // __REVISION_NR_H__