fix(Core/Movement): Improvements to taxi flight movement generator: (#12347)

Changed multi-segment taxi paths to fly nearby flight masters along the way, not directly through them.
Taxi cost on multi-segment paths is now charged per segment when it is started.
Properly send taxi node status on login, as well as if the taxi master is out of range.
Apply reputation discount to all points in multi-segment paths.
Properly clean up list of taxi destinations upon arrival at final node.
Teleport players to the destination taxi node location instead of their current ground position.
Don't start a spline with just 1 point in FlightPathMovementGenerator
Source: TrinityCore.
This commit is contained in:
UltraNix
2022-08-02 04:21:11 +02:00
committed by GitHub
parent 7f9ea035de
commit 572a680c16
13 changed files with 347 additions and 189 deletions

View File

@@ -188,6 +188,22 @@ void WorldSession::HandleMoveWorldportAck()
GetPlayer()->SendInitialPacketsAfterAddToMap();
// flight fast teleport case
if (GetPlayer()->IsInFlight())
{
if (!GetPlayer()->InBattleground())
{
// short preparations to continue flight
MovementGenerator* movementGenerator = GetPlayer()->GetMotionMaster()->top();
movementGenerator->Initialize(GetPlayer());
return;
}
// battleground state prepare, stop flight
GetPlayer()->GetMotionMaster()->MovementExpired();
GetPlayer()->CleanupAfterTaxiFlight();
}
// resurrect character at enter into instance where his corpse exist after add to map
Corpse* corpse = GetPlayer()->GetMap()->GetCorpseByPlayer(GetPlayer()->GetGUID());
if (corpse && corpse->GetType() != CORPSE_BONES)