[12024] Fix Targetpair (87, 8) to use TARGET_FLAG_DEST_LOCATION

Note: It seems that atm a bunch of spells are broken, that had seem to work before.
There will follow up a few more changes to spell targeting, so please report issues you find.
This commit is contained in:
Schmoozerd 2012-06-25 23:07:43 +02:00
parent 314c448a3d
commit 00f4b2e6f2
2 changed files with 8 additions and 1 deletions

View file

@ -620,6 +620,13 @@ void Spell::FillTargetMap()
case TARGET_EFFECT_SELECT:
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
break;
case TARGET_AREAEFFECT_CUSTOM:
// triggered spells get dest point from default target set, ignore it
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION) || m_IsTriggeredSpell)
if (WorldObject* castObject = GetCastingObject())
m_targets.setDestination(castObject->GetPositionX(), castObject->GetPositionY(), castObject->GetPositionZ());
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitLists[i /*==effToIndex[i]*/]);
break;
// most A/B target pairs is self->negative and not expect adding caster to target list
default:
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitLists[i /*==effToIndex[i]*/]);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "12023"
#define REVISION_NR "12024"
#endif // __REVISION_NR_H__