mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Core/Spells: removed deprecated path generation for TARGET_DEST_CASTER_FRONT_LEAP since MovePositonToFirstCollision now does the job
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user