mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
feat(Core/Command): server debug (#6007)
* initial work * fix query * load * clean up * remove from startup * ACE * remove static * Update MySQLThreading.cpp * not used * Update MySQLThreading.cpp * unit testing * Update WorldMock.h * show Boost ver * Update WorldMock.h * include * Now we have boost::filesystem woo * fix build * fix typo
This commit is contained in:
@@ -581,7 +581,11 @@ public:
|
||||
virtual void UpdateRealmCharCount(uint32 accid) = 0;
|
||||
virtual LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const = 0;
|
||||
virtual void LoadDBVersion() = 0;
|
||||
virtual void LoadDBRevision() = 0;
|
||||
virtual char const* GetDBVersion() const = 0;
|
||||
virtual char const* GetWorldDBRevision() const = 0;
|
||||
virtual char const* GetCharacterDBRevision() const = 0;
|
||||
virtual char const* GetAuthDBRevision() const = 0;
|
||||
virtual void LoadAutobroadcasts() = 0;
|
||||
virtual void UpdateAreaDependentAuras() = 0;
|
||||
virtual uint32 GetCleaningFlags() const = 0;
|
||||
|
||||
@@ -3109,6 +3109,45 @@ void World::LoadDBVersion()
|
||||
m_DBVersion = "Unknown world database.";
|
||||
}
|
||||
|
||||
void World::LoadDBRevision()
|
||||
{
|
||||
QueryResult resultWorld = WorldDatabase.Query("SELECT date FROM version_db_world ORDER BY date DESC LIMIT 1");
|
||||
QueryResult resultCharacter = CharacterDatabase.Query("SELECT date FROM version_db_characters ORDER BY date DESC LIMIT 1");
|
||||
QueryResult resultAuth = LoginDatabase.Query("SELECT date FROM version_db_auth ORDER BY date DESC LIMIT 1");
|
||||
|
||||
if (resultWorld)
|
||||
{
|
||||
Field* fields = resultWorld->Fetch();
|
||||
|
||||
m_WorldDBRevision = fields[0].GetString();
|
||||
}
|
||||
if (resultCharacter)
|
||||
{
|
||||
Field* fields = resultCharacter->Fetch();
|
||||
|
||||
m_CharacterDBRevision = fields[0].GetString();
|
||||
}
|
||||
if (resultAuth)
|
||||
{
|
||||
Field* fields = resultAuth->Fetch();
|
||||
|
||||
m_AuthDBRevision = fields[0].GetString();
|
||||
}
|
||||
|
||||
if (m_WorldDBRevision.empty())
|
||||
{
|
||||
m_WorldDBRevision = "Unkown World Database Revision";
|
||||
}
|
||||
if (m_CharacterDBRevision.empty())
|
||||
{
|
||||
m_CharacterDBRevision = "Unkown Character Database Revision";
|
||||
}
|
||||
if (m_AuthDBRevision.empty())
|
||||
{
|
||||
m_AuthDBRevision = "Unkown Auth Database Revision";
|
||||
}
|
||||
}
|
||||
|
||||
void World::UpdateAreaDependentAuras()
|
||||
{
|
||||
SessionMap::const_iterator itr;
|
||||
|
||||
@@ -370,7 +370,11 @@ public:
|
||||
|
||||
// used World DB version
|
||||
void LoadDBVersion();
|
||||
void LoadDBRevision();
|
||||
char const* GetDBVersion() const { return m_DBVersion.c_str(); }
|
||||
char const* GetWorldDBRevision() const { return m_WorldDBRevision.c_str(); }
|
||||
char const* GetCharacterDBRevision() const { return m_CharacterDBRevision.c_str(); }
|
||||
char const* GetAuthDBRevision() const { return m_AuthDBRevision.c_str(); }
|
||||
|
||||
void LoadAutobroadcasts();
|
||||
|
||||
@@ -478,6 +482,9 @@ private:
|
||||
|
||||
// used versions
|
||||
std::string m_DBVersion;
|
||||
std::string m_WorldDBRevision;
|
||||
std::string m_CharacterDBRevision;
|
||||
std::string m_AuthDBRevision;
|
||||
|
||||
typedef std::map<uint8, std::string> AutobroadcastsMap;
|
||||
AutobroadcastsMap m_Autobroadcasts;
|
||||
|
||||
Reference in New Issue
Block a user