Movement/TaxiPath: Properly clean up list of taxi destinations upon arrival at final node. Closes #22089.

(cherry picked from commit a3697052c3)
This commit is contained in:
Treeston
2018-09-13 23:04:08 +02:00
committed by Shauren
parent 8866065117
commit 390001fa62
2 changed files with 4 additions and 1 deletions

View File

@@ -165,6 +165,8 @@ std::string PlayerTaxi::SaveTaxiDestinationsToString()
if (m_TaxiDestinations.empty())
return "";
ASSERT(m_TaxiDestinations.size() >= 2);
std::ostringstream ss;
ss << m_flightMasterFactionId << ' ';

View File

@@ -143,6 +143,7 @@ void FlightPathMovementGenerator::DoFinalize(Player* owner, bool active, bool/*
if (!active)
return;
owner->m_taxi.ClearTaxiDestinations();
owner->Dismount();
owner->RemoveUnitFlag(UnitFlags(UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT));
@@ -267,7 +268,7 @@ void FlightPathMovementGenerator::PreloadEndGrid()
// Load the grid
if (endMap)
{
TC_LOG_DEBUG("movement.flightpath", "FlightPathMovementGenerator::PreloadEndGrid: preloading rid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, uint32(_path.size() - 1));
TC_LOG_DEBUG("movement.flightpath", "FlightPathMovementGenerator::PreloadEndGrid: preloading grid (%f, %f) for map %u at node index %u/%u", _endGridX, _endGridY, _endMapId, _preloadTargetNode, uint32(_path.size() - 1));
endMap->LoadGrid(_endGridX, _endGridY);
}
else