mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-23 16:21:30 +00:00
Update repositories
This commit is contained in:
parent
bda13383ef
commit
3ffb5299a8
@ -35,15 +35,12 @@
|
||||
class BaseCharCreateCombinationsRepository {
|
||||
public:
|
||||
struct CharCreateCombinations {
|
||||
int allocation_id;
|
||||
int race;
|
||||
int class;
|
||||
int deity;
|
||||
int start_zone;
|
||||
int expansions_req;
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
int allocation_id;
|
||||
int race;
|
||||
int class;
|
||||
int deity;
|
||||
int start_zone;
|
||||
int expansions_req;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -60,9 +57,6 @@ public:
|
||||
"deity",
|
||||
"start_zone",
|
||||
"expansions_req",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
};
|
||||
}
|
||||
|
||||
@ -119,9 +113,6 @@ public:
|
||||
entry.deity = 0;
|
||||
entry.start_zone = 0;
|
||||
entry.expansions_req = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -162,9 +153,6 @@ public:
|
||||
entry.deity = atoi(row[3]);
|
||||
entry.start_zone = atoi(row[4]);
|
||||
entry.expansions_req = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -202,9 +190,6 @@ public:
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(char_create_combinations_entry.deity));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(char_create_combinations_entry.start_zone));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(char_create_combinations_entry.expansions_req));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(char_create_combinations_entry.min_expansion));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(char_create_combinations_entry.max_expansion));
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(char_create_combinations_entry.content_flags) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -231,9 +216,6 @@ public:
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.deity));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.start_zone));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.expansions_req));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(char_create_combinations_entry.content_flags) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -268,9 +250,6 @@ public:
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.deity));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.start_zone));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.expansions_req));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(char_create_combinations_entry.content_flags) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -310,9 +289,6 @@ public:
|
||||
entry.deity = atoi(row[3]);
|
||||
entry.start_zone = atoi(row[4]);
|
||||
entry.expansions_req = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -343,9 +319,6 @@ public:
|
||||
entry.deity = atoi(row[3]);
|
||||
entry.start_zone = atoi(row[4]);
|
||||
entry.expansions_req = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -69,6 +69,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -113,6 +114,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -163,40 +165,41 @@ public:
|
||||
{
|
||||
Doors entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.doorid = 0;
|
||||
entry.zone = "";
|
||||
entry.version = 0;
|
||||
entry.name = "";
|
||||
entry.pos_y = 0;
|
||||
entry.pos_x = 0;
|
||||
entry.pos_z = 0;
|
||||
entry.heading = 0;
|
||||
entry.opentype = 0;
|
||||
entry.guild = 0;
|
||||
entry.lockpick = 0;
|
||||
entry.keyitem = 0;
|
||||
entry.nokeyring = 0;
|
||||
entry.triggerdoor = 0;
|
||||
entry.triggertype = 0;
|
||||
entry.disable_timer = 0;
|
||||
entry.doorisopen = 0;
|
||||
entry.door_param = 0;
|
||||
entry.dest_zone = "NONE";
|
||||
entry.dest_instance = 0;
|
||||
entry.dest_x = 0;
|
||||
entry.dest_y = 0;
|
||||
entry.dest_z = 0;
|
||||
entry.dest_heading = 0;
|
||||
entry.invert_state = 0;
|
||||
entry.incline = 0;
|
||||
entry.size = 100;
|
||||
entry.buffer = 0;
|
||||
entry.client_version_mask = 4294967295;
|
||||
entry.is_ldon_door = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.doorid = 0;
|
||||
entry.zone = "";
|
||||
entry.version = 0;
|
||||
entry.name = "";
|
||||
entry.pos_y = 0;
|
||||
entry.pos_x = 0;
|
||||
entry.pos_z = 0;
|
||||
entry.heading = 0;
|
||||
entry.opentype = 0;
|
||||
entry.guild = 0;
|
||||
entry.lockpick = 0;
|
||||
entry.keyitem = 0;
|
||||
entry.nokeyring = 0;
|
||||
entry.triggerdoor = 0;
|
||||
entry.triggertype = 0;
|
||||
entry.disable_timer = 0;
|
||||
entry.doorisopen = 0;
|
||||
entry.door_param = 0;
|
||||
entry.dest_zone = "NONE";
|
||||
entry.dest_instance = 0;
|
||||
entry.dest_x = 0;
|
||||
entry.dest_y = 0;
|
||||
entry.dest_z = 0;
|
||||
entry.dest_heading = 0;
|
||||
entry.invert_state = 0;
|
||||
entry.incline = 0;
|
||||
entry.size = 100;
|
||||
entry.buffer = 0;
|
||||
entry.client_version_mask = 4294967295;
|
||||
entry.is_ldon_door = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -231,40 +234,41 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Doors entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.doorid = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.name = row[4] ? row[4] : "";
|
||||
entry.pos_y = static_cast<float>(atof(row[5]));
|
||||
entry.pos_x = static_cast<float>(atof(row[6]));
|
||||
entry.pos_z = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.opentype = atoi(row[9]);
|
||||
entry.guild = atoi(row[10]);
|
||||
entry.lockpick = atoi(row[11]);
|
||||
entry.keyitem = atoi(row[12]);
|
||||
entry.nokeyring = atoi(row[13]);
|
||||
entry.triggerdoor = atoi(row[14]);
|
||||
entry.triggertype = atoi(row[15]);
|
||||
entry.disable_timer = atoi(row[16]);
|
||||
entry.doorisopen = atoi(row[17]);
|
||||
entry.door_param = atoi(row[18]);
|
||||
entry.dest_zone = row[19] ? row[19] : "";
|
||||
entry.dest_instance = atoi(row[20]);
|
||||
entry.dest_x = static_cast<float>(atof(row[21]));
|
||||
entry.dest_y = static_cast<float>(atof(row[22]));
|
||||
entry.dest_z = static_cast<float>(atof(row[23]));
|
||||
entry.dest_heading = static_cast<float>(atof(row[24]));
|
||||
entry.invert_state = atoi(row[25]);
|
||||
entry.incline = atoi(row[26]);
|
||||
entry.size = atoi(row[27]);
|
||||
entry.buffer = static_cast<float>(atof(row[28]));
|
||||
entry.client_version_mask = atoi(row[29]);
|
||||
entry.is_ldon_door = atoi(row[30]);
|
||||
entry.min_expansion = atoi(row[31]);
|
||||
entry.max_expansion = atoi(row[32]);
|
||||
entry.content_flags = row[33] ? row[33] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.doorid = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.name = row[4] ? row[4] : "";
|
||||
entry.pos_y = static_cast<float>(atof(row[5]));
|
||||
entry.pos_x = static_cast<float>(atof(row[6]));
|
||||
entry.pos_z = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.opentype = atoi(row[9]);
|
||||
entry.guild = atoi(row[10]);
|
||||
entry.lockpick = atoi(row[11]);
|
||||
entry.keyitem = atoi(row[12]);
|
||||
entry.nokeyring = atoi(row[13]);
|
||||
entry.triggerdoor = atoi(row[14]);
|
||||
entry.triggertype = atoi(row[15]);
|
||||
entry.disable_timer = atoi(row[16]);
|
||||
entry.doorisopen = atoi(row[17]);
|
||||
entry.door_param = atoi(row[18]);
|
||||
entry.dest_zone = row[19] ? row[19] : "";
|
||||
entry.dest_instance = atoi(row[20]);
|
||||
entry.dest_x = static_cast<float>(atof(row[21]));
|
||||
entry.dest_y = static_cast<float>(atof(row[22]));
|
||||
entry.dest_z = static_cast<float>(atof(row[23]));
|
||||
entry.dest_heading = static_cast<float>(atof(row[24]));
|
||||
entry.invert_state = atoi(row[25]);
|
||||
entry.incline = atoi(row[26]);
|
||||
entry.size = atoi(row[27]);
|
||||
entry.buffer = static_cast<float>(atof(row[28]));
|
||||
entry.client_version_mask = atoi(row[29]);
|
||||
entry.is_ldon_door = atoi(row[30]);
|
||||
entry.min_expansion = atoi(row[31]);
|
||||
entry.max_expansion = atoi(row[32]);
|
||||
entry.content_flags = row[33] ? row[33] : "";
|
||||
entry.content_flags_disabled = row[34] ? row[34] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -329,6 +333,7 @@ public:
|
||||
update_values.push_back(columns[31] + " = " + std::to_string(doors_entry.min_expansion));
|
||||
update_values.push_back(columns[32] + " = " + std::to_string(doors_entry.max_expansion));
|
||||
update_values.push_back(columns[33] + " = '" + EscapeString(doors_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[34] + " = '" + EscapeString(doors_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -382,6 +387,7 @@ public:
|
||||
insert_values.push_back(std::to_string(doors_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(doors_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -443,6 +449,7 @@ public:
|
||||
insert_values.push_back(std::to_string(doors_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(doors_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -476,40 +483,41 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Doors entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.doorid = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.name = row[4] ? row[4] : "";
|
||||
entry.pos_y = static_cast<float>(atof(row[5]));
|
||||
entry.pos_x = static_cast<float>(atof(row[6]));
|
||||
entry.pos_z = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.opentype = atoi(row[9]);
|
||||
entry.guild = atoi(row[10]);
|
||||
entry.lockpick = atoi(row[11]);
|
||||
entry.keyitem = atoi(row[12]);
|
||||
entry.nokeyring = atoi(row[13]);
|
||||
entry.triggerdoor = atoi(row[14]);
|
||||
entry.triggertype = atoi(row[15]);
|
||||
entry.disable_timer = atoi(row[16]);
|
||||
entry.doorisopen = atoi(row[17]);
|
||||
entry.door_param = atoi(row[18]);
|
||||
entry.dest_zone = row[19] ? row[19] : "";
|
||||
entry.dest_instance = atoi(row[20]);
|
||||
entry.dest_x = static_cast<float>(atof(row[21]));
|
||||
entry.dest_y = static_cast<float>(atof(row[22]));
|
||||
entry.dest_z = static_cast<float>(atof(row[23]));
|
||||
entry.dest_heading = static_cast<float>(atof(row[24]));
|
||||
entry.invert_state = atoi(row[25]);
|
||||
entry.incline = atoi(row[26]);
|
||||
entry.size = atoi(row[27]);
|
||||
entry.buffer = static_cast<float>(atof(row[28]));
|
||||
entry.client_version_mask = atoi(row[29]);
|
||||
entry.is_ldon_door = atoi(row[30]);
|
||||
entry.min_expansion = atoi(row[31]);
|
||||
entry.max_expansion = atoi(row[32]);
|
||||
entry.content_flags = row[33] ? row[33] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.doorid = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.name = row[4] ? row[4] : "";
|
||||
entry.pos_y = static_cast<float>(atof(row[5]));
|
||||
entry.pos_x = static_cast<float>(atof(row[6]));
|
||||
entry.pos_z = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.opentype = atoi(row[9]);
|
||||
entry.guild = atoi(row[10]);
|
||||
entry.lockpick = atoi(row[11]);
|
||||
entry.keyitem = atoi(row[12]);
|
||||
entry.nokeyring = atoi(row[13]);
|
||||
entry.triggerdoor = atoi(row[14]);
|
||||
entry.triggertype = atoi(row[15]);
|
||||
entry.disable_timer = atoi(row[16]);
|
||||
entry.doorisopen = atoi(row[17]);
|
||||
entry.door_param = atoi(row[18]);
|
||||
entry.dest_zone = row[19] ? row[19] : "";
|
||||
entry.dest_instance = atoi(row[20]);
|
||||
entry.dest_x = static_cast<float>(atof(row[21]));
|
||||
entry.dest_y = static_cast<float>(atof(row[22]));
|
||||
entry.dest_z = static_cast<float>(atof(row[23]));
|
||||
entry.dest_heading = static_cast<float>(atof(row[24]));
|
||||
entry.invert_state = atoi(row[25]);
|
||||
entry.incline = atoi(row[26]);
|
||||
entry.size = atoi(row[27]);
|
||||
entry.buffer = static_cast<float>(atof(row[28]));
|
||||
entry.client_version_mask = atoi(row[29]);
|
||||
entry.is_ldon_door = atoi(row[30]);
|
||||
entry.min_expansion = atoi(row[31]);
|
||||
entry.max_expansion = atoi(row[32]);
|
||||
entry.content_flags = row[33] ? row[33] : "";
|
||||
entry.content_flags_disabled = row[34] ? row[34] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -534,40 +542,41 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Doors entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.doorid = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.name = row[4] ? row[4] : "";
|
||||
entry.pos_y = static_cast<float>(atof(row[5]));
|
||||
entry.pos_x = static_cast<float>(atof(row[6]));
|
||||
entry.pos_z = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.opentype = atoi(row[9]);
|
||||
entry.guild = atoi(row[10]);
|
||||
entry.lockpick = atoi(row[11]);
|
||||
entry.keyitem = atoi(row[12]);
|
||||
entry.nokeyring = atoi(row[13]);
|
||||
entry.triggerdoor = atoi(row[14]);
|
||||
entry.triggertype = atoi(row[15]);
|
||||
entry.disable_timer = atoi(row[16]);
|
||||
entry.doorisopen = atoi(row[17]);
|
||||
entry.door_param = atoi(row[18]);
|
||||
entry.dest_zone = row[19] ? row[19] : "";
|
||||
entry.dest_instance = atoi(row[20]);
|
||||
entry.dest_x = static_cast<float>(atof(row[21]));
|
||||
entry.dest_y = static_cast<float>(atof(row[22]));
|
||||
entry.dest_z = static_cast<float>(atof(row[23]));
|
||||
entry.dest_heading = static_cast<float>(atof(row[24]));
|
||||
entry.invert_state = atoi(row[25]);
|
||||
entry.incline = atoi(row[26]);
|
||||
entry.size = atoi(row[27]);
|
||||
entry.buffer = static_cast<float>(atof(row[28]));
|
||||
entry.client_version_mask = atoi(row[29]);
|
||||
entry.is_ldon_door = atoi(row[30]);
|
||||
entry.min_expansion = atoi(row[31]);
|
||||
entry.max_expansion = atoi(row[32]);
|
||||
entry.content_flags = row[33] ? row[33] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.doorid = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.name = row[4] ? row[4] : "";
|
||||
entry.pos_y = static_cast<float>(atof(row[5]));
|
||||
entry.pos_x = static_cast<float>(atof(row[6]));
|
||||
entry.pos_z = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.opentype = atoi(row[9]);
|
||||
entry.guild = atoi(row[10]);
|
||||
entry.lockpick = atoi(row[11]);
|
||||
entry.keyitem = atoi(row[12]);
|
||||
entry.nokeyring = atoi(row[13]);
|
||||
entry.triggerdoor = atoi(row[14]);
|
||||
entry.triggertype = atoi(row[15]);
|
||||
entry.disable_timer = atoi(row[16]);
|
||||
entry.doorisopen = atoi(row[17]);
|
||||
entry.door_param = atoi(row[18]);
|
||||
entry.dest_zone = row[19] ? row[19] : "";
|
||||
entry.dest_instance = atoi(row[20]);
|
||||
entry.dest_x = static_cast<float>(atof(row[21]));
|
||||
entry.dest_y = static_cast<float>(atof(row[22]));
|
||||
entry.dest_z = static_cast<float>(atof(row[23]));
|
||||
entry.dest_heading = static_cast<float>(atof(row[24]));
|
||||
entry.invert_state = atoi(row[25]);
|
||||
entry.incline = atoi(row[26]);
|
||||
entry.size = atoi(row[27]);
|
||||
entry.buffer = static_cast<float>(atof(row[28]));
|
||||
entry.client_version_mask = atoi(row[29]);
|
||||
entry.is_ldon_door = atoi(row[30]);
|
||||
entry.min_expansion = atoi(row[31]);
|
||||
entry.max_expansion = atoi(row[32]);
|
||||
entry.content_flags = row[33] ? row[33] : "";
|
||||
entry.content_flags_disabled = row[34] ? row[34] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -45,6 +45,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -65,6 +66,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -115,16 +117,17 @@ public:
|
||||
{
|
||||
Fishing entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.Itemid = 0;
|
||||
entry.skill_level = 0;
|
||||
entry.chance = 0;
|
||||
entry.npc_id = 0;
|
||||
entry.npc_chance = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.Itemid = 0;
|
||||
entry.skill_level = 0;
|
||||
entry.chance = 0;
|
||||
entry.npc_id = 0;
|
||||
entry.npc_chance = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -159,16 +162,17 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Fishing entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.skill_level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.npc_id = atoi(row[5]);
|
||||
entry.npc_chance = atoi(row[6]);
|
||||
entry.min_expansion = atoi(row[7]);
|
||||
entry.max_expansion = atoi(row[8]);
|
||||
entry.content_flags = row[9] ? row[9] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.skill_level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.npc_id = atoi(row[5]);
|
||||
entry.npc_chance = atoi(row[6]);
|
||||
entry.min_expansion = atoi(row[7]);
|
||||
entry.max_expansion = atoi(row[8]);
|
||||
entry.content_flags = row[9] ? row[9] : "";
|
||||
entry.content_flags_disabled = row[10] ? row[10] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -209,6 +213,7 @@ public:
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(fishing_entry.min_expansion));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(fishing_entry.max_expansion));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(fishing_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(fishing_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -238,6 +243,7 @@ public:
|
||||
insert_values.push_back(std::to_string(fishing_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(fishing_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -275,6 +281,7 @@ public:
|
||||
insert_values.push_back(std::to_string(fishing_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(fishing_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -308,16 +315,17 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Fishing entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.skill_level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.npc_id = atoi(row[5]);
|
||||
entry.npc_chance = atoi(row[6]);
|
||||
entry.min_expansion = atoi(row[7]);
|
||||
entry.max_expansion = atoi(row[8]);
|
||||
entry.content_flags = row[9] ? row[9] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.skill_level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.npc_id = atoi(row[5]);
|
||||
entry.npc_chance = atoi(row[6]);
|
||||
entry.min_expansion = atoi(row[7]);
|
||||
entry.max_expansion = atoi(row[8]);
|
||||
entry.content_flags = row[9] ? row[9] : "";
|
||||
entry.content_flags_disabled = row[10] ? row[10] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -342,16 +350,17 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Fishing entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.skill_level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.npc_id = atoi(row[5]);
|
||||
entry.npc_chance = atoi(row[6]);
|
||||
entry.min_expansion = atoi(row[7]);
|
||||
entry.max_expansion = atoi(row[8]);
|
||||
entry.content_flags = row[9] ? row[9] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.skill_level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.npc_id = atoi(row[5]);
|
||||
entry.npc_chance = atoi(row[6]);
|
||||
entry.min_expansion = atoi(row[7]);
|
||||
entry.max_expansion = atoi(row[8]);
|
||||
entry.content_flags = row[9] ? row[9] : "";
|
||||
entry.content_flags_disabled = row[10] ? row[10] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -61,6 +62,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -111,14 +113,15 @@ public:
|
||||
{
|
||||
Forage entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.Itemid = 0;
|
||||
entry.level = 0;
|
||||
entry.chance = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.Itemid = 0;
|
||||
entry.level = 0;
|
||||
entry.chance = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -153,14 +156,15 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Forage entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.min_expansion = atoi(row[5]);
|
||||
entry.max_expansion = atoi(row[6]);
|
||||
entry.content_flags = row[7] ? row[7] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.min_expansion = atoi(row[5]);
|
||||
entry.max_expansion = atoi(row[6]);
|
||||
entry.content_flags = row[7] ? row[7] : "";
|
||||
entry.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -199,6 +203,7 @@ public:
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(forage_entry.min_expansion));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(forage_entry.max_expansion));
|
||||
update_values.push_back(columns[7] + " = '" + EscapeString(forage_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(forage_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -226,6 +231,7 @@ public:
|
||||
insert_values.push_back(std::to_string(forage_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(forage_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -261,6 +267,7 @@ public:
|
||||
insert_values.push_back(std::to_string(forage_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(forage_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -294,14 +301,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Forage entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.min_expansion = atoi(row[5]);
|
||||
entry.max_expansion = atoi(row[6]);
|
||||
entry.content_flags = row[7] ? row[7] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.min_expansion = atoi(row[5]);
|
||||
entry.max_expansion = atoi(row[6]);
|
||||
entry.content_flags = row[7] ? row[7] : "";
|
||||
entry.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -326,14 +334,15 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Forage entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.min_expansion = atoi(row[5]);
|
||||
entry.max_expansion = atoi(row[6]);
|
||||
entry.content_flags = row[7] ? row[7] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.Itemid = atoi(row[2]);
|
||||
entry.level = atoi(row[3]);
|
||||
entry.chance = atoi(row[4]);
|
||||
entry.min_expansion = atoi(row[5]);
|
||||
entry.max_expansion = atoi(row[6]);
|
||||
entry.content_flags = row[7] ? row[7] : "";
|
||||
entry.content_flags_disabled = row[8] ? row[8] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -51,6 +51,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -77,6 +78,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -127,22 +129,23 @@ public:
|
||||
{
|
||||
GlobalLoot entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.description = "";
|
||||
entry.loottable_id = 0;
|
||||
entry.enabled = 1;
|
||||
entry.min_level = 0;
|
||||
entry.max_level = 0;
|
||||
entry.rare = 0;
|
||||
entry.raid = 0;
|
||||
entry.race = "";
|
||||
entry.class = "";
|
||||
entry.bodytype = "";
|
||||
entry.zone = "";
|
||||
entry.hot_zone = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.description = "";
|
||||
entry.loottable_id = 0;
|
||||
entry.enabled = 1;
|
||||
entry.min_level = 0;
|
||||
entry.max_level = 0;
|
||||
entry.rare = 0;
|
||||
entry.raid = 0;
|
||||
entry.race = "";
|
||||
entry.class = "";
|
||||
entry.bodytype = "";
|
||||
entry.zone = "";
|
||||
entry.hot_zone = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -177,22 +180,23 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GlobalLoot entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.description = row[1] ? row[1] : "";
|
||||
entry.loottable_id = atoi(row[2]);
|
||||
entry.enabled = atoi(row[3]);
|
||||
entry.min_level = atoi(row[4]);
|
||||
entry.max_level = atoi(row[5]);
|
||||
entry.rare = atoi(row[6]);
|
||||
entry.raid = atoi(row[7]);
|
||||
entry.race = row[8] ? row[8] : "";
|
||||
entry.class = row[9] ? row[9] : "";
|
||||
entry.bodytype = row[10] ? row[10] : "";
|
||||
entry.zone = row[11] ? row[11] : "";
|
||||
entry.hot_zone = atoi(row[12]);
|
||||
entry.min_expansion = atoi(row[13]);
|
||||
entry.max_expansion = atoi(row[14]);
|
||||
entry.content_flags = row[15] ? row[15] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.description = row[1] ? row[1] : "";
|
||||
entry.loottable_id = atoi(row[2]);
|
||||
entry.enabled = atoi(row[3]);
|
||||
entry.min_level = atoi(row[4]);
|
||||
entry.max_level = atoi(row[5]);
|
||||
entry.rare = atoi(row[6]);
|
||||
entry.raid = atoi(row[7]);
|
||||
entry.race = row[8] ? row[8] : "";
|
||||
entry.class = row[9] ? row[9] : "";
|
||||
entry.bodytype = row[10] ? row[10] : "";
|
||||
entry.zone = row[11] ? row[11] : "";
|
||||
entry.hot_zone = atoi(row[12]);
|
||||
entry.min_expansion = atoi(row[13]);
|
||||
entry.max_expansion = atoi(row[14]);
|
||||
entry.content_flags = row[15] ? row[15] : "";
|
||||
entry.content_flags_disabled = row[16] ? row[16] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -239,6 +243,7 @@ public:
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(global_loot_entry.min_expansion));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(global_loot_entry.max_expansion));
|
||||
update_values.push_back(columns[15] + " = '" + EscapeString(global_loot_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[16] + " = '" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -274,6 +279,7 @@ public:
|
||||
insert_values.push_back(std::to_string(global_loot_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -317,6 +323,7 @@ public:
|
||||
insert_values.push_back(std::to_string(global_loot_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -350,22 +357,23 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GlobalLoot entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.description = row[1] ? row[1] : "";
|
||||
entry.loottable_id = atoi(row[2]);
|
||||
entry.enabled = atoi(row[3]);
|
||||
entry.min_level = atoi(row[4]);
|
||||
entry.max_level = atoi(row[5]);
|
||||
entry.rare = atoi(row[6]);
|
||||
entry.raid = atoi(row[7]);
|
||||
entry.race = row[8] ? row[8] : "";
|
||||
entry.class = row[9] ? row[9] : "";
|
||||
entry.bodytype = row[10] ? row[10] : "";
|
||||
entry.zone = row[11] ? row[11] : "";
|
||||
entry.hot_zone = atoi(row[12]);
|
||||
entry.min_expansion = atoi(row[13]);
|
||||
entry.max_expansion = atoi(row[14]);
|
||||
entry.content_flags = row[15] ? row[15] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.description = row[1] ? row[1] : "";
|
||||
entry.loottable_id = atoi(row[2]);
|
||||
entry.enabled = atoi(row[3]);
|
||||
entry.min_level = atoi(row[4]);
|
||||
entry.max_level = atoi(row[5]);
|
||||
entry.rare = atoi(row[6]);
|
||||
entry.raid = atoi(row[7]);
|
||||
entry.race = row[8] ? row[8] : "";
|
||||
entry.class = row[9] ? row[9] : "";
|
||||
entry.bodytype = row[10] ? row[10] : "";
|
||||
entry.zone = row[11] ? row[11] : "";
|
||||
entry.hot_zone = atoi(row[12]);
|
||||
entry.min_expansion = atoi(row[13]);
|
||||
entry.max_expansion = atoi(row[14]);
|
||||
entry.content_flags = row[15] ? row[15] : "";
|
||||
entry.content_flags_disabled = row[16] ? row[16] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -390,22 +398,23 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GlobalLoot entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.description = row[1] ? row[1] : "";
|
||||
entry.loottable_id = atoi(row[2]);
|
||||
entry.enabled = atoi(row[3]);
|
||||
entry.min_level = atoi(row[4]);
|
||||
entry.max_level = atoi(row[5]);
|
||||
entry.rare = atoi(row[6]);
|
||||
entry.raid = atoi(row[7]);
|
||||
entry.race = row[8] ? row[8] : "";
|
||||
entry.class = row[9] ? row[9] : "";
|
||||
entry.bodytype = row[10] ? row[10] : "";
|
||||
entry.zone = row[11] ? row[11] : "";
|
||||
entry.hot_zone = atoi(row[12]);
|
||||
entry.min_expansion = atoi(row[13]);
|
||||
entry.max_expansion = atoi(row[14]);
|
||||
entry.content_flags = row[15] ? row[15] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.description = row[1] ? row[1] : "";
|
||||
entry.loottable_id = atoi(row[2]);
|
||||
entry.enabled = atoi(row[3]);
|
||||
entry.min_level = atoi(row[4]);
|
||||
entry.max_level = atoi(row[5]);
|
||||
entry.rare = atoi(row[6]);
|
||||
entry.raid = atoi(row[7]);
|
||||
entry.race = row[8] ? row[8] : "";
|
||||
entry.class = row[9] ? row[9] : "";
|
||||
entry.bodytype = row[10] ? row[10] : "";
|
||||
entry.zone = row[11] ? row[11] : "";
|
||||
entry.hot_zone = atoi(row[12]);
|
||||
entry.min_expansion = atoi(row[13]);
|
||||
entry.max_expansion = atoi(row[14]);
|
||||
entry.content_flags = row[15] ? row[15] : "";
|
||||
entry.content_flags_disabled = row[16] ? row[16] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -52,6 +52,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -79,6 +80,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -129,23 +131,24 @@ public:
|
||||
{
|
||||
GroundSpawns entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.version = 0;
|
||||
entry.max_x = 2000;
|
||||
entry.max_y = 2000;
|
||||
entry.max_z = 10000;
|
||||
entry.min_x = -2000;
|
||||
entry.min_y = -2000;
|
||||
entry.heading = 0;
|
||||
entry.name = "";
|
||||
entry.item = 0;
|
||||
entry.max_allowed = 1;
|
||||
entry.comment = "";
|
||||
entry.respawn_timer = 300;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.version = 0;
|
||||
entry.max_x = 2000;
|
||||
entry.max_y = 2000;
|
||||
entry.max_z = 10000;
|
||||
entry.min_x = -2000;
|
||||
entry.min_y = -2000;
|
||||
entry.heading = 0;
|
||||
entry.name = "";
|
||||
entry.item = 0;
|
||||
entry.max_allowed = 1;
|
||||
entry.comment = "";
|
||||
entry.respawn_timer = 300;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -180,23 +183,24 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
GroundSpawns entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.max_x = static_cast<float>(atof(row[3]));
|
||||
entry.max_y = static_cast<float>(atof(row[4]));
|
||||
entry.max_z = static_cast<float>(atof(row[5]));
|
||||
entry.min_x = static_cast<float>(atof(row[6]));
|
||||
entry.min_y = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.name = row[9] ? row[9] : "";
|
||||
entry.item = atoi(row[10]);
|
||||
entry.max_allowed = atoi(row[11]);
|
||||
entry.comment = row[12] ? row[12] : "";
|
||||
entry.respawn_timer = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.max_x = static_cast<float>(atof(row[3]));
|
||||
entry.max_y = static_cast<float>(atof(row[4]));
|
||||
entry.max_z = static_cast<float>(atof(row[5]));
|
||||
entry.min_x = static_cast<float>(atof(row[6]));
|
||||
entry.min_y = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.name = row[9] ? row[9] : "";
|
||||
entry.item = atoi(row[10]);
|
||||
entry.max_allowed = atoi(row[11]);
|
||||
entry.comment = row[12] ? row[12] : "";
|
||||
entry.respawn_timer = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
entry.content_flags_disabled = row[17] ? row[17] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -244,6 +248,7 @@ public:
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(ground_spawns_entry.min_expansion));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(ground_spawns_entry.max_expansion));
|
||||
update_values.push_back(columns[16] + " = '" + EscapeString(ground_spawns_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[17] + " = '" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -280,6 +285,7 @@ public:
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -324,6 +330,7 @@ public:
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -357,23 +364,24 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GroundSpawns entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.max_x = static_cast<float>(atof(row[3]));
|
||||
entry.max_y = static_cast<float>(atof(row[4]));
|
||||
entry.max_z = static_cast<float>(atof(row[5]));
|
||||
entry.min_x = static_cast<float>(atof(row[6]));
|
||||
entry.min_y = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.name = row[9] ? row[9] : "";
|
||||
entry.item = atoi(row[10]);
|
||||
entry.max_allowed = atoi(row[11]);
|
||||
entry.comment = row[12] ? row[12] : "";
|
||||
entry.respawn_timer = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.max_x = static_cast<float>(atof(row[3]));
|
||||
entry.max_y = static_cast<float>(atof(row[4]));
|
||||
entry.max_z = static_cast<float>(atof(row[5]));
|
||||
entry.min_x = static_cast<float>(atof(row[6]));
|
||||
entry.min_y = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.name = row[9] ? row[9] : "";
|
||||
entry.item = atoi(row[10]);
|
||||
entry.max_allowed = atoi(row[11]);
|
||||
entry.comment = row[12] ? row[12] : "";
|
||||
entry.respawn_timer = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
entry.content_flags_disabled = row[17] ? row[17] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -398,23 +406,24 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
GroundSpawns entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.max_x = static_cast<float>(atof(row[3]));
|
||||
entry.max_y = static_cast<float>(atof(row[4]));
|
||||
entry.max_z = static_cast<float>(atof(row[5]));
|
||||
entry.min_x = static_cast<float>(atof(row[6]));
|
||||
entry.min_y = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.name = row[9] ? row[9] : "";
|
||||
entry.item = atoi(row[10]);
|
||||
entry.max_allowed = atoi(row[11]);
|
||||
entry.comment = row[12] ? row[12] : "";
|
||||
entry.respawn_timer = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.max_x = static_cast<float>(atof(row[3]));
|
||||
entry.max_y = static_cast<float>(atof(row[4]));
|
||||
entry.max_z = static_cast<float>(atof(row[5]));
|
||||
entry.min_x = static_cast<float>(atof(row[6]));
|
||||
entry.min_y = static_cast<float>(atof(row[7]));
|
||||
entry.heading = static_cast<float>(atof(row[8]));
|
||||
entry.name = row[9] ? row[9] : "";
|
||||
entry.item = atoi(row[10]);
|
||||
entry.max_allowed = atoi(row[11]);
|
||||
entry.comment = row[12] ? row[12] : "";
|
||||
entry.respawn_timer = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
entry.content_flags_disabled = row[17] ? row[17] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -41,9 +41,11 @@ public:
|
||||
int equip_item;
|
||||
float chance;
|
||||
float disabled_chance;
|
||||
int minlevel;
|
||||
int maxlevel;
|
||||
int trivial_min_level;
|
||||
int trivial_max_level;
|
||||
int multiplier;
|
||||
int npc_min_level;
|
||||
int npc_max_level;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -60,9 +62,11 @@ public:
|
||||
"equip_item",
|
||||
"chance",
|
||||
"disabled_chance",
|
||||
"minlevel",
|
||||
"maxlevel",
|
||||
"trivial_min_level",
|
||||
"trivial_max_level",
|
||||
"multiplier",
|
||||
"npc_min_level",
|
||||
"npc_max_level",
|
||||
};
|
||||
}
|
||||
|
||||
@ -113,15 +117,17 @@ public:
|
||||
{
|
||||
LootdropEntries entry{};
|
||||
|
||||
entry.lootdrop_id = 0;
|
||||
entry.item_id = 0;
|
||||
entry.item_charges = 1;
|
||||
entry.equip_item = 0;
|
||||
entry.chance = 1;
|
||||
entry.disabled_chance = 0;
|
||||
entry.minlevel = 0;
|
||||
entry.maxlevel = 127;
|
||||
entry.multiplier = 1;
|
||||
entry.lootdrop_id = 0;
|
||||
entry.item_id = 0;
|
||||
entry.item_charges = 1;
|
||||
entry.equip_item = 0;
|
||||
entry.chance = 1;
|
||||
entry.disabled_chance = 0;
|
||||
entry.trivial_min_level = 0;
|
||||
entry.trivial_max_level = 0;
|
||||
entry.multiplier = 1;
|
||||
entry.npc_min_level = 0;
|
||||
entry.npc_max_level = 0;
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -156,15 +162,17 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
LootdropEntries entry{};
|
||||
|
||||
entry.lootdrop_id = atoi(row[0]);
|
||||
entry.item_id = atoi(row[1]);
|
||||
entry.item_charges = atoi(row[2]);
|
||||
entry.equip_item = atoi(row[3]);
|
||||
entry.chance = static_cast<float>(atof(row[4]));
|
||||
entry.disabled_chance = static_cast<float>(atof(row[5]));
|
||||
entry.minlevel = atoi(row[6]);
|
||||
entry.maxlevel = atoi(row[7]);
|
||||
entry.multiplier = atoi(row[8]);
|
||||
entry.lootdrop_id = atoi(row[0]);
|
||||
entry.item_id = atoi(row[1]);
|
||||
entry.item_charges = atoi(row[2]);
|
||||
entry.equip_item = atoi(row[3]);
|
||||
entry.chance = static_cast<float>(atof(row[4]));
|
||||
entry.disabled_chance = static_cast<float>(atof(row[5]));
|
||||
entry.trivial_min_level = atoi(row[6]);
|
||||
entry.trivial_max_level = atoi(row[7]);
|
||||
entry.multiplier = atoi(row[8]);
|
||||
entry.npc_min_level = atoi(row[9]);
|
||||
entry.npc_max_level = atoi(row[10]);
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -202,9 +210,11 @@ public:
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(lootdrop_entries_entry.equip_item));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(lootdrop_entries_entry.chance));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(lootdrop_entries_entry.disabled_chance));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(lootdrop_entries_entry.minlevel));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(lootdrop_entries_entry.maxlevel));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(lootdrop_entries_entry.trivial_min_level));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(lootdrop_entries_entry.trivial_max_level));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(lootdrop_entries_entry.multiplier));
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(lootdrop_entries_entry.npc_min_level));
|
||||
update_values.push_back(columns[10] + " = " + std::to_string(lootdrop_entries_entry.npc_max_level));
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -231,9 +241,11 @@ public:
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.equip_item));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.chance));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.disabled_chance));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.minlevel));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.maxlevel));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.trivial_min_level));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.trivial_max_level));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.multiplier));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.npc_min_level));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.npc_max_level));
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -268,9 +280,11 @@ public:
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.equip_item));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.chance));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.disabled_chance));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.minlevel));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.maxlevel));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.trivial_min_level));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.trivial_max_level));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.multiplier));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.npc_min_level));
|
||||
insert_values.push_back(std::to_string(lootdrop_entries_entry.npc_max_level));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -304,15 +318,17 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LootdropEntries entry{};
|
||||
|
||||
entry.lootdrop_id = atoi(row[0]);
|
||||
entry.item_id = atoi(row[1]);
|
||||
entry.item_charges = atoi(row[2]);
|
||||
entry.equip_item = atoi(row[3]);
|
||||
entry.chance = static_cast<float>(atof(row[4]));
|
||||
entry.disabled_chance = static_cast<float>(atof(row[5]));
|
||||
entry.minlevel = atoi(row[6]);
|
||||
entry.maxlevel = atoi(row[7]);
|
||||
entry.multiplier = atoi(row[8]);
|
||||
entry.lootdrop_id = atoi(row[0]);
|
||||
entry.item_id = atoi(row[1]);
|
||||
entry.item_charges = atoi(row[2]);
|
||||
entry.equip_item = atoi(row[3]);
|
||||
entry.chance = static_cast<float>(atof(row[4]));
|
||||
entry.disabled_chance = static_cast<float>(atof(row[5]));
|
||||
entry.trivial_min_level = atoi(row[6]);
|
||||
entry.trivial_max_level = atoi(row[7]);
|
||||
entry.multiplier = atoi(row[8]);
|
||||
entry.npc_min_level = atoi(row[9]);
|
||||
entry.npc_max_level = atoi(row[10]);
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -337,15 +353,17 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
LootdropEntries entry{};
|
||||
|
||||
entry.lootdrop_id = atoi(row[0]);
|
||||
entry.item_id = atoi(row[1]);
|
||||
entry.item_charges = atoi(row[2]);
|
||||
entry.equip_item = atoi(row[3]);
|
||||
entry.chance = static_cast<float>(atof(row[4]));
|
||||
entry.disabled_chance = static_cast<float>(atof(row[5]));
|
||||
entry.minlevel = atoi(row[6]);
|
||||
entry.maxlevel = atoi(row[7]);
|
||||
entry.multiplier = atoi(row[8]);
|
||||
entry.lootdrop_id = atoi(row[0]);
|
||||
entry.item_id = atoi(row[1]);
|
||||
entry.item_charges = atoi(row[2]);
|
||||
entry.equip_item = atoi(row[3]);
|
||||
entry.chance = static_cast<float>(atof(row[4]));
|
||||
entry.disabled_chance = static_cast<float>(atof(row[5]));
|
||||
entry.trivial_min_level = atoi(row[6]);
|
||||
entry.trivial_max_level = atoi(row[7]);
|
||||
entry.multiplier = atoi(row[8]);
|
||||
entry.npc_min_level = atoi(row[9]);
|
||||
entry.npc_max_level = atoi(row[10]);
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -55,6 +56,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -105,11 +107,12 @@ public:
|
||||
{
|
||||
Lootdrop entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.name = "";
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.name = "";
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -144,11 +147,12 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Lootdrop entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.min_expansion = atoi(row[2]);
|
||||
entry.max_expansion = atoi(row[3]);
|
||||
entry.content_flags = row[4] ? row[4] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.min_expansion = atoi(row[2]);
|
||||
entry.max_expansion = atoi(row[3]);
|
||||
entry.content_flags = row[4] ? row[4] : "";
|
||||
entry.content_flags_disabled = row[5] ? row[5] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -184,6 +188,7 @@ public:
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(lootdrop_entry.min_expansion));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(lootdrop_entry.max_expansion));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(lootdrop_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(lootdrop_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -208,6 +213,7 @@ public:
|
||||
insert_values.push_back(std::to_string(lootdrop_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(lootdrop_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(lootdrop_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(lootdrop_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -240,6 +246,7 @@ public:
|
||||
insert_values.push_back(std::to_string(lootdrop_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(lootdrop_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(lootdrop_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(lootdrop_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -273,11 +280,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Lootdrop entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.min_expansion = atoi(row[2]);
|
||||
entry.max_expansion = atoi(row[3]);
|
||||
entry.content_flags = row[4] ? row[4] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.min_expansion = atoi(row[2]);
|
||||
entry.max_expansion = atoi(row[3]);
|
||||
entry.content_flags = row[4] ? row[4] : "";
|
||||
entry.content_flags_disabled = row[5] ? row[5] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -302,11 +310,12 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Lootdrop entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.min_expansion = atoi(row[2]);
|
||||
entry.max_expansion = atoi(row[3]);
|
||||
entry.content_flags = row[4] ? row[4] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.min_expansion = atoi(row[2]);
|
||||
entry.max_expansion = atoi(row[3]);
|
||||
entry.content_flags = row[4] ? row[4] : "";
|
||||
entry.content_flags_disabled = row[5] ? row[5] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -63,6 +64,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -113,15 +115,16 @@ public:
|
||||
{
|
||||
Loottable entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.name = "";
|
||||
entry.mincash = 0;
|
||||
entry.maxcash = 0;
|
||||
entry.avgcoin = 0;
|
||||
entry.done = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.name = "";
|
||||
entry.mincash = 0;
|
||||
entry.maxcash = 0;
|
||||
entry.avgcoin = 0;
|
||||
entry.done = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -156,15 +159,16 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Loottable entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.mincash = atoi(row[2]);
|
||||
entry.maxcash = atoi(row[3]);
|
||||
entry.avgcoin = atoi(row[4]);
|
||||
entry.done = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.mincash = atoi(row[2]);
|
||||
entry.maxcash = atoi(row[3]);
|
||||
entry.avgcoin = atoi(row[4]);
|
||||
entry.done = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
entry.content_flags_disabled = row[9] ? row[9] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -204,6 +208,7 @@ public:
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(loottable_entry.min_expansion));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(loottable_entry.max_expansion));
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(loottable_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(loottable_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -232,6 +237,7 @@ public:
|
||||
insert_values.push_back(std::to_string(loottable_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(loottable_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(loottable_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(loottable_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -268,6 +274,7 @@ public:
|
||||
insert_values.push_back(std::to_string(loottable_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(loottable_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(loottable_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(loottable_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -301,15 +308,16 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Loottable entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.mincash = atoi(row[2]);
|
||||
entry.maxcash = atoi(row[3]);
|
||||
entry.avgcoin = atoi(row[4]);
|
||||
entry.done = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.mincash = atoi(row[2]);
|
||||
entry.maxcash = atoi(row[3]);
|
||||
entry.avgcoin = atoi(row[4]);
|
||||
entry.done = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
entry.content_flags_disabled = row[9] ? row[9] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -334,15 +342,16 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Loottable entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.mincash = atoi(row[2]);
|
||||
entry.maxcash = atoi(row[3]);
|
||||
entry.avgcoin = atoi(row[4]);
|
||||
entry.done = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.mincash = atoi(row[2]);
|
||||
entry.maxcash = atoi(row[3]);
|
||||
entry.avgcoin = atoi(row[4]);
|
||||
entry.done = atoi(row[5]);
|
||||
entry.min_expansion = atoi(row[6]);
|
||||
entry.max_expansion = atoi(row[7]);
|
||||
entry.content_flags = row[8] ? row[8] : "";
|
||||
entry.content_flags_disabled = row[9] ? row[9] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -46,6 +46,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -67,6 +68,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -117,17 +119,18 @@ public:
|
||||
{
|
||||
Merchantlist entry{};
|
||||
|
||||
entry.merchantid = 0;
|
||||
entry.slot = 0;
|
||||
entry.item = 0;
|
||||
entry.faction_required = -100;
|
||||
entry.level_required = 0;
|
||||
entry.alt_currency_cost = 0;
|
||||
entry.classes_required = 65535;
|
||||
entry.probability = 100;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.merchantid = 0;
|
||||
entry.slot = 0;
|
||||
entry.item = 0;
|
||||
entry.faction_required = -100;
|
||||
entry.level_required = 0;
|
||||
entry.alt_currency_cost = 0;
|
||||
entry.classes_required = 65535;
|
||||
entry.probability = 100;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -162,17 +165,18 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Merchantlist entry{};
|
||||
|
||||
entry.merchantid = atoi(row[0]);
|
||||
entry.slot = atoi(row[1]);
|
||||
entry.item = atoi(row[2]);
|
||||
entry.faction_required = atoi(row[3]);
|
||||
entry.level_required = atoi(row[4]);
|
||||
entry.alt_currency_cost = atoi(row[5]);
|
||||
entry.classes_required = atoi(row[6]);
|
||||
entry.probability = atoi(row[7]);
|
||||
entry.min_expansion = atoi(row[8]);
|
||||
entry.max_expansion = atoi(row[9]);
|
||||
entry.content_flags = row[10] ? row[10] : "";
|
||||
entry.merchantid = atoi(row[0]);
|
||||
entry.slot = atoi(row[1]);
|
||||
entry.item = atoi(row[2]);
|
||||
entry.faction_required = atoi(row[3]);
|
||||
entry.level_required = atoi(row[4]);
|
||||
entry.alt_currency_cost = atoi(row[5]);
|
||||
entry.classes_required = atoi(row[6]);
|
||||
entry.probability = atoi(row[7]);
|
||||
entry.min_expansion = atoi(row[8]);
|
||||
entry.max_expansion = atoi(row[9]);
|
||||
entry.content_flags = row[10] ? row[10] : "";
|
||||
entry.content_flags_disabled = row[11] ? row[11] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -215,6 +219,7 @@ public:
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(merchantlist_entry.min_expansion));
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(merchantlist_entry.max_expansion));
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(merchantlist_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(merchantlist_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -246,6 +251,7 @@ public:
|
||||
insert_values.push_back(std::to_string(merchantlist_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(merchantlist_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(merchantlist_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(merchantlist_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -285,6 +291,7 @@ public:
|
||||
insert_values.push_back(std::to_string(merchantlist_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(merchantlist_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(merchantlist_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(merchantlist_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -318,17 +325,18 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Merchantlist entry{};
|
||||
|
||||
entry.merchantid = atoi(row[0]);
|
||||
entry.slot = atoi(row[1]);
|
||||
entry.item = atoi(row[2]);
|
||||
entry.faction_required = atoi(row[3]);
|
||||
entry.level_required = atoi(row[4]);
|
||||
entry.alt_currency_cost = atoi(row[5]);
|
||||
entry.classes_required = atoi(row[6]);
|
||||
entry.probability = atoi(row[7]);
|
||||
entry.min_expansion = atoi(row[8]);
|
||||
entry.max_expansion = atoi(row[9]);
|
||||
entry.content_flags = row[10] ? row[10] : "";
|
||||
entry.merchantid = atoi(row[0]);
|
||||
entry.slot = atoi(row[1]);
|
||||
entry.item = atoi(row[2]);
|
||||
entry.faction_required = atoi(row[3]);
|
||||
entry.level_required = atoi(row[4]);
|
||||
entry.alt_currency_cost = atoi(row[5]);
|
||||
entry.classes_required = atoi(row[6]);
|
||||
entry.probability = atoi(row[7]);
|
||||
entry.min_expansion = atoi(row[8]);
|
||||
entry.max_expansion = atoi(row[9]);
|
||||
entry.content_flags = row[10] ? row[10] : "";
|
||||
entry.content_flags_disabled = row[11] ? row[11] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -353,17 +361,18 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Merchantlist entry{};
|
||||
|
||||
entry.merchantid = atoi(row[0]);
|
||||
entry.slot = atoi(row[1]);
|
||||
entry.item = atoi(row[2]);
|
||||
entry.faction_required = atoi(row[3]);
|
||||
entry.level_required = atoi(row[4]);
|
||||
entry.alt_currency_cost = atoi(row[5]);
|
||||
entry.classes_required = atoi(row[6]);
|
||||
entry.probability = atoi(row[7]);
|
||||
entry.min_expansion = atoi(row[8]);
|
||||
entry.max_expansion = atoi(row[9]);
|
||||
entry.content_flags = row[10] ? row[10] : "";
|
||||
entry.merchantid = atoi(row[0]);
|
||||
entry.slot = atoi(row[1]);
|
||||
entry.item = atoi(row[2]);
|
||||
entry.faction_required = atoi(row[3]);
|
||||
entry.level_required = atoi(row[4]);
|
||||
entry.alt_currency_cost = atoi(row[5]);
|
||||
entry.classes_required = atoi(row[6]);
|
||||
entry.probability = atoi(row[7]);
|
||||
entry.min_expansion = atoi(row[8]);
|
||||
entry.max_expansion = atoi(row[9]);
|
||||
entry.content_flags = row[10] ? row[10] : "";
|
||||
entry.content_flags_disabled = row[11] ? row[11] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -61,6 +61,10 @@ public:
|
||||
float tilt_x;
|
||||
float tilt_y;
|
||||
std::string display_name;
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -97,6 +101,10 @@ public:
|
||||
"tilt_x",
|
||||
"tilt_y",
|
||||
"display_name",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -147,32 +155,36 @@ public:
|
||||
{
|
||||
Object entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.version = 0;
|
||||
entry.xpos = 0;
|
||||
entry.ypos = 0;
|
||||
entry.zpos = 0;
|
||||
entry.heading = 0;
|
||||
entry.itemid = 0;
|
||||
entry.charges = 0;
|
||||
entry.objectname = "";
|
||||
entry.type = 0;
|
||||
entry.icon = 0;
|
||||
entry.unknown08 = 0;
|
||||
entry.unknown10 = 0;
|
||||
entry.unknown20 = 0;
|
||||
entry.unknown24 = 0;
|
||||
entry.unknown60 = 0;
|
||||
entry.unknown64 = 0;
|
||||
entry.unknown68 = 0;
|
||||
entry.unknown72 = 0;
|
||||
entry.unknown76 = 0;
|
||||
entry.unknown84 = 0;
|
||||
entry.size = 100;
|
||||
entry.tilt_x = 0;
|
||||
entry.tilt_y = 0;
|
||||
entry.display_name = "";
|
||||
entry.id = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.version = 0;
|
||||
entry.xpos = 0;
|
||||
entry.ypos = 0;
|
||||
entry.zpos = 0;
|
||||
entry.heading = 0;
|
||||
entry.itemid = 0;
|
||||
entry.charges = 0;
|
||||
entry.objectname = "";
|
||||
entry.type = 0;
|
||||
entry.icon = 0;
|
||||
entry.unknown08 = 0;
|
||||
entry.unknown10 = 0;
|
||||
entry.unknown20 = 0;
|
||||
entry.unknown24 = 0;
|
||||
entry.unknown60 = 0;
|
||||
entry.unknown64 = 0;
|
||||
entry.unknown68 = 0;
|
||||
entry.unknown72 = 0;
|
||||
entry.unknown76 = 0;
|
||||
entry.unknown84 = 0;
|
||||
entry.size = 100;
|
||||
entry.tilt_x = 0;
|
||||
entry.tilt_y = 0;
|
||||
entry.display_name = "";
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -207,32 +219,36 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Object entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.xpos = static_cast<float>(atof(row[3]));
|
||||
entry.ypos = static_cast<float>(atof(row[4]));
|
||||
entry.zpos = static_cast<float>(atof(row[5]));
|
||||
entry.heading = static_cast<float>(atof(row[6]));
|
||||
entry.itemid = atoi(row[7]);
|
||||
entry.charges = atoi(row[8]);
|
||||
entry.objectname = row[9] ? row[9] : "";
|
||||
entry.type = atoi(row[10]);
|
||||
entry.icon = atoi(row[11]);
|
||||
entry.unknown08 = atoi(row[12]);
|
||||
entry.unknown10 = atoi(row[13]);
|
||||
entry.unknown20 = atoi(row[14]);
|
||||
entry.unknown24 = atoi(row[15]);
|
||||
entry.unknown60 = atoi(row[16]);
|
||||
entry.unknown64 = atoi(row[17]);
|
||||
entry.unknown68 = atoi(row[18]);
|
||||
entry.unknown72 = atoi(row[19]);
|
||||
entry.unknown76 = atoi(row[20]);
|
||||
entry.unknown84 = atoi(row[21]);
|
||||
entry.size = static_cast<float>(atof(row[22]));
|
||||
entry.tilt_x = static_cast<float>(atof(row[23]));
|
||||
entry.tilt_y = static_cast<float>(atof(row[24]));
|
||||
entry.display_name = row[25] ? row[25] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.xpos = static_cast<float>(atof(row[3]));
|
||||
entry.ypos = static_cast<float>(atof(row[4]));
|
||||
entry.zpos = static_cast<float>(atof(row[5]));
|
||||
entry.heading = static_cast<float>(atof(row[6]));
|
||||
entry.itemid = atoi(row[7]);
|
||||
entry.charges = atoi(row[8]);
|
||||
entry.objectname = row[9] ? row[9] : "";
|
||||
entry.type = atoi(row[10]);
|
||||
entry.icon = atoi(row[11]);
|
||||
entry.unknown08 = atoi(row[12]);
|
||||
entry.unknown10 = atoi(row[13]);
|
||||
entry.unknown20 = atoi(row[14]);
|
||||
entry.unknown24 = atoi(row[15]);
|
||||
entry.unknown60 = atoi(row[16]);
|
||||
entry.unknown64 = atoi(row[17]);
|
||||
entry.unknown68 = atoi(row[18]);
|
||||
entry.unknown72 = atoi(row[19]);
|
||||
entry.unknown76 = atoi(row[20]);
|
||||
entry.unknown84 = atoi(row[21]);
|
||||
entry.size = static_cast<float>(atof(row[22]));
|
||||
entry.tilt_x = static_cast<float>(atof(row[23]));
|
||||
entry.tilt_y = static_cast<float>(atof(row[24]));
|
||||
entry.display_name = row[25] ? row[25] : "";
|
||||
entry.min_expansion = atoi(row[26]);
|
||||
entry.max_expansion = atoi(row[27]);
|
||||
entry.content_flags = row[28] ? row[28] : "";
|
||||
entry.content_flags_disabled = row[29] ? row[29] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -289,6 +305,10 @@ public:
|
||||
update_values.push_back(columns[23] + " = " + std::to_string(object_entry.tilt_x));
|
||||
update_values.push_back(columns[24] + " = " + std::to_string(object_entry.tilt_y));
|
||||
update_values.push_back(columns[25] + " = '" + EscapeString(object_entry.display_name) + "'");
|
||||
update_values.push_back(columns[26] + " = " + std::to_string(object_entry.min_expansion));
|
||||
update_values.push_back(columns[27] + " = " + std::to_string(object_entry.max_expansion));
|
||||
update_values.push_back(columns[28] + " = '" + EscapeString(object_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[29] + " = '" + EscapeString(object_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -334,6 +354,10 @@ public:
|
||||
insert_values.push_back(std::to_string(object_entry.tilt_x));
|
||||
insert_values.push_back(std::to_string(object_entry.tilt_y));
|
||||
insert_values.push_back("'" + EscapeString(object_entry.display_name) + "'");
|
||||
insert_values.push_back(std::to_string(object_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(object_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(object_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(object_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -387,6 +411,10 @@ public:
|
||||
insert_values.push_back(std::to_string(object_entry.tilt_x));
|
||||
insert_values.push_back(std::to_string(object_entry.tilt_y));
|
||||
insert_values.push_back("'" + EscapeString(object_entry.display_name) + "'");
|
||||
insert_values.push_back(std::to_string(object_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(object_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(object_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(object_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -420,32 +448,36 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Object entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.xpos = static_cast<float>(atof(row[3]));
|
||||
entry.ypos = static_cast<float>(atof(row[4]));
|
||||
entry.zpos = static_cast<float>(atof(row[5]));
|
||||
entry.heading = static_cast<float>(atof(row[6]));
|
||||
entry.itemid = atoi(row[7]);
|
||||
entry.charges = atoi(row[8]);
|
||||
entry.objectname = row[9] ? row[9] : "";
|
||||
entry.type = atoi(row[10]);
|
||||
entry.icon = atoi(row[11]);
|
||||
entry.unknown08 = atoi(row[12]);
|
||||
entry.unknown10 = atoi(row[13]);
|
||||
entry.unknown20 = atoi(row[14]);
|
||||
entry.unknown24 = atoi(row[15]);
|
||||
entry.unknown60 = atoi(row[16]);
|
||||
entry.unknown64 = atoi(row[17]);
|
||||
entry.unknown68 = atoi(row[18]);
|
||||
entry.unknown72 = atoi(row[19]);
|
||||
entry.unknown76 = atoi(row[20]);
|
||||
entry.unknown84 = atoi(row[21]);
|
||||
entry.size = static_cast<float>(atof(row[22]));
|
||||
entry.tilt_x = static_cast<float>(atof(row[23]));
|
||||
entry.tilt_y = static_cast<float>(atof(row[24]));
|
||||
entry.display_name = row[25] ? row[25] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.xpos = static_cast<float>(atof(row[3]));
|
||||
entry.ypos = static_cast<float>(atof(row[4]));
|
||||
entry.zpos = static_cast<float>(atof(row[5]));
|
||||
entry.heading = static_cast<float>(atof(row[6]));
|
||||
entry.itemid = atoi(row[7]);
|
||||
entry.charges = atoi(row[8]);
|
||||
entry.objectname = row[9] ? row[9] : "";
|
||||
entry.type = atoi(row[10]);
|
||||
entry.icon = atoi(row[11]);
|
||||
entry.unknown08 = atoi(row[12]);
|
||||
entry.unknown10 = atoi(row[13]);
|
||||
entry.unknown20 = atoi(row[14]);
|
||||
entry.unknown24 = atoi(row[15]);
|
||||
entry.unknown60 = atoi(row[16]);
|
||||
entry.unknown64 = atoi(row[17]);
|
||||
entry.unknown68 = atoi(row[18]);
|
||||
entry.unknown72 = atoi(row[19]);
|
||||
entry.unknown76 = atoi(row[20]);
|
||||
entry.unknown84 = atoi(row[21]);
|
||||
entry.size = static_cast<float>(atof(row[22]));
|
||||
entry.tilt_x = static_cast<float>(atof(row[23]));
|
||||
entry.tilt_y = static_cast<float>(atof(row[24]));
|
||||
entry.display_name = row[25] ? row[25] : "";
|
||||
entry.min_expansion = atoi(row[26]);
|
||||
entry.max_expansion = atoi(row[27]);
|
||||
entry.content_flags = row[28] ? row[28] : "";
|
||||
entry.content_flags_disabled = row[29] ? row[29] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -470,32 +502,36 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Object entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.xpos = static_cast<float>(atof(row[3]));
|
||||
entry.ypos = static_cast<float>(atof(row[4]));
|
||||
entry.zpos = static_cast<float>(atof(row[5]));
|
||||
entry.heading = static_cast<float>(atof(row[6]));
|
||||
entry.itemid = atoi(row[7]);
|
||||
entry.charges = atoi(row[8]);
|
||||
entry.objectname = row[9] ? row[9] : "";
|
||||
entry.type = atoi(row[10]);
|
||||
entry.icon = atoi(row[11]);
|
||||
entry.unknown08 = atoi(row[12]);
|
||||
entry.unknown10 = atoi(row[13]);
|
||||
entry.unknown20 = atoi(row[14]);
|
||||
entry.unknown24 = atoi(row[15]);
|
||||
entry.unknown60 = atoi(row[16]);
|
||||
entry.unknown64 = atoi(row[17]);
|
||||
entry.unknown68 = atoi(row[18]);
|
||||
entry.unknown72 = atoi(row[19]);
|
||||
entry.unknown76 = atoi(row[20]);
|
||||
entry.unknown84 = atoi(row[21]);
|
||||
entry.size = static_cast<float>(atof(row[22]));
|
||||
entry.tilt_x = static_cast<float>(atof(row[23]));
|
||||
entry.tilt_y = static_cast<float>(atof(row[24]));
|
||||
entry.display_name = row[25] ? row[25] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zoneid = atoi(row[1]);
|
||||
entry.version = atoi(row[2]);
|
||||
entry.xpos = static_cast<float>(atof(row[3]));
|
||||
entry.ypos = static_cast<float>(atof(row[4]));
|
||||
entry.zpos = static_cast<float>(atof(row[5]));
|
||||
entry.heading = static_cast<float>(atof(row[6]));
|
||||
entry.itemid = atoi(row[7]);
|
||||
entry.charges = atoi(row[8]);
|
||||
entry.objectname = row[9] ? row[9] : "";
|
||||
entry.type = atoi(row[10]);
|
||||
entry.icon = atoi(row[11]);
|
||||
entry.unknown08 = atoi(row[12]);
|
||||
entry.unknown10 = atoi(row[13]);
|
||||
entry.unknown20 = atoi(row[14]);
|
||||
entry.unknown24 = atoi(row[15]);
|
||||
entry.unknown60 = atoi(row[16]);
|
||||
entry.unknown64 = atoi(row[17]);
|
||||
entry.unknown68 = atoi(row[18]);
|
||||
entry.unknown72 = atoi(row[19]);
|
||||
entry.unknown76 = atoi(row[20]);
|
||||
entry.unknown84 = atoi(row[21]);
|
||||
entry.size = static_cast<float>(atof(row[22]));
|
||||
entry.tilt_x = static_cast<float>(atof(row[23]));
|
||||
entry.tilt_y = static_cast<float>(atof(row[24]));
|
||||
entry.display_name = row[25] ? row[25] : "";
|
||||
entry.min_expansion = atoi(row[26]);
|
||||
entry.max_expansion = atoi(row[27]);
|
||||
entry.content_flags = row[28] ? row[28] : "";
|
||||
entry.content_flags_disabled = row[29] ? row[29] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -50,6 +50,10 @@ public:
|
||||
int cond_value;
|
||||
int enabled;
|
||||
int animation;
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -75,6 +79,10 @@ public:
|
||||
"cond_value",
|
||||
"enabled",
|
||||
"animation",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -125,21 +133,25 @@ public:
|
||||
{
|
||||
Spawn2 entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.spawngroupID = 0;
|
||||
entry.zone = "";
|
||||
entry.version = 0;
|
||||
entry.x = 0.000000;
|
||||
entry.y = 0.000000;
|
||||
entry.z = 0.000000;
|
||||
entry.heading = 0.000000;
|
||||
entry.respawntime = 0;
|
||||
entry.variance = 0;
|
||||
entry.pathgrid = 0;
|
||||
entry._condition = 0;
|
||||
entry.cond_value = 1;
|
||||
entry.enabled = 1;
|
||||
entry.animation = 0;
|
||||
entry.id = 0;
|
||||
entry.spawngroupID = 0;
|
||||
entry.zone = "";
|
||||
entry.version = 0;
|
||||
entry.x = 0.000000;
|
||||
entry.y = 0.000000;
|
||||
entry.z = 0.000000;
|
||||
entry.heading = 0.000000;
|
||||
entry.respawntime = 0;
|
||||
entry.variance = 0;
|
||||
entry.pathgrid = 0;
|
||||
entry._condition = 0;
|
||||
entry.cond_value = 1;
|
||||
entry.enabled = 1;
|
||||
entry.animation = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -174,21 +186,25 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
Spawn2 entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.spawngroupID = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.x = static_cast<float>(atof(row[4]));
|
||||
entry.y = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.respawntime = atoi(row[8]);
|
||||
entry.variance = atoi(row[9]);
|
||||
entry.pathgrid = atoi(row[10]);
|
||||
entry._condition = atoi(row[11]);
|
||||
entry.cond_value = atoi(row[12]);
|
||||
entry.enabled = atoi(row[13]);
|
||||
entry.animation = atoi(row[14]);
|
||||
entry.id = atoi(row[0]);
|
||||
entry.spawngroupID = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.x = static_cast<float>(atof(row[4]));
|
||||
entry.y = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.respawntime = atoi(row[8]);
|
||||
entry.variance = atoi(row[9]);
|
||||
entry.pathgrid = atoi(row[10]);
|
||||
entry._condition = atoi(row[11]);
|
||||
entry.cond_value = atoi(row[12]);
|
||||
entry.enabled = atoi(row[13]);
|
||||
entry.animation = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -234,6 +250,10 @@ public:
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(spawn2_entry.cond_value));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(spawn2_entry.enabled));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(spawn2_entry.animation));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(spawn2_entry.min_expansion));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(spawn2_entry.max_expansion));
|
||||
update_values.push_back(columns[17] + " = '" + EscapeString(spawn2_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + EscapeString(spawn2_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -268,6 +288,10 @@ public:
|
||||
insert_values.push_back(std::to_string(spawn2_entry.cond_value));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.enabled));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.animation));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(spawn2_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(spawn2_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -310,6 +334,10 @@ public:
|
||||
insert_values.push_back(std::to_string(spawn2_entry.cond_value));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.enabled));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.animation));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(spawn2_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(spawn2_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(spawn2_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -343,21 +371,25 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Spawn2 entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.spawngroupID = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.x = static_cast<float>(atof(row[4]));
|
||||
entry.y = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.respawntime = atoi(row[8]);
|
||||
entry.variance = atoi(row[9]);
|
||||
entry.pathgrid = atoi(row[10]);
|
||||
entry._condition = atoi(row[11]);
|
||||
entry.cond_value = atoi(row[12]);
|
||||
entry.enabled = atoi(row[13]);
|
||||
entry.animation = atoi(row[14]);
|
||||
entry.id = atoi(row[0]);
|
||||
entry.spawngroupID = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.x = static_cast<float>(atof(row[4]));
|
||||
entry.y = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.respawntime = atoi(row[8]);
|
||||
entry.variance = atoi(row[9]);
|
||||
entry.pathgrid = atoi(row[10]);
|
||||
entry._condition = atoi(row[11]);
|
||||
entry.cond_value = atoi(row[12]);
|
||||
entry.enabled = atoi(row[13]);
|
||||
entry.animation = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -382,21 +414,25 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
Spawn2 entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.spawngroupID = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.x = static_cast<float>(atof(row[4]));
|
||||
entry.y = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.respawntime = atoi(row[8]);
|
||||
entry.variance = atoi(row[9]);
|
||||
entry.pathgrid = atoi(row[10]);
|
||||
entry._condition = atoi(row[11]);
|
||||
entry.cond_value = atoi(row[12]);
|
||||
entry.enabled = atoi(row[13]);
|
||||
entry.animation = atoi(row[14]);
|
||||
entry.id = atoi(row[0]);
|
||||
entry.spawngroupID = atoi(row[1]);
|
||||
entry.zone = row[2] ? row[2] : "";
|
||||
entry.version = atoi(row[3]);
|
||||
entry.x = static_cast<float>(atof(row[4]));
|
||||
entry.y = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.respawntime = atoi(row[8]);
|
||||
entry.variance = atoi(row[9]);
|
||||
entry.pathgrid = atoi(row[10]);
|
||||
entry._condition = atoi(row[11]);
|
||||
entry.cond_value = atoi(row[12]);
|
||||
entry.enabled = atoi(row[13]);
|
||||
entry.animation = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -53,6 +53,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -81,6 +82,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -131,24 +133,25 @@ public:
|
||||
{
|
||||
StartZones entry{};
|
||||
|
||||
entry.x = 0;
|
||||
entry.y = 0;
|
||||
entry.z = 0;
|
||||
entry.heading = 0;
|
||||
entry.zone_id = 0;
|
||||
entry.bind_id = 0;
|
||||
entry.player_choice = 0;
|
||||
entry.player_class = 0;
|
||||
entry.player_deity = 0;
|
||||
entry.player_race = 0;
|
||||
entry.start_zone = 0;
|
||||
entry.bind_x = 0;
|
||||
entry.bind_y = 0;
|
||||
entry.bind_z = 0;
|
||||
entry.select_rank = 50;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.x = 0;
|
||||
entry.y = 0;
|
||||
entry.z = 0;
|
||||
entry.heading = 0;
|
||||
entry.zone_id = 0;
|
||||
entry.bind_id = 0;
|
||||
entry.player_choice = 0;
|
||||
entry.player_class = 0;
|
||||
entry.player_deity = 0;
|
||||
entry.player_race = 0;
|
||||
entry.start_zone = 0;
|
||||
entry.bind_x = 0;
|
||||
entry.bind_y = 0;
|
||||
entry.bind_z = 0;
|
||||
entry.select_rank = 50;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -183,24 +186,25 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
StartZones entry{};
|
||||
|
||||
entry.x = static_cast<float>(atof(row[0]));
|
||||
entry.y = static_cast<float>(atof(row[1]));
|
||||
entry.z = static_cast<float>(atof(row[2]));
|
||||
entry.heading = static_cast<float>(atof(row[3]));
|
||||
entry.zone_id = atoi(row[4]);
|
||||
entry.bind_id = atoi(row[5]);
|
||||
entry.player_choice = atoi(row[6]);
|
||||
entry.player_class = atoi(row[7]);
|
||||
entry.player_deity = atoi(row[8]);
|
||||
entry.player_race = atoi(row[9]);
|
||||
entry.start_zone = atoi(row[10]);
|
||||
entry.bind_x = static_cast<float>(atof(row[11]));
|
||||
entry.bind_y = static_cast<float>(atof(row[12]));
|
||||
entry.bind_z = static_cast<float>(atof(row[13]));
|
||||
entry.select_rank = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.x = static_cast<float>(atof(row[0]));
|
||||
entry.y = static_cast<float>(atof(row[1]));
|
||||
entry.z = static_cast<float>(atof(row[2]));
|
||||
entry.heading = static_cast<float>(atof(row[3]));
|
||||
entry.zone_id = atoi(row[4]);
|
||||
entry.bind_id = atoi(row[5]);
|
||||
entry.player_choice = atoi(row[6]);
|
||||
entry.player_class = atoi(row[7]);
|
||||
entry.player_deity = atoi(row[8]);
|
||||
entry.player_race = atoi(row[9]);
|
||||
entry.start_zone = atoi(row[10]);
|
||||
entry.bind_x = static_cast<float>(atof(row[11]));
|
||||
entry.bind_y = static_cast<float>(atof(row[12]));
|
||||
entry.bind_z = static_cast<float>(atof(row[13]));
|
||||
entry.select_rank = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -250,6 +254,7 @@ public:
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(start_zones_entry.min_expansion));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(start_zones_entry.max_expansion));
|
||||
update_values.push_back(columns[17] + " = '" + EscapeString(start_zones_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + EscapeString(start_zones_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -288,6 +293,7 @@ public:
|
||||
insert_values.push_back(std::to_string(start_zones_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(start_zones_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(start_zones_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(start_zones_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -334,6 +340,7 @@ public:
|
||||
insert_values.push_back(std::to_string(start_zones_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(start_zones_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(start_zones_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(start_zones_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -367,24 +374,25 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
StartZones entry{};
|
||||
|
||||
entry.x = static_cast<float>(atof(row[0]));
|
||||
entry.y = static_cast<float>(atof(row[1]));
|
||||
entry.z = static_cast<float>(atof(row[2]));
|
||||
entry.heading = static_cast<float>(atof(row[3]));
|
||||
entry.zone_id = atoi(row[4]);
|
||||
entry.bind_id = atoi(row[5]);
|
||||
entry.player_choice = atoi(row[6]);
|
||||
entry.player_class = atoi(row[7]);
|
||||
entry.player_deity = atoi(row[8]);
|
||||
entry.player_race = atoi(row[9]);
|
||||
entry.start_zone = atoi(row[10]);
|
||||
entry.bind_x = static_cast<float>(atof(row[11]));
|
||||
entry.bind_y = static_cast<float>(atof(row[12]));
|
||||
entry.bind_z = static_cast<float>(atof(row[13]));
|
||||
entry.select_rank = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.x = static_cast<float>(atof(row[0]));
|
||||
entry.y = static_cast<float>(atof(row[1]));
|
||||
entry.z = static_cast<float>(atof(row[2]));
|
||||
entry.heading = static_cast<float>(atof(row[3]));
|
||||
entry.zone_id = atoi(row[4]);
|
||||
entry.bind_id = atoi(row[5]);
|
||||
entry.player_choice = atoi(row[6]);
|
||||
entry.player_class = atoi(row[7]);
|
||||
entry.player_deity = atoi(row[8]);
|
||||
entry.player_race = atoi(row[9]);
|
||||
entry.start_zone = atoi(row[10]);
|
||||
entry.bind_x = static_cast<float>(atof(row[11]));
|
||||
entry.bind_y = static_cast<float>(atof(row[12]));
|
||||
entry.bind_z = static_cast<float>(atof(row[13]));
|
||||
entry.select_rank = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -409,24 +417,25 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
StartZones entry{};
|
||||
|
||||
entry.x = static_cast<float>(atof(row[0]));
|
||||
entry.y = static_cast<float>(atof(row[1]));
|
||||
entry.z = static_cast<float>(atof(row[2]));
|
||||
entry.heading = static_cast<float>(atof(row[3]));
|
||||
entry.zone_id = atoi(row[4]);
|
||||
entry.bind_id = atoi(row[5]);
|
||||
entry.player_choice = atoi(row[6]);
|
||||
entry.player_class = atoi(row[7]);
|
||||
entry.player_deity = atoi(row[8]);
|
||||
entry.player_race = atoi(row[9]);
|
||||
entry.start_zone = atoi(row[10]);
|
||||
entry.bind_x = static_cast<float>(atof(row[11]));
|
||||
entry.bind_y = static_cast<float>(atof(row[12]));
|
||||
entry.bind_z = static_cast<float>(atof(row[13]));
|
||||
entry.select_rank = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.x = static_cast<float>(atof(row[0]));
|
||||
entry.y = static_cast<float>(atof(row[1]));
|
||||
entry.z = static_cast<float>(atof(row[2]));
|
||||
entry.heading = static_cast<float>(atof(row[3]));
|
||||
entry.zone_id = atoi(row[4]);
|
||||
entry.bind_id = atoi(row[5]);
|
||||
entry.player_choice = atoi(row[6]);
|
||||
entry.player_class = atoi(row[7]);
|
||||
entry.player_deity = atoi(row[8]);
|
||||
entry.player_race = atoi(row[9]);
|
||||
entry.start_zone = atoi(row[10]);
|
||||
entry.bind_x = static_cast<float>(atof(row[11]));
|
||||
entry.bind_y = static_cast<float>(atof(row[12]));
|
||||
entry.bind_z = static_cast<float>(atof(row[13]));
|
||||
entry.select_rank = atoi(row[14]);
|
||||
entry.min_expansion = atoi(row[15]);
|
||||
entry.max_expansion = atoi(row[16]);
|
||||
entry.content_flags = row[17] ? row[17] : "";
|
||||
entry.content_flags_disabled = row[18] ? row[18] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -47,6 +47,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -69,6 +70,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -119,18 +121,19 @@ public:
|
||||
{
|
||||
StartingItems entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.race = 0;
|
||||
entry.class = 0;
|
||||
entry.deityid = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.itemid = 0;
|
||||
entry.item_charges = 1;
|
||||
entry.gm = 0;
|
||||
entry.slot = -1;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.race = 0;
|
||||
entry.class = 0;
|
||||
entry.deityid = 0;
|
||||
entry.zoneid = 0;
|
||||
entry.itemid = 0;
|
||||
entry.item_charges = 1;
|
||||
entry.gm = 0;
|
||||
entry.slot = -1;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -165,18 +168,19 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
StartingItems entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.deityid = atoi(row[3]);
|
||||
entry.zoneid = atoi(row[4]);
|
||||
entry.itemid = atoi(row[5]);
|
||||
entry.item_charges = atoi(row[6]);
|
||||
entry.gm = atoi(row[7]);
|
||||
entry.slot = atoi(row[8]);
|
||||
entry.min_expansion = atoi(row[9]);
|
||||
entry.max_expansion = atoi(row[10]);
|
||||
entry.content_flags = row[11] ? row[11] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.deityid = atoi(row[3]);
|
||||
entry.zoneid = atoi(row[4]);
|
||||
entry.itemid = atoi(row[5]);
|
||||
entry.item_charges = atoi(row[6]);
|
||||
entry.gm = atoi(row[7]);
|
||||
entry.slot = atoi(row[8]);
|
||||
entry.min_expansion = atoi(row[9]);
|
||||
entry.max_expansion = atoi(row[10]);
|
||||
entry.content_flags = row[11] ? row[11] : "";
|
||||
entry.content_flags_disabled = row[12] ? row[12] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -219,6 +223,7 @@ public:
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(starting_items_entry.min_expansion));
|
||||
update_values.push_back(columns[10] + " = " + std::to_string(starting_items_entry.max_expansion));
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(starting_items_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[12] + " = '" + EscapeString(starting_items_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -250,6 +255,7 @@ public:
|
||||
insert_values.push_back(std::to_string(starting_items_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(starting_items_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(starting_items_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(starting_items_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -289,6 +295,7 @@ public:
|
||||
insert_values.push_back(std::to_string(starting_items_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(starting_items_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(starting_items_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(starting_items_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -322,18 +329,19 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
StartingItems entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.deityid = atoi(row[3]);
|
||||
entry.zoneid = atoi(row[4]);
|
||||
entry.itemid = atoi(row[5]);
|
||||
entry.item_charges = atoi(row[6]);
|
||||
entry.gm = atoi(row[7]);
|
||||
entry.slot = atoi(row[8]);
|
||||
entry.min_expansion = atoi(row[9]);
|
||||
entry.max_expansion = atoi(row[10]);
|
||||
entry.content_flags = row[11] ? row[11] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.deityid = atoi(row[3]);
|
||||
entry.zoneid = atoi(row[4]);
|
||||
entry.itemid = atoi(row[5]);
|
||||
entry.item_charges = atoi(row[6]);
|
||||
entry.gm = atoi(row[7]);
|
||||
entry.slot = atoi(row[8]);
|
||||
entry.min_expansion = atoi(row[9]);
|
||||
entry.max_expansion = atoi(row[10]);
|
||||
entry.content_flags = row[11] ? row[11] : "";
|
||||
entry.content_flags_disabled = row[12] ? row[12] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -358,18 +366,19 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
StartingItems entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.deityid = atoi(row[3]);
|
||||
entry.zoneid = atoi(row[4]);
|
||||
entry.itemid = atoi(row[5]);
|
||||
entry.item_charges = atoi(row[6]);
|
||||
entry.gm = atoi(row[7]);
|
||||
entry.slot = atoi(row[8]);
|
||||
entry.min_expansion = atoi(row[9]);
|
||||
entry.max_expansion = atoi(row[10]);
|
||||
entry.content_flags = row[11] ? row[11] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.race = atoi(row[1]);
|
||||
entry.class = atoi(row[2]);
|
||||
entry.deityid = atoi(row[3]);
|
||||
entry.zoneid = atoi(row[4]);
|
||||
entry.itemid = atoi(row[5]);
|
||||
entry.item_charges = atoi(row[6]);
|
||||
entry.gm = atoi(row[7]);
|
||||
entry.slot = atoi(row[8]);
|
||||
entry.min_expansion = atoi(row[9]);
|
||||
entry.max_expansion = atoi(row[10]);
|
||||
entry.content_flags = row[11] ? row[11] : "";
|
||||
entry.content_flags_disabled = row[12] ? row[12] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -49,9 +49,6 @@ public:
|
||||
std::string prefix;
|
||||
std::string suffix;
|
||||
int title_set;
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -76,9 +73,6 @@ public:
|
||||
"prefix",
|
||||
"suffix",
|
||||
"title_set",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
};
|
||||
}
|
||||
|
||||
@ -143,9 +137,6 @@ public:
|
||||
entry.prefix = "";
|
||||
entry.suffix = "";
|
||||
entry.title_set = 0;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -194,9 +185,6 @@ public:
|
||||
entry.prefix = row[11] ? row[11] : "";
|
||||
entry.suffix = row[12] ? row[12] : "";
|
||||
entry.title_set = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -241,9 +229,6 @@ public:
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(titles_entry.prefix) + "'");
|
||||
update_values.push_back(columns[12] + " = '" + EscapeString(titles_entry.suffix) + "'");
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(titles_entry.title_set));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(titles_entry.min_expansion));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(titles_entry.max_expansion));
|
||||
update_values.push_back(columns[16] + " = '" + EscapeString(titles_entry.content_flags) + "'");
|
||||
|
||||
auto results = database.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -277,9 +262,6 @@ public:
|
||||
insert_values.push_back("'" + EscapeString(titles_entry.prefix) + "'");
|
||||
insert_values.push_back("'" + EscapeString(titles_entry.suffix) + "'");
|
||||
insert_values.push_back(std::to_string(titles_entry.title_set));
|
||||
insert_values.push_back(std::to_string(titles_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(titles_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(titles_entry.content_flags) + "'");
|
||||
|
||||
auto results = database.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -321,9 +303,6 @@ public:
|
||||
insert_values.push_back("'" + EscapeString(titles_entry.prefix) + "'");
|
||||
insert_values.push_back("'" + EscapeString(titles_entry.suffix) + "'");
|
||||
insert_values.push_back(std::to_string(titles_entry.title_set));
|
||||
insert_values.push_back(std::to_string(titles_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(titles_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(titles_entry.content_flags) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -371,9 +350,6 @@ public:
|
||||
entry.prefix = row[11] ? row[11] : "";
|
||||
entry.suffix = row[12] ? row[12] : "";
|
||||
entry.title_set = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -412,9 +388,6 @@ public:
|
||||
entry.prefix = row[11] ? row[11] : "";
|
||||
entry.suffix = row[12] ? row[12] : "";
|
||||
entry.title_set = atoi(row[13]);
|
||||
entry.min_expansion = atoi(row[14]);
|
||||
entry.max_expansion = atoi(row[15]);
|
||||
entry.content_flags = row[16] ? row[16] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -49,6 +49,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -73,6 +74,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -123,20 +125,21 @@ public:
|
||||
{
|
||||
TradeskillRecipe entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.name = "";
|
||||
entry.tradeskill = 0;
|
||||
entry.skillneeded = 0;
|
||||
entry.trivial = 0;
|
||||
entry.nofail = 0;
|
||||
entry.replace_container = 0;
|
||||
entry.notes = "";
|
||||
entry.must_learn = 0;
|
||||
entry.quest = 0;
|
||||
entry.enabled = 1;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.name = "";
|
||||
entry.tradeskill = 0;
|
||||
entry.skillneeded = 0;
|
||||
entry.trivial = 0;
|
||||
entry.nofail = 0;
|
||||
entry.replace_container = 0;
|
||||
entry.notes = "";
|
||||
entry.must_learn = 0;
|
||||
entry.quest = 0;
|
||||
entry.enabled = 1;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -171,20 +174,21 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
TradeskillRecipe entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.tradeskill = atoi(row[2]);
|
||||
entry.skillneeded = atoi(row[3]);
|
||||
entry.trivial = atoi(row[4]);
|
||||
entry.nofail = atoi(row[5]);
|
||||
entry.replace_container = atoi(row[6]);
|
||||
entry.notes = row[7] ? row[7] : "";
|
||||
entry.must_learn = atoi(row[8]);
|
||||
entry.quest = atoi(row[9]);
|
||||
entry.enabled = atoi(row[10]);
|
||||
entry.min_expansion = atoi(row[11]);
|
||||
entry.max_expansion = atoi(row[12]);
|
||||
entry.content_flags = row[13] ? row[13] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.tradeskill = atoi(row[2]);
|
||||
entry.skillneeded = atoi(row[3]);
|
||||
entry.trivial = atoi(row[4]);
|
||||
entry.nofail = atoi(row[5]);
|
||||
entry.replace_container = atoi(row[6]);
|
||||
entry.notes = row[7] ? row[7] : "";
|
||||
entry.must_learn = atoi(row[8]);
|
||||
entry.quest = atoi(row[9]);
|
||||
entry.enabled = atoi(row[10]);
|
||||
entry.min_expansion = atoi(row[11]);
|
||||
entry.max_expansion = atoi(row[12]);
|
||||
entry.content_flags = row[13] ? row[13] : "";
|
||||
entry.content_flags_disabled = row[14] ? row[14] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -229,6 +233,7 @@ public:
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(tradeskill_recipe_entry.min_expansion));
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(tradeskill_recipe_entry.max_expansion));
|
||||
update_values.push_back(columns[13] + " = '" + EscapeString(tradeskill_recipe_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[14] + " = '" + EscapeString(tradeskill_recipe_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -262,6 +267,7 @@ public:
|
||||
insert_values.push_back(std::to_string(tradeskill_recipe_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(tradeskill_recipe_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -303,6 +309,7 @@ public:
|
||||
insert_values.push_back(std::to_string(tradeskill_recipe_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(tradeskill_recipe_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -336,20 +343,21 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
TradeskillRecipe entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.tradeskill = atoi(row[2]);
|
||||
entry.skillneeded = atoi(row[3]);
|
||||
entry.trivial = atoi(row[4]);
|
||||
entry.nofail = atoi(row[5]);
|
||||
entry.replace_container = atoi(row[6]);
|
||||
entry.notes = row[7] ? row[7] : "";
|
||||
entry.must_learn = atoi(row[8]);
|
||||
entry.quest = atoi(row[9]);
|
||||
entry.enabled = atoi(row[10]);
|
||||
entry.min_expansion = atoi(row[11]);
|
||||
entry.max_expansion = atoi(row[12]);
|
||||
entry.content_flags = row[13] ? row[13] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.tradeskill = atoi(row[2]);
|
||||
entry.skillneeded = atoi(row[3]);
|
||||
entry.trivial = atoi(row[4]);
|
||||
entry.nofail = atoi(row[5]);
|
||||
entry.replace_container = atoi(row[6]);
|
||||
entry.notes = row[7] ? row[7] : "";
|
||||
entry.must_learn = atoi(row[8]);
|
||||
entry.quest = atoi(row[9]);
|
||||
entry.enabled = atoi(row[10]);
|
||||
entry.min_expansion = atoi(row[11]);
|
||||
entry.max_expansion = atoi(row[12]);
|
||||
entry.content_flags = row[13] ? row[13] : "";
|
||||
entry.content_flags_disabled = row[14] ? row[14] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -374,20 +382,21 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
TradeskillRecipe entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.tradeskill = atoi(row[2]);
|
||||
entry.skillneeded = atoi(row[3]);
|
||||
entry.trivial = atoi(row[4]);
|
||||
entry.nofail = atoi(row[5]);
|
||||
entry.replace_container = atoi(row[6]);
|
||||
entry.notes = row[7] ? row[7] : "";
|
||||
entry.must_learn = atoi(row[8]);
|
||||
entry.quest = atoi(row[9]);
|
||||
entry.enabled = atoi(row[10]);
|
||||
entry.min_expansion = atoi(row[11]);
|
||||
entry.max_expansion = atoi(row[12]);
|
||||
entry.content_flags = row[13] ? row[13] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.name = row[1] ? row[1] : "";
|
||||
entry.tradeskill = atoi(row[2]);
|
||||
entry.skillneeded = atoi(row[3]);
|
||||
entry.trivial = atoi(row[4]);
|
||||
entry.nofail = atoi(row[5]);
|
||||
entry.replace_container = atoi(row[6]);
|
||||
entry.notes = row[7] ? row[7] : "";
|
||||
entry.must_learn = atoi(row[8]);
|
||||
entry.quest = atoi(row[9]);
|
||||
entry.enabled = atoi(row[10]);
|
||||
entry.min_expansion = atoi(row[11]);
|
||||
entry.max_expansion = atoi(row[12]);
|
||||
entry.content_flags = row[13] ? row[13] : "";
|
||||
entry.content_flags_disabled = row[14] ? row[14] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -59,6 +59,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -93,6 +94,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -167,6 +169,7 @@ public:
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -225,6 +228,7 @@ public:
|
||||
entry.min_expansion = atoi(row[21]);
|
||||
entry.max_expansion = atoi(row[22]);
|
||||
entry.content_flags = row[23] ? row[23] : "";
|
||||
entry.content_flags_disabled = row[24] ? row[24] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -279,6 +283,7 @@ public:
|
||||
update_values.push_back(columns[21] + " = " + std::to_string(traps_entry.min_expansion));
|
||||
update_values.push_back(columns[22] + " = " + std::to_string(traps_entry.max_expansion));
|
||||
update_values.push_back(columns[23] + " = '" + EscapeString(traps_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[24] + " = '" + EscapeString(traps_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -322,6 +327,7 @@ public:
|
||||
insert_values.push_back(std::to_string(traps_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(traps_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(traps_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(traps_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -373,6 +379,7 @@ public:
|
||||
insert_values.push_back(std::to_string(traps_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(traps_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(traps_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(traps_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -430,6 +437,7 @@ public:
|
||||
entry.min_expansion = atoi(row[21]);
|
||||
entry.max_expansion = atoi(row[22]);
|
||||
entry.content_flags = row[23] ? row[23] : "";
|
||||
entry.content_flags_disabled = row[24] ? row[24] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -478,6 +486,7 @@ public:
|
||||
entry.min_expansion = atoi(row[21]);
|
||||
entry.max_expansion = atoi(row[22]);
|
||||
entry.content_flags = row[23] ? row[23] : "";
|
||||
entry.content_flags_disabled = row[24] ? row[24] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -55,6 +55,7 @@ public:
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -85,6 +86,7 @@ public:
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -135,26 +137,27 @@ public:
|
||||
{
|
||||
ZonePoints entry{};
|
||||
|
||||
entry.id = 0;
|
||||
entry.zone = "";
|
||||
entry.version = 0;
|
||||
entry.number = 1;
|
||||
entry.y = 0;
|
||||
entry.x = 0;
|
||||
entry.z = 0;
|
||||
entry.heading = 0;
|
||||
entry.target_y = 0;
|
||||
entry.target_x = 0;
|
||||
entry.target_z = 0;
|
||||
entry.target_heading = 0;
|
||||
entry.zoneinst = 0;
|
||||
entry.target_zone_id = 0;
|
||||
entry.target_instance = 0;
|
||||
entry.buffer = 0;
|
||||
entry.client_version_mask = 4294967295;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.id = 0;
|
||||
entry.zone = "";
|
||||
entry.version = 0;
|
||||
entry.number = 1;
|
||||
entry.y = 0;
|
||||
entry.x = 0;
|
||||
entry.z = 0;
|
||||
entry.heading = 0;
|
||||
entry.target_y = 0;
|
||||
entry.target_x = 0;
|
||||
entry.target_z = 0;
|
||||
entry.target_heading = 0;
|
||||
entry.zoneinst = 0;
|
||||
entry.target_zone_id = 0;
|
||||
entry.target_instance = 0;
|
||||
entry.buffer = 0;
|
||||
entry.client_version_mask = 4294967295;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -189,26 +192,27 @@ public:
|
||||
if (results.RowCount() == 1) {
|
||||
ZonePoints entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zone = row[1] ? row[1] : "";
|
||||
entry.version = atoi(row[2]);
|
||||
entry.number = atoi(row[3]);
|
||||
entry.y = static_cast<float>(atof(row[4]));
|
||||
entry.x = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.target_y = static_cast<float>(atof(row[8]));
|
||||
entry.target_x = static_cast<float>(atof(row[9]));
|
||||
entry.target_z = static_cast<float>(atof(row[10]));
|
||||
entry.target_heading = static_cast<float>(atof(row[11]));
|
||||
entry.zoneinst = atoi(row[12]);
|
||||
entry.target_zone_id = atoi(row[13]);
|
||||
entry.target_instance = atoi(row[14]);
|
||||
entry.buffer = static_cast<float>(atof(row[15]));
|
||||
entry.client_version_mask = atoi(row[16]);
|
||||
entry.min_expansion = atoi(row[17]);
|
||||
entry.max_expansion = atoi(row[18]);
|
||||
entry.content_flags = row[19] ? row[19] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zone = row[1] ? row[1] : "";
|
||||
entry.version = atoi(row[2]);
|
||||
entry.number = atoi(row[3]);
|
||||
entry.y = static_cast<float>(atof(row[4]));
|
||||
entry.x = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.target_y = static_cast<float>(atof(row[8]));
|
||||
entry.target_x = static_cast<float>(atof(row[9]));
|
||||
entry.target_z = static_cast<float>(atof(row[10]));
|
||||
entry.target_heading = static_cast<float>(atof(row[11]));
|
||||
entry.zoneinst = atoi(row[12]);
|
||||
entry.target_zone_id = atoi(row[13]);
|
||||
entry.target_instance = atoi(row[14]);
|
||||
entry.buffer = static_cast<float>(atof(row[15]));
|
||||
entry.client_version_mask = atoi(row[16]);
|
||||
entry.min_expansion = atoi(row[17]);
|
||||
entry.max_expansion = atoi(row[18]);
|
||||
entry.content_flags = row[19] ? row[19] : "";
|
||||
entry.content_flags_disabled = row[20] ? row[20] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -259,6 +263,7 @@ public:
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(zone_points_entry.min_expansion));
|
||||
update_values.push_back(columns[18] + " = " + std::to_string(zone_points_entry.max_expansion));
|
||||
update_values.push_back(columns[19] + " = '" + EscapeString(zone_points_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[20] + " = '" + EscapeString(zone_points_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -298,6 +303,7 @@ public:
|
||||
insert_values.push_back(std::to_string(zone_points_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(zone_points_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(zone_points_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(zone_points_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -345,6 +351,7 @@ public:
|
||||
insert_values.push_back(std::to_string(zone_points_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(zone_points_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(zone_points_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(zone_points_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -378,26 +385,27 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
ZonePoints entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zone = row[1] ? row[1] : "";
|
||||
entry.version = atoi(row[2]);
|
||||
entry.number = atoi(row[3]);
|
||||
entry.y = static_cast<float>(atof(row[4]));
|
||||
entry.x = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.target_y = static_cast<float>(atof(row[8]));
|
||||
entry.target_x = static_cast<float>(atof(row[9]));
|
||||
entry.target_z = static_cast<float>(atof(row[10]));
|
||||
entry.target_heading = static_cast<float>(atof(row[11]));
|
||||
entry.zoneinst = atoi(row[12]);
|
||||
entry.target_zone_id = atoi(row[13]);
|
||||
entry.target_instance = atoi(row[14]);
|
||||
entry.buffer = static_cast<float>(atof(row[15]));
|
||||
entry.client_version_mask = atoi(row[16]);
|
||||
entry.min_expansion = atoi(row[17]);
|
||||
entry.max_expansion = atoi(row[18]);
|
||||
entry.content_flags = row[19] ? row[19] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zone = row[1] ? row[1] : "";
|
||||
entry.version = atoi(row[2]);
|
||||
entry.number = atoi(row[3]);
|
||||
entry.y = static_cast<float>(atof(row[4]));
|
||||
entry.x = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.target_y = static_cast<float>(atof(row[8]));
|
||||
entry.target_x = static_cast<float>(atof(row[9]));
|
||||
entry.target_z = static_cast<float>(atof(row[10]));
|
||||
entry.target_heading = static_cast<float>(atof(row[11]));
|
||||
entry.zoneinst = atoi(row[12]);
|
||||
entry.target_zone_id = atoi(row[13]);
|
||||
entry.target_instance = atoi(row[14]);
|
||||
entry.buffer = static_cast<float>(atof(row[15]));
|
||||
entry.client_version_mask = atoi(row[16]);
|
||||
entry.min_expansion = atoi(row[17]);
|
||||
entry.max_expansion = atoi(row[18]);
|
||||
entry.content_flags = row[19] ? row[19] : "";
|
||||
entry.content_flags_disabled = row[20] ? row[20] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -422,26 +430,27 @@ public:
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
ZonePoints entry{};
|
||||
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zone = row[1] ? row[1] : "";
|
||||
entry.version = atoi(row[2]);
|
||||
entry.number = atoi(row[3]);
|
||||
entry.y = static_cast<float>(atof(row[4]));
|
||||
entry.x = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.target_y = static_cast<float>(atof(row[8]));
|
||||
entry.target_x = static_cast<float>(atof(row[9]));
|
||||
entry.target_z = static_cast<float>(atof(row[10]));
|
||||
entry.target_heading = static_cast<float>(atof(row[11]));
|
||||
entry.zoneinst = atoi(row[12]);
|
||||
entry.target_zone_id = atoi(row[13]);
|
||||
entry.target_instance = atoi(row[14]);
|
||||
entry.buffer = static_cast<float>(atof(row[15]));
|
||||
entry.client_version_mask = atoi(row[16]);
|
||||
entry.min_expansion = atoi(row[17]);
|
||||
entry.max_expansion = atoi(row[18]);
|
||||
entry.content_flags = row[19] ? row[19] : "";
|
||||
entry.id = atoi(row[0]);
|
||||
entry.zone = row[1] ? row[1] : "";
|
||||
entry.version = atoi(row[2]);
|
||||
entry.number = atoi(row[3]);
|
||||
entry.y = static_cast<float>(atof(row[4]));
|
||||
entry.x = static_cast<float>(atof(row[5]));
|
||||
entry.z = static_cast<float>(atof(row[6]));
|
||||
entry.heading = static_cast<float>(atof(row[7]));
|
||||
entry.target_y = static_cast<float>(atof(row[8]));
|
||||
entry.target_x = static_cast<float>(atof(row[9]));
|
||||
entry.target_z = static_cast<float>(atof(row[10]));
|
||||
entry.target_heading = static_cast<float>(atof(row[11]));
|
||||
entry.zoneinst = atoi(row[12]);
|
||||
entry.target_zone_id = atoi(row[13]);
|
||||
entry.target_instance = atoi(row[14]);
|
||||
entry.buffer = static_cast<float>(atof(row[15]));
|
||||
entry.client_version_mask = atoi(row[16]);
|
||||
entry.min_expansion = atoi(row[17]);
|
||||
entry.max_expansion = atoi(row[18]);
|
||||
entry.content_flags = row[19] ? row[19] : "";
|
||||
entry.content_flags_disabled = row[20] ? row[20] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -121,6 +121,10 @@ public:
|
||||
int fast_regen_endurance;
|
||||
int npc_max_aggro_dist;
|
||||
int max_movement_update_range;
|
||||
int min_expansion;
|
||||
int max_expansion;
|
||||
std::string content_flags;
|
||||
std::string content_flags_disabled;
|
||||
};
|
||||
|
||||
static std::string PrimaryKey()
|
||||
@ -217,6 +221,10 @@ public:
|
||||
"fast_regen_endurance",
|
||||
"npc_max_aggro_dist",
|
||||
"max_movement_update_range",
|
||||
"min_expansion",
|
||||
"max_expansion",
|
||||
"content_flags",
|
||||
"content_flags_disabled",
|
||||
};
|
||||
}
|
||||
|
||||
@ -353,6 +361,10 @@ public:
|
||||
entry.fast_regen_endurance = 180;
|
||||
entry.npc_max_aggro_dist = 600;
|
||||
entry.max_movement_update_range = 600;
|
||||
entry.min_expansion = 0;
|
||||
entry.max_expansion = 0;
|
||||
entry.content_flags = "";
|
||||
entry.content_flags_disabled = "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -473,6 +485,10 @@ public:
|
||||
entry.fast_regen_endurance = atoi(row[83]);
|
||||
entry.npc_max_aggro_dist = atoi(row[84]);
|
||||
entry.max_movement_update_range = atoi(row[85]);
|
||||
entry.min_expansion = atoi(row[86]);
|
||||
entry.max_expansion = atoi(row[87]);
|
||||
entry.content_flags = row[88] ? row[88] : "";
|
||||
entry.content_flags_disabled = row[89] ? row[89] : "";
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -589,6 +605,10 @@ public:
|
||||
update_values.push_back(columns[83] + " = " + std::to_string(zone_entry.fast_regen_endurance));
|
||||
update_values.push_back(columns[84] + " = " + std::to_string(zone_entry.npc_max_aggro_dist));
|
||||
update_values.push_back(columns[85] + " = " + std::to_string(zone_entry.max_movement_update_range));
|
||||
update_values.push_back(columns[86] + " = " + std::to_string(zone_entry.min_expansion));
|
||||
update_values.push_back(columns[87] + " = " + std::to_string(zone_entry.max_expansion));
|
||||
update_values.push_back(columns[88] + " = '" + EscapeString(zone_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[89] + " = '" + EscapeString(zone_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -694,6 +714,10 @@ public:
|
||||
insert_values.push_back(std::to_string(zone_entry.fast_regen_endurance));
|
||||
insert_values.push_back(std::to_string(zone_entry.npc_max_aggro_dist));
|
||||
insert_values.push_back(std::to_string(zone_entry.max_movement_update_range));
|
||||
insert_values.push_back(std::to_string(zone_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(zone_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(zone_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(zone_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = content_db.QueryDatabase(
|
||||
fmt::format(
|
||||
@ -807,6 +831,10 @@ public:
|
||||
insert_values.push_back(std::to_string(zone_entry.fast_regen_endurance));
|
||||
insert_values.push_back(std::to_string(zone_entry.npc_max_aggro_dist));
|
||||
insert_values.push_back(std::to_string(zone_entry.max_movement_update_range));
|
||||
insert_values.push_back(std::to_string(zone_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(zone_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(zone_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(zone_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
@ -926,6 +954,10 @@ public:
|
||||
entry.fast_regen_endurance = atoi(row[83]);
|
||||
entry.npc_max_aggro_dist = atoi(row[84]);
|
||||
entry.max_movement_update_range = atoi(row[85]);
|
||||
entry.min_expansion = atoi(row[86]);
|
||||
entry.max_expansion = atoi(row[87]);
|
||||
entry.content_flags = row[88] ? row[88] : "";
|
||||
entry.content_flags_disabled = row[89] ? row[89] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -1036,6 +1068,10 @@ public:
|
||||
entry.fast_regen_endurance = atoi(row[83]);
|
||||
entry.npc_max_aggro_dist = atoi(row[84]);
|
||||
entry.max_movement_update_range = atoi(row[85]);
|
||||
entry.min_expansion = atoi(row[86]);
|
||||
entry.max_expansion = atoi(row[87]);
|
||||
entry.content_flags = row[88] ? row[88] : "";
|
||||
entry.content_flags_disabled = row[89] ? row[89] : "";
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user