Cleanup database.h header and add database_conversions.cpp file

This commit is contained in:
Akkadius
2015-01-24 23:43:00 -06:00
parent 968e936114
commit 06b8ce6017
3 changed files with 2070 additions and 132 deletions
-34
View File
@@ -849,40 +849,6 @@ void Database::GetCharName(uint32 char_id, char* name) {
}
}
bool Database::CheckDatabaseConversions() {
CheckDatabaseConvertPPDeblob();
CheckDatabaseConvertBotsPostPPDeblob();
CheckDatabaseConvertCorpseDeblob();
/* Fetch Automatic Database Upgrade Script */
// if (!std::ifstream("db_update.pl")){
std::cout << "Pulling down automatic database upgrade script...\n" << std::endl;
#ifdef _WIN32
system("perl -MLWP::UserAgent -e \"require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->get('https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl'); if ($response->is_success){ open(FILE, '> db_update.pl'); print FILE $response->decoded_content; close(FILE); }\"");
#else
system("wget -O db_update.pl https://raw.githubusercontent.com/EQEmu/Server/master/utils/scripts/db_update.pl");
#endif
// }
/*
Automatic Database Upgrade Script
Script: db_update.pl V 1 - the number that world passes to the script will
force the script to check for a newer version to update itself with
db_update.pl ran_from_world - won't bring up a menu if your database versions match
db_update.pl - ran standalone will bring up a menu prompt
*/
/* Check for a new version of this script, the arg passed
would have to be higher than the copy they have downloaded
locally and they will re fetch */
system("perl db_update.pl V 1");
/* Run Automatic Database Upgrade Script */
system("perl db_update.pl ran_from_world");
return true;
}
bool Database::LoadVariables() {
char *query = nullptr;