Fix for spell target det crash. Also added a command line arg to world ignore_db that lets you ignore the db conversion process for servers that dont need it.

This commit is contained in:
KimLS
2015-01-25 14:18:12 -08:00
parent fc5266e115
commit 0c7a861caf
2 changed files with 17 additions and 13 deletions
+8 -2
View File
@@ -187,6 +187,7 @@ int main(int argc, char** argv) {
database.LoadLogSettings(Log.log_settings);
Log.StartFileLogs();
bool ignore_db = false;
if (argc >= 2) {
char tmp[2];
if (strcasecmp(argv[1], "help") == 0 || strcasecmp(argv[1], "?") == 0 || strcasecmp(argv[1], "/?") == 0 || strcasecmp(argv[1], "-?") == 0 || strcasecmp(argv[1], "-h") == 0 || strcasecmp(argv[1], "-help") == 0) {
@@ -271,6 +272,9 @@ int main(int argc, char** argv) {
std::cout << "Usage: world startzone zoneshortname" << std::endl;
return 0;
}
else if(strcasecmp(argv[1], "ignore_db") == 0) {
ignore_db = true;
}
else {
std::cerr << "Error, unknown command line option" << std::endl;
return 1;
@@ -284,8 +288,10 @@ int main(int argc, char** argv) {
Log.Out(Logs::General, Logs::World_Server, "HTTP world service disabled.");
}
Log.Out(Logs::General, Logs::World_Server, "Checking Database Conversions..");
database.CheckDatabaseConversions();
if(!ignore_db) {
Log.Out(Logs::General, Logs::World_Server, "Checking Database Conversions..");
database.CheckDatabaseConversions();
}
Log.Out(Logs::General, Logs::World_Server, "Loading variables..");
database.LoadVariables();
Log.Out(Logs::General, Logs::World_Server, "Loading zones..");