From 8b876b08173f92062af449bccfb430b2b2f28bac Mon Sep 17 00:00:00 2001 From: megamage Date: Tue, 6 Jan 2009 13:49:01 -0600 Subject: *Mangos [7037] Avoid unneeded #ifdef. By VladimirMangos. *Mangos [7038] Fixing known taxi node save in 3.0.3. Cleanup code. By VladimirMangos. --HG-- branch : trunk --- src/game/Player.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/game/Player.cpp') diff --git a/src/game/Player.cpp b/src/game/Player.cpp index de8a1a747a7..863699a225f 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -253,6 +253,15 @@ uint32 PlayerTaxi::GetCurrentTaxiPath() const return path; } +std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi) +{ + ss << "'"; + for(int i = 0; i < TaxiMaskSize; ++i) + ss << taxi.m_taximask[i] << " "; + ss << "'"; + return ss; +} + //== Player ==================================================== const int32 Player::ReputationRank_Length[MAX_REPUTATION_RANK] = {36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000}; @@ -15734,12 +15743,11 @@ void Player::SaveToDB() ss << GetUInt32Value(i) << " "; } - ss << "', '"; + ss << "', "; - for( i = 0; i < 8; i++ ) - ss << m_taxi.GetTaximask(i) << " "; + ss << m_taxi; // string with TaxiMaskSize numbers - ss << "', "; + ss << ", "; ss << (inworld ? 1 : 0); ss << ", "; -- cgit v1.2.3