[7136] Check mount existance at loading not completed taxi path at login.

This commit is contained in:
VladimirMangos 2009-01-21 19:40:19 +03:00
parent d9d30fd40e
commit 6bc449d053
3 changed files with 8 additions and 4 deletions

View file

@ -190,7 +190,7 @@ void PlayerTaxi::AppendTaximaskTo( ByteBuffer& data, bool all )
}
}
bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values )
bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values, uint32 team )
{
ClearTaxiDestinations();
@ -218,6 +218,10 @@ bool PlayerTaxi::LoadTaxiDestinationsFromString( const std::string& values )
return false;
}
// can't load taxi path without mount set (quest taxi path?)
if(!objmgr.GetTaxiMount(GetTaxiSource(),team))
return false;
return true;
}
@ -14364,7 +14368,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
}
// Not finish taxi flight path
if(!m_taxi.LoadTaxiDestinationsFromString(taxi_nodes))
if(!m_taxi.LoadTaxiDestinationsFromString(taxi_nodes,GetTeam()))
{
// problems with taxi path loading
TaxiNodesEntry const* nodeEntry = NULL;