mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[7643] Allow set, store and output creture EventAI data version in addition to world DB and script library versions.
This commit is contained in:
parent
2be68b15cd
commit
34d69bbfdd
10 changed files with 37 additions and 9 deletions
|
|
@ -2829,14 +2829,19 @@ void World::UpdateMaxSessionCounters()
|
|||
|
||||
void World::LoadDBVersion()
|
||||
{
|
||||
QueryResult* result = WorldDatabase.Query("SELECT version FROM db_version LIMIT 1");
|
||||
QueryResult* result = WorldDatabase.Query("SELECT version, creature_ai_version FROM db_version LIMIT 1");
|
||||
if(result)
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
m_DBVersion = fields[0].GetString();
|
||||
m_DBVersion = fields[0].GetCppString();
|
||||
m_CreatureEventAIVersion = fields[1].GetCppString();
|
||||
delete result;
|
||||
}
|
||||
else
|
||||
m_DBVersion = "unknown world database";
|
||||
|
||||
if(m_DBVersion.empty())
|
||||
m_DBVersion = "Unknown world database.";
|
||||
|
||||
if(m_CreatureEventAIVersion.empty())
|
||||
m_CreatureEventAIVersion = "Unknown creature EventAI.";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue