mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Spells: Don't set TARGET_FLAG_DEST_LOCATION for cone targets
This commit is contained in:
@@ -1250,20 +1250,13 @@ void Spell::SelectImplicitNearbyTargets(SpellEffectInfo const& spellEffectInfo,
|
||||
|
||||
void Spell::SelectImplicitConeTargets(SpellEffectInfo const& spellEffectInfo, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32 effMask)
|
||||
{
|
||||
Position coneSrc = m_caster->GetPosition();
|
||||
float coneAngle = m_spellInfo->ConeAngle;
|
||||
switch (targetType.GetReferenceType())
|
||||
if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER)
|
||||
{
|
||||
case TARGET_REFERENCE_TYPE_CASTER:
|
||||
break;
|
||||
case TARGET_REFERENCE_TYPE_DEST:
|
||||
if (m_caster->GetExactDist2d(m_targets.GetDstPos()) > 0.1f)
|
||||
coneSrc.SetOrientation(m_caster->GetAbsoluteAngle(m_targets.GetDstPos()));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
ABORT_MSG("Spell::SelectImplicitConeTargets: received not implemented target reference type");
|
||||
return;
|
||||
}
|
||||
|
||||
float coneAngle = m_spellInfo->ConeAngle;
|
||||
switch (targetType.GetTarget())
|
||||
{
|
||||
case TARGET_UNIT_CONE_180_DEG_ENEMY:
|
||||
@@ -1283,7 +1276,7 @@ void Spell::SelectImplicitConeTargets(SpellEffectInfo const& spellEffectInfo, Sp
|
||||
if (uint32 containerTypeMask = GetSearcherTypeMask(m_spellInfo, spellEffectInfo, objectType, condList))
|
||||
{
|
||||
float extraSearchRadius = radius > 0.0f ? EXTRA_CELL_SEARCH_RADIUS : 0.0f;
|
||||
Trinity::WorldObjectSpellConeTargetCheck check(coneSrc, DegToRad(coneAngle), m_spellInfo->Width ? m_spellInfo->Width : m_caster->GetCombatReach(), radius, m_caster, m_spellInfo, selectionType, condList, objectType);
|
||||
Trinity::WorldObjectSpellConeTargetCheck check(*m_caster, DegToRad(coneAngle), m_spellInfo->Width ? m_spellInfo->Width : m_caster->GetCombatReach(), radius, m_caster, m_spellInfo, selectionType, condList, objectType);
|
||||
Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> searcher(m_caster, targets, check, containerTypeMask);
|
||||
SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> >(searcher, containerTypeMask, m_caster, m_caster, radius + extraSearchRadius);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user