*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
This commit is contained in:
@@ -25,11 +25,7 @@
|
|||||||
#include "Policies/SingletonImp.h"
|
#include "Policies/SingletonImp.h"
|
||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
#ifdef DO_POSTGRESQL
|
extern DatabaseType LoginDatabase;
|
||||||
extern DatabasePostgre LoginDatabase;
|
|
||||||
#else
|
|
||||||
extern DatabaseMysql LoginDatabase;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
INSTANTIATE_SINGLETON_1(AccountMgr);
|
INSTANTIATE_SINGLETON_1(AccountMgr);
|
||||||
|
|
||||||
|
|||||||
+13
-5
@@ -253,6 +253,15 @@ uint32 PlayerTaxi::GetCurrentTaxiPath() const
|
|||||||
return path;
|
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 ====================================================
|
//== Player ====================================================
|
||||||
|
|
||||||
const int32 Player::ReputationRank_Length[MAX_REPUTATION_RANK] = {36000, 3000, 3000, 3000, 6000, 12000, 21000, 1000};
|
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 << GetUInt32Value(i) << " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
ss << "', '";
|
|
||||||
|
|
||||||
for( i = 0; i < 8; i++ )
|
|
||||||
ss << m_taxi.GetTaximask(i) << " ";
|
|
||||||
|
|
||||||
ss << "', ";
|
ss << "', ";
|
||||||
|
|
||||||
|
ss << m_taxi; // string with TaxiMaskSize numbers
|
||||||
|
|
||||||
|
ss << ", ";
|
||||||
ss << (inworld ? 1 : 0);
|
ss << (inworld ? 1 : 0);
|
||||||
|
|
||||||
ss << ", ";
|
ss << ", ";
|
||||||
|
|||||||
+4
-2
@@ -902,9 +902,7 @@ class TRINITY_DLL_SPEC PlayerTaxi
|
|||||||
// Nodes
|
// Nodes
|
||||||
void InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 level);
|
void InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint32 level);
|
||||||
void LoadTaxiMask(const char* data);
|
void LoadTaxiMask(const char* data);
|
||||||
void SaveTaxiMask(const char* data);
|
|
||||||
|
|
||||||
uint32 GetTaximask( uint8 index ) const { return m_taximask[index]; }
|
|
||||||
bool IsTaximaskNodeKnown(uint32 nodeidx) const
|
bool IsTaximaskNodeKnown(uint32 nodeidx) const
|
||||||
{
|
{
|
||||||
uint8 field = uint8((nodeidx - 1) / 32);
|
uint8 field = uint8((nodeidx - 1) / 32);
|
||||||
@@ -940,11 +938,15 @@ class TRINITY_DLL_SPEC PlayerTaxi
|
|||||||
return GetTaxiDestination();
|
return GetTaxiDestination();
|
||||||
}
|
}
|
||||||
bool empty() const { return m_TaxiDestinations.empty(); }
|
bool empty() const { return m_TaxiDestinations.empty(); }
|
||||||
|
|
||||||
|
friend std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi);
|
||||||
private:
|
private:
|
||||||
TaxiMask m_taximask;
|
TaxiMask m_taximask;
|
||||||
std::deque<uint32> m_TaxiDestinations;
|
std::deque<uint32> m_TaxiDestinations;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::ostringstream& operator<< (std::ostringstream& ss, PlayerTaxi const& taxi);
|
||||||
|
|
||||||
class TRINITY_DLL_SPEC Player : public Unit
|
class TRINITY_DLL_SPEC Player : public Unit
|
||||||
{
|
{
|
||||||
friend class WorldSession;
|
friend class WorldSession;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7036"
|
#define REVISION_NR "7038"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user