[Core] Fix spells with the target combination (TARGET_SCRIPT, TARGET_SELF). [cz2671]

There are only four spells with this combination, all involved in a quest:
* Spell 11637, used by item 9364, for quest 2962.
* Spell 17048, used by item 12848, for quest 5127.
* Spell 22906, used by item 18488, for quest 7509.
* Spell 13982, used by item 11231, for quest 4024. [TBC and Classic only]
This commit is contained in:
evil-at-wow 2015-07-10 20:57:19 +01:00 committed by Antz
parent 310684e4a4
commit d21d680b41

View File

@ -394,8 +394,8 @@ void Spell::FillTargetMap()
// for TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT (A) all is checked in Spell::CheckCast and in Spell::CheckItem
// filled in Spell::CheckCast call
if (m_spellInfo->EffectImplicitTargetA[i] == TARGET_SCRIPT_COORDINATES ||
m_spellInfo->EffectImplicitTargetA[i] == TARGET_SCRIPT ||
m_spellInfo->EffectImplicitTargetA[i] == TARGET_FOCUS_OR_SCRIPTED_GAMEOBJECT ||
(m_spellInfo->EffectImplicitTargetA[i] == TARGET_SCRIPT && m_spellInfo->EffectImplicitTargetB[i] != TARGET_SELF) ||
(m_spellInfo->EffectImplicitTargetB[i] == TARGET_SCRIPT && m_spellInfo->EffectImplicitTargetA[i] != TARGET_SELF))
{ continue; }
@ -566,6 +566,17 @@ void Spell::FillTargetMap()
break;
}
break;
case TARGET_SCRIPT:
switch (m_spellInfo->EffectImplicitTargetB[i])
{
case TARGET_SELF:
// Fill target based on B only, A is only used with CheckCast here.
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitLists[i /*==effToIndex[i]*/]);
break;
default:
break;
}
break;
default:
switch (m_spellInfo->EffectImplicitTargetB[i])
{