mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Loading: Drop the field script_version from the table version.
It serves no purpose (and one step closer to remove EAI from the core/db)
This commit is contained in:
1
sql/updates/world/2011_10_28_00_world_version.sql
Normal file
1
sql/updates/world/2011_10_28_00_world_version.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE `version` DROP `script_version`;
|
||||
@@ -295,7 +295,6 @@ void ScriptMgr::Unload()
|
||||
|
||||
void ScriptMgr::LoadDatabase()
|
||||
{
|
||||
sScriptSystemMgr->LoadVersion();
|
||||
sScriptSystemMgr->LoadScriptTexts();
|
||||
sScriptSystemMgr->LoadScriptTextsCustom();
|
||||
sScriptSystemMgr->LoadScriptWaypoints();
|
||||
|
||||
@@ -23,25 +23,6 @@
|
||||
|
||||
ScriptPointVector const SystemMgr::_empty;
|
||||
|
||||
void SystemMgr::LoadVersion()
|
||||
{
|
||||
// Get Version information
|
||||
QueryResult result = WorldDatabase.Query("SELECT script_version FROM version LIMIT 1");
|
||||
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
sLog->outString("TSCR: Database version is: %s", fields[0].GetCString());
|
||||
sLog->outString();
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("TSCR: Missing `version`.`script_version` information.");
|
||||
sLog->outString();
|
||||
}
|
||||
}
|
||||
|
||||
void SystemMgr::LoadScriptTexts()
|
||||
{
|
||||
sLog->outString("TSCR: Loading Script Texts...");
|
||||
|
||||
@@ -64,7 +64,6 @@ class SystemMgr
|
||||
typedef UNORDERED_MAP<uint32, ScriptPointVector> PointMoveMap;
|
||||
|
||||
//Database
|
||||
void LoadVersion();
|
||||
void LoadScriptTexts();
|
||||
void LoadScriptTextsCustom();
|
||||
void LoadScriptWaypoints();
|
||||
|
||||
@@ -2746,22 +2746,18 @@ void World::UpdateMaxSessionCounters()
|
||||
|
||||
void World::LoadDBVersion()
|
||||
{
|
||||
QueryResult result = WorldDatabase.Query("SELECT db_version, script_version, cache_id FROM version LIMIT 1");
|
||||
QueryResult result = WorldDatabase.Query("SELECT db_version, cache_id FROM version LIMIT 1");
|
||||
if (result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
m_DBVersion = fields[0].GetString();
|
||||
m_CreatureEventAIVersion = fields[1].GetString();
|
||||
|
||||
// will be overwrite by config values if different and non-0
|
||||
m_int_configs[CONFIG_CLIENTCACHE_VERSION] = fields[2].GetUInt32();
|
||||
m_int_configs[CONFIG_CLIENTCACHE_VERSION] = fields[1].GetUInt32();
|
||||
}
|
||||
|
||||
if (m_DBVersion.empty())
|
||||
m_DBVersion = "Unknown world database.";
|
||||
|
||||
if (m_CreatureEventAIVersion.empty())
|
||||
m_CreatureEventAIVersion = "Unknown creature EventAI.";
|
||||
}
|
||||
|
||||
void World::ProcessStartEvent()
|
||||
|
||||
@@ -722,10 +722,9 @@ class World
|
||||
|
||||
LocaleConstant GetAvailableDbcLocale(LocaleConstant locale) const { if (m_availableDbcLocaleMask & (1 << locale)) return locale; else return m_defaultDbcLocale; }
|
||||
|
||||
//used World DB version
|
||||
// used World DB version
|
||||
void LoadDBVersion();
|
||||
char const* GetDBVersion() const { return m_DBVersion.c_str(); }
|
||||
char const* GetCreatureEventAIVersion() const { return m_CreatureEventAIVersion.c_str(); }
|
||||
|
||||
void RecordTimeDiff(const char * text, ...);
|
||||
|
||||
@@ -821,13 +820,12 @@ class World
|
||||
//Player Queue
|
||||
Queue m_QueuedPlayer;
|
||||
|
||||
//sessions that are added async
|
||||
// sessions that are added async
|
||||
void AddSession_(WorldSession* s);
|
||||
ACE_Based::LockedQueue<WorldSession*, ACE_Thread_Mutex> addSessQueue;
|
||||
|
||||
//used versions
|
||||
// used versions
|
||||
std::string m_DBVersion;
|
||||
std::string m_CreatureEventAIVersion;
|
||||
|
||||
std::list<std::string> m_Autobroadcasts;
|
||||
|
||||
|
||||
@@ -462,7 +462,6 @@ bool Master::_StartDB()
|
||||
sWorld->LoadDBVersion();
|
||||
|
||||
sLog->outString("Using World DB: %s", sWorld->GetDBVersion());
|
||||
sLog->outString("Using creature EventAI: %s", sWorld->GetCreatureEventAIVersion());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user