[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;

View file

@ -938,7 +938,7 @@ class MANGOS_DLL_SPEC PlayerTaxi
void AppendTaximaskTo(ByteBuffer& data,bool all);
// Destinations
bool LoadTaxiDestinationsFromString(const std::string& values);
bool LoadTaxiDestinationsFromString(const std::string& values, uint32 team);
std::string SaveTaxiDestinationsToString();
void ClearTaxiDestinations() { m_TaxiDestinations.clear(); }

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7135"
#define REVISION_NR "7136"
#endif // __REVISION_NR_H__