[12203] Improve EffectTeleUnitsFaceCaster and target-selection for position targets

* Let EffectTeleUnitsFaceCaster use a destination for teleporting if provided
* Expect to add caster for TARGET_RANDOM_NEARBY_LOC, TARGET_RANDOM_CIRCUMFERENCE_POINT only for summon spells (or similar spells)
This commit is contained in:
Schmoozerd 2012-09-08 23:12:55 +02:00 committed by Antz
parent 6ba3c19a22
commit d2679caf85
3 changed files with 12 additions and 5 deletions

View file

@ -1946,7 +1946,10 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
m_caster->GetClosePoint(dest_x, dest_y, dest_z, 0.0f, radius, angle);
m_targets.setDestination(dest_x, dest_y, dest_z);
targetUnitMap.push_back(m_caster);
// This targetMode is often used as 'last' implicitTarget for positive spells, that just require coordinates
// and no unitTarget (e.g. summon effects). As MaNGOS always needs a unitTarget we add just the caster here.
if (IsPositiveSpell(m_spellInfo))
targetUnitMap.push_back(m_caster);
break;
}
case TARGET_91: