1st commit

This commit is contained in:
UltraNix
2021-12-06 11:16:04 +01:00
parent 7b92ac90ae
commit 2cab3258bb
26 changed files with 557 additions and 19 deletions

View File

@@ -456,6 +456,14 @@ bool StartDB()
if (!loader.Load())
return false;
#ifdef PLAYERBOTS
DatabaseLoader playerbotLoader("server.playerbot");
playerbotLoader.SetUpdateFlags(sConfigMgr->GetOption<bool>("Playerbot.Updates.EnableDatabases", true) ? DatabaseLoader::DATABASE_PLAYERBOT : 0);
playerbotLoader.AddDatabase(PlayerbotDatabase, "Playerbot");
if (!playerbotLoader.Load())
return false;
#endif
///- Get the realm Id from the configuration file
realm.Id.Realm = sConfigMgr->GetIntDefault("RealmID", 0);
if (!realm.Id.Realm)
@@ -499,6 +507,10 @@ void StopDB()
WorldDatabase.Close();
LoginDatabase.Close();
#ifdef PLAYERBOTS
PlayerbotDatabase.Close();
#endif
MySQL::Library_End();
}