mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-04 03:23:48 +00:00
Merge branch 'master' into Playerbot
# Conflicts: # src/server/game/World/IWorld.h # src/server/game/World/World.cpp # src/server/game/World/World.h # src/server/scripts/Commands/cs_server.cpp
This commit is contained in:
@@ -583,11 +583,7 @@ public:
|
||||
virtual void UpdateRealmCharCount(uint32 accid) = 0;
|
||||
[[nodiscard]] virtual LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const = 0;
|
||||
virtual void LoadDBVersion() = 0;
|
||||
virtual void LoadDBRevision() = 0;
|
||||
[[nodiscard]] virtual char const* GetDBVersion() const = 0;
|
||||
[[nodiscard]] virtual char const* GetWorldDBRevision() const = 0;
|
||||
[[nodiscard]] virtual char const* GetCharacterDBRevision() const = 0;
|
||||
[[nodiscard]] virtual char const* GetAuthDBRevision() const = 0;
|
||||
#ifdef MOD_PLAYERBOTS
|
||||
[[nodiscard]] virtual char const* GetPlayerbotsDBRevision() const = 0;
|
||||
#endif
|
||||
|
||||
@@ -3274,49 +3274,6 @@ 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].Get<std::string>();
|
||||
}
|
||||
if (resultCharacter)
|
||||
{
|
||||
Field* fields = resultCharacter->Fetch();
|
||||
|
||||
m_CharacterDBRevision = fields[0].Get<std::string>();
|
||||
}
|
||||
if (resultAuth)
|
||||
{
|
||||
Field* fields = resultAuth->Fetch();
|
||||
|
||||
m_AuthDBRevision = fields[0].Get<std::string>();
|
||||
}
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
#ifdef MOD_PLAYERBOTS
|
||||
sScriptMgr->OnDatabaseGetDBRevision(m_PlayerbotsDBRevision);
|
||||
#endif
|
||||
}
|
||||
|
||||
void World::UpdateAreaDependentAuras()
|
||||
{
|
||||
SessionMap::const_iterator itr;
|
||||
|
||||
@@ -339,11 +339,7 @@ public:
|
||||
|
||||
// used World DB version
|
||||
void LoadDBVersion() override;
|
||||
void LoadDBRevision() override;
|
||||
[[nodiscard]] char const* GetDBVersion() const override { return m_DBVersion.c_str(); }
|
||||
[[nodiscard]] char const* GetWorldDBRevision() const override { return m_WorldDBRevision.c_str(); }
|
||||
[[nodiscard]] char const* GetCharacterDBRevision() const override { return m_CharacterDBRevision.c_str(); }
|
||||
[[nodiscard]] char const* GetAuthDBRevision() const override { return m_AuthDBRevision.c_str(); }
|
||||
#ifdef MOD_PLAYERBOTS
|
||||
[[nodiscard]] char const* GetPlayerbotsDBRevision() const { return m_PlayerbotsDBRevision.c_str(); }
|
||||
#endif
|
||||
@@ -445,9 +441,6 @@ private:
|
||||
|
||||
// used versions
|
||||
std::string m_DBVersion;
|
||||
std::string m_WorldDBRevision;
|
||||
std::string m_CharacterDBRevision;
|
||||
std::string m_AuthDBRevision;
|
||||
#ifdef MOD_PLAYERBOTS
|
||||
std::string m_PlayerbotsDBRevision;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user