mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-26 01:12:26 +00:00
Restructure and refactoring of database convert/upgrade check routine, breaking out to individual functions
This commit is contained in:
parent
e4f45d7b35
commit
3c2b8d13b9
@ -896,6 +896,27 @@ static inline void loadbar(unsigned int x, unsigned int n, unsigned int w = 50)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Database::CheckDatabaseConversions() {
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Run Automatic Database Upgrade Script */
|
||||||
|
system("perl db_update.pl ran_from_world");
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Database::CheckDatabaseConvertPPDeblob(){
|
||||||
unsigned int lengths;
|
unsigned int lengths;
|
||||||
unsigned int lengths_e;
|
unsigned int lengths_e;
|
||||||
std::string squery;
|
std::string squery;
|
||||||
@ -1318,7 +1339,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
|
|
||||||
/* Done */
|
/* Done */
|
||||||
printf("Starting conversion...\n\n");
|
printf("Starting conversion...\n\n");
|
||||||
}
|
|
||||||
|
|
||||||
int char_iter_count = 0;
|
int char_iter_count = 0;
|
||||||
rquery = StringFormat("SELECT `id` FROM `character_`");
|
rquery = StringFormat("SELECT `id` FROM `character_`");
|
||||||
@ -1726,7 +1747,8 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
rquery = StringFormat("REPLACE INTO `character_alternate_abilities` (id, slot, aa_id, aa_value)"
|
rquery = StringFormat("REPLACE INTO `character_alternate_abilities` (id, slot, aa_id, aa_value)"
|
||||||
" VALUES (%u, %u, %u, %u)", character_id, i, pp->aa_array[i].AA, pp->aa_array[i].value);
|
" VALUES (%u, %u, %u, %u)", character_id, i, pp->aa_array[i].AA, pp->aa_array[i].value);
|
||||||
first_entry = 1;
|
first_entry = 1;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
rquery = rquery + StringFormat(", (%u, %u, %u, %u)", character_id, i, pp->aa_array[i].AA, pp->aa_array[i].value);
|
rquery = rquery + StringFormat(", (%u, %u, %u, %u)", character_id, i, pp->aa_array[i].AA, pp->aa_array[i].value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1734,7 +1756,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||||
|
|
||||||
/* Run Bind Home Convert */
|
/* Run Bind Home Convert */
|
||||||
if(pp->binds[4].zoneId < 999 && !_ISNAN_(pp->binds[4].x) && !_ISNAN_(pp->binds[4].y) && !_ISNAN_(pp->binds[4].z) && !_ISNAN_(pp->binds[4].heading)) {
|
if (pp->binds[4].zoneId < 999 && !_ISNAN_(pp->binds[4].x) && !_ISNAN_(pp->binds[4].y) && !_ISNAN_(pp->binds[4].z) && !_ISNAN_(pp->binds[4].heading)) {
|
||||||
rquery = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
rquery = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
||||||
" VALUES (%u, %u, %u, %f, %f, %f, %f, 1)",
|
" VALUES (%u, %u, %u, %f, %f, %f, %f, 1)",
|
||||||
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading);
|
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading);
|
||||||
@ -1742,7 +1764,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Run Bind Convert */
|
/* Run Bind Convert */
|
||||||
if(pp->binds[0].zoneId < 999 && !_ISNAN_(pp->binds[0].x) && !_ISNAN_(pp->binds[0].y) && !_ISNAN_(pp->binds[0].z) && !_ISNAN_(pp->binds[0].heading)) {
|
if (pp->binds[0].zoneId < 999 && !_ISNAN_(pp->binds[0].x) && !_ISNAN_(pp->binds[0].y) && !_ISNAN_(pp->binds[0].z) && !_ISNAN_(pp->binds[0].heading)) {
|
||||||
rquery = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
rquery = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
||||||
" VALUES (%u, %u, %u, %f, %f, %f, %f, 0)",
|
" VALUES (%u, %u, %u, %f, %f, %f, %f, 0)",
|
||||||
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading);
|
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading);
|
||||||
@ -1800,7 +1822,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
/* Run Discipline Convert */
|
/* Run Discipline Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < MAX_PP_DISCIPLINES; i++){
|
for (i = 0; i < MAX_PP_DISCIPLINES; i++){
|
||||||
if(pp->disciplines.values[i] > 0 && pp->disciplines.values[i] < 60000){
|
if (pp->disciplines.values[i] > 0 && pp->disciplines.values[i] < 60000){
|
||||||
if (first_entry != 1){
|
if (first_entry != 1){
|
||||||
rquery = StringFormat("REPLACE INTO `character_disciplines` (id, slot_id, disc_id) VALUES (%u, %u, %u)", character_id, i, pp->disciplines.values[i]);
|
rquery = StringFormat("REPLACE INTO `character_disciplines` (id, slot_id, disc_id) VALUES (%u, %u, %u)", character_id, i, pp->disciplines.values[i]);
|
||||||
first_entry = 1;
|
first_entry = 1;
|
||||||
@ -1836,7 +1858,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
/* Run Bandolier Convert */
|
/* Run Bandolier Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++){
|
for (i = 0; i < EmuConstants::BANDOLIERS_COUNT; i++){
|
||||||
if(strlen(pp->bandoliers[i].name) < 32) {
|
if (strlen(pp->bandoliers[i].name) < 32) {
|
||||||
for (int si = 0; si < EmuConstants::BANDOLIER_SIZE; si++){
|
for (int si = 0; si < EmuConstants::BANDOLIER_SIZE; si++){
|
||||||
if (pp->bandoliers[i].items[si].item_id > 0){
|
if (pp->bandoliers[i].items[si].item_id > 0){
|
||||||
if (first_entry != 1) {
|
if (first_entry != 1) {
|
||||||
@ -1865,7 +1887,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
/* Run Leadership AA Convert */
|
/* Run Leadership AA Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < MAX_LEADERSHIP_AA_ARRAY; i++){
|
for (i = 0; i < MAX_LEADERSHIP_AA_ARRAY; i++){
|
||||||
if(pp->leader_abilities.ranks[i] > 0 && pp->leader_abilities.ranks[i] < 6){
|
if (pp->leader_abilities.ranks[i] > 0 && pp->leader_abilities.ranks[i] < 6){
|
||||||
if (first_entry != 1){
|
if (first_entry != 1){
|
||||||
rquery = StringFormat("REPLACE INTO `character_leadership_abilities` (id, slot, rank) VALUES (%i, %u, %u)", character_id, i, pp->leader_abilities.ranks[i]);
|
rquery = StringFormat("REPLACE INTO `character_leadership_abilities` (id, slot, rank) VALUES (%i, %u, %u)", character_id, i, pp->leader_abilities.ranks[i]);
|
||||||
first_entry = 1;
|
first_entry = 1;
|
||||||
@ -1881,10 +1903,12 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
printf("\n\nRenaming `character_` table to `character_old`, this is a LARGE table so when you don't need it anymore, I would suggest deleting it yourself...\n");
|
printf("\n\nRenaming `character_` table to `character_old`, this is a LARGE table so when you don't need it anymore, I would suggest deleting it yourself...\n");
|
||||||
printf("\n\nCharacter blob conversion complete, continuing world bootup...\n");
|
printf("\n\nCharacter blob conversion complete, continuing world bootup...\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Database::CheckDatabaseConvertBotsPostPPDeblob(){
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
|
|
||||||
int runbotsconvert = 0;
|
int runbotsconvert = 0;
|
||||||
|
|
||||||
/* Check For Legacy Bot References */
|
/* Check For Legacy Bot References */
|
||||||
@ -2037,7 +2061,10 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Database::CheckDatabaseConvertCorpseDeblob(){
|
||||||
DBPlayerCorpse_Struct_temp* dbpc;
|
DBPlayerCorpse_Struct_temp* dbpc;
|
||||||
classic_db_temp::DBPlayerCorpse_Struct_temp* dbpc_c;
|
classic_db_temp::DBPlayerCorpse_Struct_temp* dbpc_c;
|
||||||
uint32 in_datasize;
|
uint32 in_datasize;
|
||||||
@ -2046,13 +2073,13 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
std::string scquery;
|
std::string scquery;
|
||||||
int8 first_entry = 0;
|
int8 first_entry = 0;
|
||||||
|
|
||||||
rquery = StringFormat("SHOW COLUMNS FROM `character_corpses` LIKE 'data'");
|
std::string rquery = StringFormat("SHOW COLUMNS FROM `character_corpses` LIKE 'data'");
|
||||||
results = QueryDatabase(rquery);
|
auto results = QueryDatabase(rquery);
|
||||||
if (results.RowCount() != 0){
|
if (results.RowCount() != 0){
|
||||||
rquery = StringFormat("SELECT DISTINCT charid FROM character_corpses");
|
rquery = StringFormat("SELECT DISTINCT charid FROM character_corpses");
|
||||||
results = QueryDatabase(rquery);
|
results = QueryDatabase(rquery);
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
squery = StringFormat("SELECT id, charname, data, time_of_death, is_rezzed FROM character_corpses WHERE `charid` = %i", atoi(row[0]));
|
std::string squery = StringFormat("SELECT id, charname, data, time_of_death, is_rezzed FROM character_corpses WHERE `charid` = %i", atoi(row[0]));
|
||||||
auto results2 = QueryDatabase(squery);
|
auto results2 = QueryDatabase(squery);
|
||||||
for (auto row2 = results2.begin(); row2 != results2.end(); ++row2) {
|
for (auto row2 = results2.begin(); row2 != results2.end(); ++row2) {
|
||||||
in_datasize = results2.LengthOfColumn(2);
|
in_datasize = results2.LengthOfColumn(2);
|
||||||
@ -2305,21 +2332,6 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
}
|
}
|
||||||
QueryDatabase(StringFormat("ALTER TABLE `character_corpses` DROP COLUMN `data`"));
|
QueryDatabase(StringFormat("ALTER TABLE `character_corpses` DROP COLUMN `data`"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 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
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Run Automatic Database Upgrade Script */
|
|
||||||
system("perl db_update.pl ran_from_world");
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3864,9 +3876,7 @@ bool Database::RemoveClientsFromInstance(uint16 instance_id)
|
|||||||
return results.Success();
|
return results.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Database::CheckInstanceExists(uint16 instance_id)
|
bool Database::CheckInstanceExists(uint16 instance_id) {
|
||||||
{
|
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT * FROM instance_list where id=%u", instance_id);
|
std::string query = StringFormat("SELECT * FROM instance_list where id=%u", instance_id);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
@ -3879,15 +3889,12 @@ bool Database::CheckInstanceExists(uint16 instance_id)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::BuryCorpsesInInstance(uint16 instance_id)
|
void Database::BuryCorpsesInInstance(uint16 instance_id) {
|
||||||
{
|
std::string query = StringFormat("UPDATE `character_corpses` SET `is_buried` = 1, `instance_id` =0 WHERE `instance_id` = %u", instance_id);
|
||||||
|
|
||||||
std::string query = StringFormat("UPDATE character_corpses SET IsBurried=1, instanceid=0 WHERE instanceid=%u", instance_id);
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Database::GetInstanceVersion(uint16 instance_id)
|
uint16 Database::GetInstanceVersion(uint16 instance_id) {
|
||||||
{
|
|
||||||
if(instance_id == 0)
|
if(instance_id == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -3904,8 +3911,7 @@ uint16 Database::GetInstanceVersion(uint16 instance_id)
|
|||||||
return atoi(row[0]);
|
return atoi(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16 Database::GetInstanceID(const char* zone, uint32 charid, int16 version)
|
uint16 Database::GetInstanceID(const char* zone, uint32 charid, int16 version) {
|
||||||
{
|
|
||||||
|
|
||||||
std::string query = StringFormat("SELECT instance_list.id FROM instance_list, instance_list_player "
|
std::string query = StringFormat("SELECT instance_list.id FROM instance_list, instance_list_player "
|
||||||
"WHERE instance_list.zone=%u AND instance_list.version=%u AND instance_list.id=instance_list_player.id AND "
|
"WHERE instance_list.zone=%u AND instance_list.version=%u AND instance_list.id=instance_list_player.id AND "
|
||||||
|
|||||||
@ -301,7 +301,11 @@ public:
|
|||||||
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
|
void SetRaidGroupLeaderInfo(uint32 gid, uint32 rid);
|
||||||
void ClearRaidLeader(uint32 gid = 0xFFFFFFFF, uint32 rid = 0);
|
void ClearRaidLeader(uint32 gid = 0xFFFFFFFF, uint32 rid = 0);
|
||||||
|
|
||||||
|
/* Database Conversions*/
|
||||||
bool CheckDatabaseConversions();
|
bool CheckDatabaseConversions();
|
||||||
|
bool CheckDatabaseConvertPPDeblob();
|
||||||
|
bool CheckDatabaseConvertCorpseDeblob();
|
||||||
|
bool CheckDatabaseConvertBotsPostPPDeblob();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Database Variables
|
* Database Variables
|
||||||
|
|||||||
@ -1215,9 +1215,9 @@ ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, int16 charges)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int32 SharedDatabase::DeleteStalePlayerCorpses() {
|
int32 SharedDatabase::DeleteStalePlayerCorpses() {
|
||||||
if(RuleB(Zone, EnableShadowrest))
|
if(RuleB(Zone, EnableShadowrest)) {
|
||||||
{
|
std::string query = StringFormat(
|
||||||
std::string query = StringFormat("UPDATE character_corpses SET IsBurried = 1 WHERE IsBurried = 0 AND "
|
"UPDATE `character_corpses` SET `is_buried` = 1 WHERE `is_buried` = 0 AND "
|
||||||
"(UNIX_TIMESTAMP() - UNIX_TIMESTAMP(time_of_death)) > %d AND NOT time_of_death = 0",
|
"(UNIX_TIMESTAMP() - UNIX_TIMESTAMP(time_of_death)) > %d AND NOT time_of_death = 0",
|
||||||
(RuleI(Character, CorpseDecayTimeMS) / 1000));
|
(RuleI(Character, CorpseDecayTimeMS) / 1000));
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
@ -1227,7 +1227,8 @@ int32 SharedDatabase::DeleteStalePlayerCorpses() {
|
|||||||
return results.RowsAffected();
|
return results.RowsAffected();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string query = StringFormat("DELETE FROM character_corpses WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(time_of_death)) > %d "
|
std::string query = StringFormat(
|
||||||
|
"DELETE FROM `character_corpses` WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(time_of_death)) > %d "
|
||||||
"AND NOT time_of_death = 0", (RuleI(Character, CorpseDecayTimeMS) / 1000));
|
"AND NOT time_of_death = 0", (RuleI(Character, CorpseDecayTimeMS) / 1000));
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
@ -1236,16 +1237,6 @@ int32 SharedDatabase::DeleteStalePlayerCorpses() {
|
|||||||
return results.RowsAffected();
|
return results.RowsAffected();
|
||||||
}
|
}
|
||||||
|
|
||||||
int32 SharedDatabase::DeleteStalePlayerBackups() {
|
|
||||||
// 1209600 seconds = 2 weeks
|
|
||||||
const std::string query = "DELETE FROM player_corpses_backup WHERE (UNIX_TIMESTAMP() - UNIX_TIMESTAMP(time_of_death)) > 1209600";
|
|
||||||
auto results = QueryDatabase(query);
|
|
||||||
if (!results.Success())
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return results.RowsAffected();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SharedDatabase::GetCommandSettings(std::map<std::string,uint8> &commands) {
|
bool SharedDatabase::GetCommandSettings(std::map<std::string,uint8> &commands) {
|
||||||
|
|
||||||
const std::string query = "SELECT command, access FROM commands";
|
const std::string query = "SELECT command, access FROM commands";
|
||||||
|
|||||||
@ -41,7 +41,6 @@ public:
|
|||||||
uint8 GetGMSpeed(uint32 account_id);
|
uint8 GetGMSpeed(uint32 account_id);
|
||||||
bool SetHideMe(uint32 account_id, uint8 hideme);
|
bool SetHideMe(uint32 account_id, uint8 hideme);
|
||||||
int32 DeleteStalePlayerCorpses();
|
int32 DeleteStalePlayerCorpses();
|
||||||
int32 DeleteStalePlayerBackups();
|
|
||||||
void LoadCharacterInspectMessage(uint32 character_id, InspectMessage_Struct* message);
|
void LoadCharacterInspectMessage(uint32 character_id, InspectMessage_Struct* message);
|
||||||
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
void SaveCharacterInspectMessage(uint32 character_id, const InspectMessage_Struct* message);
|
||||||
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
|
void GetBotInspectMessage(uint32 botid, InspectMessage_Struct* message);
|
||||||
|
|||||||
@ -336,9 +336,6 @@ int main(int argc, char** argv) {
|
|||||||
_log(WORLD__INIT, "Reboot zone modes %s",holdzones ? "ON" : "OFF");
|
_log(WORLD__INIT, "Reboot zone modes %s",holdzones ? "ON" : "OFF");
|
||||||
|
|
||||||
_log(WORLD__INIT, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
|
_log(WORLD__INIT, "Deleted %i stale player corpses from database", database.DeleteStalePlayerCorpses());
|
||||||
if (RuleB(World, DeleteStaleCorpeBackups) == true) {
|
|
||||||
_log(WORLD__INIT, "Deleted %i stale player backups from database", database.DeleteStalePlayerBackups());
|
|
||||||
}
|
|
||||||
|
|
||||||
_log(WORLD__INIT, "Loading adventures...");
|
_log(WORLD__INIT, "Loading adventures...");
|
||||||
if(!adventure_manager.LoadAdventureTemplates())
|
if(!adventure_manager.LoadAdventureTemplates())
|
||||||
|
|||||||
@ -3699,7 +3699,6 @@ bool ZoneDatabase::LoadCharacterCorpseData(uint32 corpse_id, PlayerCorpse_Struct
|
|||||||
corpse_id
|
corpse_id
|
||||||
);
|
);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
std::cout << query << std::endl;
|
|
||||||
uint16 i = 0;
|
uint16 i = 0;
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
pcs->locked = atoi(row[i++]); // is_locked,
|
pcs->locked = atoi(row[i++]); // is_locked,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user