diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/AccountMgr.cpp | 6 | ||||
-rw-r--r-- | src/game/Player.cpp | 16 | ||||
-rw-r--r-- | src/game/Player.h | 6 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
4 files changed, 18 insertions, 12 deletions
diff --git a/src/game/AccountMgr.cpp b/src/game/AccountMgr.cpp index adf47f8acab..fd112e6c18e 100644 --- a/src/game/AccountMgr.cpp +++ b/src/game/AccountMgr.cpp @@ -25,11 +25,7 @@ #include "Policies/SingletonImp.h" #include "Util.h" -#ifdef DO_POSTGRESQL -extern DatabasePostgre LoginDatabase; -#else -extern DatabaseMysql LoginDatabase; -#endif +extern DatabaseType LoginDatabase; INSTANTIATE_SINGLETON_1(AccountMgr); 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 << ", "; diff --git a/src/game/Player.h b/src/game/Player.h index 5aac92d0607..f4a089ec1c1 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -902,9 +902,7 @@ class TRINITY_DLL_SPEC PlayerTaxi // Nodes void InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 level); void LoadTaxiMask(const char* data); - void SaveTaxiMask(const char* data); - uint32 GetTaximask( uint8 index ) const { return m_taximask[index]; } bool IsTaximaskNodeKnown(uint32 nodeidx) const { uint8 field = uint8((nodeidx - 1) / 32); @@ -940,11 +938,15 @@ class TRINITY_DLL_SPEC PlayerTaxi return GetTaxiDestination(); } bool empty() const { return m_TaxiDestinations.empty(); } + + friend std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi); private: TaxiMask m_taximask; std::deque<uint32> m_TaxiDestinations; }; +std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi); + class TRINITY_DLL_SPEC Player : public Unit { friend class WorldSession; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 5839fa16d52..1425e069fb3 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7036" + #define REVISION_NR "7038" #endif // __REVISION_NR_H__ |