Core/Spells: removed deprecated path generation for TARGET_DEST_CASTER_FRONT_LEAP since MovePositonToFirstCollision now does the job

This commit is contained in:
Ovahlord
2020-05-01 14:46:55 +02:00
parent 7b62f5ac56
commit 1472bc9a7d

View File

@@ -1379,23 +1379,8 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
float angle = targetType.CalcDirectionAngle();
Position pos = dest._position;
unitCaster->MovePositionToFirstCollision(pos, dist, angle);
// Generate path to that point.
if (!m_preGeneratedPath)
m_preGeneratedPath = std::make_unique<PathGenerator>(unitCaster);
m_preGeneratedPath->SetPathLengthLimit(dist);
// Should we use straightline here ? What do we do when we don't have a full path ?
bool pathResult = m_preGeneratedPath->CalculatePath(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), false, true);
if (pathResult && m_preGeneratedPath->GetPathType() & (PATHFIND_NORMAL | PATHFIND_SHORTCUT))
{
pos.m_positionX = m_preGeneratedPath->GetActualEndPosition().x;
pos.m_positionY = m_preGeneratedPath->GetActualEndPosition().y;
pos.m_positionZ = m_preGeneratedPath->GetActualEndPosition().z;
dest.Relocate(pos);
}
dest.Relocate(pos);
break;
}
case TARGET_DEST_CASTER_FLOOR: