From 00f4b2e6f2a3cad38bb936f4f43de5664927ca99 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Mon, 25 Jun 2012 23:07:43 +0200 Subject: [PATCH] [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. --- src/game/Spell.cpp | 7 +++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index bf328ad19..fa6327a86 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -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]*/]); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 1f9e90987..803a26123 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 "12023" + #define REVISION_NR "12024" #endif // __REVISION_NR_H__