Update repositories

This commit is contained in:
Akkadius 2020-08-15 18:28:34 -05:00
parent bda13383ef
commit 3ffb5299a8
19 changed files with 1155 additions and 966 deletions

View File

@ -41,9 +41,6 @@ public:
int deity; int deity;
int start_zone; int start_zone;
int expansions_req; int expansions_req;
int min_expansion;
int max_expansion;
std::string content_flags;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -60,9 +57,6 @@ public:
"deity", "deity",
"start_zone", "start_zone",
"expansions_req", "expansions_req",
"min_expansion",
"max_expansion",
"content_flags",
}; };
} }
@ -119,9 +113,6 @@ public:
entry.deity = 0; entry.deity = 0;
entry.start_zone = 0; entry.start_zone = 0;
entry.expansions_req = 0; entry.expansions_req = 0;
entry.min_expansion = 0;
entry.max_expansion = 0;
entry.content_flags = "";
return entry; return entry;
} }
@ -162,9 +153,6 @@ public:
entry.deity = atoi(row[3]); entry.deity = atoi(row[3]);
entry.start_zone = atoi(row[4]); entry.start_zone = atoi(row[4]);
entry.expansions_req = atoi(row[5]); 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; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.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.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.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( auto results = content_db.QueryDatabase(
fmt::format( 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.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.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.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) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -310,9 +289,6 @@ public:
entry.deity = atoi(row[3]); entry.deity = atoi(row[3]);
entry.start_zone = atoi(row[4]); entry.start_zone = atoi(row[4]);
entry.expansions_req = atoi(row[5]); 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); all_entries.push_back(entry);
} }
@ -343,9 +319,6 @@ public:
entry.deity = atoi(row[3]); entry.deity = atoi(row[3]);
entry.start_zone = atoi(row[4]); entry.start_zone = atoi(row[4]);
entry.expansions_req = atoi(row[5]); 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); all_entries.push_back(entry);
} }

View File

@ -69,6 +69,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -113,6 +114,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -197,6 +199,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -265,6 +268,7 @@ public:
entry.min_expansion = atoi(row[31]); entry.min_expansion = atoi(row[31]);
entry.max_expansion = atoi(row[32]); entry.max_expansion = atoi(row[32]);
entry.content_flags = row[33] ? row[33] : ""; entry.content_flags = row[33] ? row[33] : "";
entry.content_flags_disabled = row[34] ? row[34] : "";
return entry; 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[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[32] + " = " + std::to_string(doors_entry.max_expansion));
update_values.push_back(columns[33] + " = '" + EscapeString(doors_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(doors_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(doors_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -510,6 +517,7 @@ public:
entry.min_expansion = atoi(row[31]); entry.min_expansion = atoi(row[31]);
entry.max_expansion = atoi(row[32]); entry.max_expansion = atoi(row[32]);
entry.content_flags = row[33] ? row[33] : ""; entry.content_flags = row[33] ? row[33] : "";
entry.content_flags_disabled = row[34] ? row[34] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -568,6 +576,7 @@ public:
entry.min_expansion = atoi(row[31]); entry.min_expansion = atoi(row[31]);
entry.max_expansion = atoi(row[32]); entry.max_expansion = atoi(row[32]);
entry.content_flags = row[33] ? row[33] : ""; entry.content_flags = row[33] ? row[33] : "";
entry.content_flags_disabled = row[34] ? row[34] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -45,6 +45,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -65,6 +66,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -125,6 +127,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -169,6 +172,7 @@ public:
entry.min_expansion = atoi(row[7]); entry.min_expansion = atoi(row[7]);
entry.max_expansion = atoi(row[8]); entry.max_expansion = atoi(row[8]);
entry.content_flags = row[9] ? row[9] : ""; entry.content_flags = row[9] ? row[9] : "";
entry.content_flags_disabled = row[10] ? row[10] : "";
return entry; 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[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[8] + " = " + std::to_string(fishing_entry.max_expansion));
update_values.push_back(columns[9] + " = '" + EscapeString(fishing_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(fishing_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(fishing_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -318,6 +325,7 @@ public:
entry.min_expansion = atoi(row[7]); entry.min_expansion = atoi(row[7]);
entry.max_expansion = atoi(row[8]); entry.max_expansion = atoi(row[8]);
entry.content_flags = row[9] ? row[9] : ""; entry.content_flags = row[9] ? row[9] : "";
entry.content_flags_disabled = row[10] ? row[10] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -352,6 +360,7 @@ public:
entry.min_expansion = atoi(row[7]); entry.min_expansion = atoi(row[7]);
entry.max_expansion = atoi(row[8]); entry.max_expansion = atoi(row[8]);
entry.content_flags = row[9] ? row[9] : ""; entry.content_flags = row[9] ? row[9] : "";
entry.content_flags_disabled = row[10] ? row[10] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -43,6 +43,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -61,6 +62,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -119,6 +121,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -161,6 +164,7 @@ public:
entry.min_expansion = atoi(row[5]); entry.min_expansion = atoi(row[5]);
entry.max_expansion = atoi(row[6]); entry.max_expansion = atoi(row[6]);
entry.content_flags = row[7] ? row[7] : ""; entry.content_flags = row[7] ? row[7] : "";
entry.content_flags_disabled = row[8] ? row[8] : "";
return entry; 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[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[6] + " = " + std::to_string(forage_entry.max_expansion));
update_values.push_back(columns[7] + " = '" + EscapeString(forage_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(forage_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(forage_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(forage_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(forage_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -302,6 +309,7 @@ public:
entry.min_expansion = atoi(row[5]); entry.min_expansion = atoi(row[5]);
entry.max_expansion = atoi(row[6]); entry.max_expansion = atoi(row[6]);
entry.content_flags = row[7] ? row[7] : ""; entry.content_flags = row[7] ? row[7] : "";
entry.content_flags_disabled = row[8] ? row[8] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -334,6 +342,7 @@ public:
entry.min_expansion = atoi(row[5]); entry.min_expansion = atoi(row[5]);
entry.max_expansion = atoi(row[6]); entry.max_expansion = atoi(row[6]);
entry.content_flags = row[7] ? row[7] : ""; entry.content_flags = row[7] ? row[7] : "";
entry.content_flags_disabled = row[8] ? row[8] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -51,6 +51,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -77,6 +78,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -143,6 +145,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -193,6 +196,7 @@ public:
entry.min_expansion = atoi(row[13]); entry.min_expansion = atoi(row[13]);
entry.max_expansion = atoi(row[14]); entry.max_expansion = atoi(row[14]);
entry.content_flags = row[15] ? row[15] : ""; entry.content_flags = row[15] ? row[15] : "";
entry.content_flags_disabled = row[16] ? row[16] : "";
return entry; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(global_loot_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(global_loot_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -366,6 +373,7 @@ public:
entry.min_expansion = atoi(row[13]); entry.min_expansion = atoi(row[13]);
entry.max_expansion = atoi(row[14]); entry.max_expansion = atoi(row[14]);
entry.content_flags = row[15] ? row[15] : ""; entry.content_flags = row[15] ? row[15] : "";
entry.content_flags_disabled = row[16] ? row[16] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -406,6 +414,7 @@ public:
entry.min_expansion = atoi(row[13]); entry.min_expansion = atoi(row[13]);
entry.max_expansion = atoi(row[14]); entry.max_expansion = atoi(row[14]);
entry.content_flags = row[15] ? row[15] : ""; entry.content_flags = row[15] ? row[15] : "";
entry.content_flags_disabled = row[16] ? row[16] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -52,6 +52,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -79,6 +80,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -146,6 +148,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -197,6 +200,7 @@ public:
entry.min_expansion = atoi(row[14]); entry.min_expansion = atoi(row[14]);
entry.max_expansion = atoi(row[15]); entry.max_expansion = atoi(row[15]);
entry.content_flags = row[16] ? row[16] : ""; entry.content_flags = row[16] ? row[16] : "";
entry.content_flags_disabled = row[17] ? row[17] : "";
return entry; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(ground_spawns_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(ground_spawns_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -374,6 +381,7 @@ public:
entry.min_expansion = atoi(row[14]); entry.min_expansion = atoi(row[14]);
entry.max_expansion = atoi(row[15]); entry.max_expansion = atoi(row[15]);
entry.content_flags = row[16] ? row[16] : ""; entry.content_flags = row[16] ? row[16] : "";
entry.content_flags_disabled = row[17] ? row[17] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -415,6 +423,7 @@ public:
entry.min_expansion = atoi(row[14]); entry.min_expansion = atoi(row[14]);
entry.max_expansion = atoi(row[15]); entry.max_expansion = atoi(row[15]);
entry.content_flags = row[16] ? row[16] : ""; entry.content_flags = row[16] ? row[16] : "";
entry.content_flags_disabled = row[17] ? row[17] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -41,9 +41,11 @@ public:
int equip_item; int equip_item;
float chance; float chance;
float disabled_chance; float disabled_chance;
int minlevel; int trivial_min_level;
int maxlevel; int trivial_max_level;
int multiplier; int multiplier;
int npc_min_level;
int npc_max_level;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -60,9 +62,11 @@ public:
"equip_item", "equip_item",
"chance", "chance",
"disabled_chance", "disabled_chance",
"minlevel", "trivial_min_level",
"maxlevel", "trivial_max_level",
"multiplier", "multiplier",
"npc_min_level",
"npc_max_level",
}; };
} }
@ -119,9 +123,11 @@ public:
entry.equip_item = 0; entry.equip_item = 0;
entry.chance = 1; entry.chance = 1;
entry.disabled_chance = 0; entry.disabled_chance = 0;
entry.minlevel = 0; entry.trivial_min_level = 0;
entry.maxlevel = 127; entry.trivial_max_level = 0;
entry.multiplier = 1; entry.multiplier = 1;
entry.npc_min_level = 0;
entry.npc_max_level = 0;
return entry; return entry;
} }
@ -162,9 +168,11 @@ public:
entry.equip_item = atoi(row[3]); entry.equip_item = atoi(row[3]);
entry.chance = static_cast<float>(atof(row[4])); entry.chance = static_cast<float>(atof(row[4]));
entry.disabled_chance = static_cast<float>(atof(row[5])); entry.disabled_chance = static_cast<float>(atof(row[5]));
entry.minlevel = atoi(row[6]); entry.trivial_min_level = atoi(row[6]);
entry.maxlevel = atoi(row[7]); entry.trivial_max_level = atoi(row[7]);
entry.multiplier = atoi(row[8]); entry.multiplier = atoi(row[8]);
entry.npc_min_level = atoi(row[9]);
entry.npc_max_level = atoi(row[10]);
return entry; 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[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[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[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[6] + " = " + std::to_string(lootdrop_entries_entry.trivial_min_level));
update_values.push_back(columns[7] + " = " + std::to_string(lootdrop_entries_entry.maxlevel)); 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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.equip_item));
insert_values.push_back(std::to_string(lootdrop_entries_entry.chance)); 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.disabled_chance));
insert_values.push_back(std::to_string(lootdrop_entries_entry.minlevel)); insert_values.push_back(std::to_string(lootdrop_entries_entry.trivial_min_level));
insert_values.push_back(std::to_string(lootdrop_entries_entry.maxlevel)); 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.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( auto results = content_db.QueryDatabase(
fmt::format( 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.equip_item));
insert_values.push_back(std::to_string(lootdrop_entries_entry.chance)); 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.disabled_chance));
insert_values.push_back(std::to_string(lootdrop_entries_entry.minlevel)); insert_values.push_back(std::to_string(lootdrop_entries_entry.trivial_min_level));
insert_values.push_back(std::to_string(lootdrop_entries_entry.maxlevel)); 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.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) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -310,9 +324,11 @@ public:
entry.equip_item = atoi(row[3]); entry.equip_item = atoi(row[3]);
entry.chance = static_cast<float>(atof(row[4])); entry.chance = static_cast<float>(atof(row[4]));
entry.disabled_chance = static_cast<float>(atof(row[5])); entry.disabled_chance = static_cast<float>(atof(row[5]));
entry.minlevel = atoi(row[6]); entry.trivial_min_level = atoi(row[6]);
entry.maxlevel = atoi(row[7]); entry.trivial_max_level = atoi(row[7]);
entry.multiplier = atoi(row[8]); entry.multiplier = atoi(row[8]);
entry.npc_min_level = atoi(row[9]);
entry.npc_max_level = atoi(row[10]);
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -343,9 +359,11 @@ public:
entry.equip_item = atoi(row[3]); entry.equip_item = atoi(row[3]);
entry.chance = static_cast<float>(atof(row[4])); entry.chance = static_cast<float>(atof(row[4]));
entry.disabled_chance = static_cast<float>(atof(row[5])); entry.disabled_chance = static_cast<float>(atof(row[5]));
entry.minlevel = atoi(row[6]); entry.trivial_min_level = atoi(row[6]);
entry.maxlevel = atoi(row[7]); entry.trivial_max_level = atoi(row[7]);
entry.multiplier = atoi(row[8]); entry.multiplier = atoi(row[8]);
entry.npc_min_level = atoi(row[9]);
entry.npc_max_level = atoi(row[10]);
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -40,6 +40,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -55,6 +56,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -110,6 +112,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -149,6 +152,7 @@ public:
entry.min_expansion = atoi(row[2]); entry.min_expansion = atoi(row[2]);
entry.max_expansion = atoi(row[3]); entry.max_expansion = atoi(row[3]);
entry.content_flags = row[4] ? row[4] : ""; entry.content_flags = row[4] ? row[4] : "";
entry.content_flags_disabled = row[5] ? row[5] : "";
return entry; 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[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[3] + " = " + std::to_string(lootdrop_entry.max_expansion));
update_values.push_back(columns[4] + " = '" + EscapeString(lootdrop_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(lootdrop_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(lootdrop_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(lootdrop_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(lootdrop_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -278,6 +285,7 @@ public:
entry.min_expansion = atoi(row[2]); entry.min_expansion = atoi(row[2]);
entry.max_expansion = atoi(row[3]); entry.max_expansion = atoi(row[3]);
entry.content_flags = row[4] ? row[4] : ""; entry.content_flags = row[4] ? row[4] : "";
entry.content_flags_disabled = row[5] ? row[5] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -307,6 +315,7 @@ public:
entry.min_expansion = atoi(row[2]); entry.min_expansion = atoi(row[2]);
entry.max_expansion = atoi(row[3]); entry.max_expansion = atoi(row[3]);
entry.content_flags = row[4] ? row[4] : ""; entry.content_flags = row[4] ? row[4] : "";
entry.content_flags_disabled = row[5] ? row[5] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -44,6 +44,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -63,6 +64,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -122,6 +124,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -165,6 +168,7 @@ public:
entry.min_expansion = atoi(row[6]); entry.min_expansion = atoi(row[6]);
entry.max_expansion = atoi(row[7]); entry.max_expansion = atoi(row[7]);
entry.content_flags = row[8] ? row[8] : ""; entry.content_flags = row[8] ? row[8] : "";
entry.content_flags_disabled = row[9] ? row[9] : "";
return entry; 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[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[7] + " = " + std::to_string(loottable_entry.max_expansion));
update_values.push_back(columns[8] + " = '" + EscapeString(loottable_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(loottable_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(loottable_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(loottable_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(loottable_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -310,6 +317,7 @@ public:
entry.min_expansion = atoi(row[6]); entry.min_expansion = atoi(row[6]);
entry.max_expansion = atoi(row[7]); entry.max_expansion = atoi(row[7]);
entry.content_flags = row[8] ? row[8] : ""; entry.content_flags = row[8] ? row[8] : "";
entry.content_flags_disabled = row[9] ? row[9] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -343,6 +351,7 @@ public:
entry.min_expansion = atoi(row[6]); entry.min_expansion = atoi(row[6]);
entry.max_expansion = atoi(row[7]); entry.max_expansion = atoi(row[7]);
entry.content_flags = row[8] ? row[8] : ""; entry.content_flags = row[8] ? row[8] : "";
entry.content_flags_disabled = row[9] ? row[9] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -46,6 +46,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -67,6 +68,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -128,6 +130,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -173,6 +176,7 @@ public:
entry.min_expansion = atoi(row[8]); entry.min_expansion = atoi(row[8]);
entry.max_expansion = atoi(row[9]); entry.max_expansion = atoi(row[9]);
entry.content_flags = row[10] ? row[10] : ""; entry.content_flags = row[10] ? row[10] : "";
entry.content_flags_disabled = row[11] ? row[11] : "";
return entry; 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[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[9] + " = " + std::to_string(merchantlist_entry.max_expansion));
update_values.push_back(columns[10] + " = '" + EscapeString(merchantlist_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(merchantlist_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(merchantlist_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(merchantlist_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(merchantlist_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -329,6 +336,7 @@ public:
entry.min_expansion = atoi(row[8]); entry.min_expansion = atoi(row[8]);
entry.max_expansion = atoi(row[9]); entry.max_expansion = atoi(row[9]);
entry.content_flags = row[10] ? row[10] : ""; entry.content_flags = row[10] ? row[10] : "";
entry.content_flags_disabled = row[11] ? row[11] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -364,6 +372,7 @@ public:
entry.min_expansion = atoi(row[8]); entry.min_expansion = atoi(row[8]);
entry.max_expansion = atoi(row[9]); entry.max_expansion = atoi(row[9]);
entry.content_flags = row[10] ? row[10] : ""; entry.content_flags = row[10] ? row[10] : "";
entry.content_flags_disabled = row[11] ? row[11] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -61,6 +61,10 @@ public:
float tilt_x; float tilt_x;
float tilt_y; float tilt_y;
std::string display_name; std::string display_name;
int min_expansion;
int max_expansion;
std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -97,6 +101,10 @@ public:
"tilt_x", "tilt_x",
"tilt_y", "tilt_y",
"display_name", "display_name",
"min_expansion",
"max_expansion",
"content_flags",
"content_flags_disabled",
}; };
} }
@ -173,6 +181,10 @@ public:
entry.tilt_x = 0; entry.tilt_x = 0;
entry.tilt_y = 0; entry.tilt_y = 0;
entry.display_name = ""; entry.display_name = "";
entry.min_expansion = 0;
entry.max_expansion = 0;
entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -233,6 +245,10 @@ public:
entry.tilt_x = static_cast<float>(atof(row[23])); entry.tilt_x = static_cast<float>(atof(row[23]));
entry.tilt_y = static_cast<float>(atof(row[24])); entry.tilt_y = static_cast<float>(atof(row[24]));
entry.display_name = row[25] ? row[25] : ""; 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; 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[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[24] + " = " + std::to_string(object_entry.tilt_y));
update_values.push_back(columns[25] + " = '" + EscapeString(object_entry.display_name) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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_x));
insert_values.push_back(std::to_string(object_entry.tilt_y)); insert_values.push_back(std::to_string(object_entry.tilt_y));
insert_values.push_back("'" + EscapeString(object_entry.display_name) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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_x));
insert_values.push_back(std::to_string(object_entry.tilt_y)); insert_values.push_back(std::to_string(object_entry.tilt_y));
insert_values.push_back("'" + EscapeString(object_entry.display_name) + "'"); 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) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -446,6 +474,10 @@ public:
entry.tilt_x = static_cast<float>(atof(row[23])); entry.tilt_x = static_cast<float>(atof(row[23]));
entry.tilt_y = static_cast<float>(atof(row[24])); entry.tilt_y = static_cast<float>(atof(row[24]));
entry.display_name = row[25] ? row[25] : ""; 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); all_entries.push_back(entry);
} }
@ -496,6 +528,10 @@ public:
entry.tilt_x = static_cast<float>(atof(row[23])); entry.tilt_x = static_cast<float>(atof(row[23]));
entry.tilt_y = static_cast<float>(atof(row[24])); entry.tilt_y = static_cast<float>(atof(row[24]));
entry.display_name = row[25] ? row[25] : ""; 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); all_entries.push_back(entry);
} }

View File

@ -50,6 +50,10 @@ public:
int cond_value; int cond_value;
int enabled; int enabled;
int animation; int animation;
int min_expansion;
int max_expansion;
std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -75,6 +79,10 @@ public:
"cond_value", "cond_value",
"enabled", "enabled",
"animation", "animation",
"min_expansion",
"max_expansion",
"content_flags",
"content_flags_disabled",
}; };
} }
@ -140,6 +148,10 @@ public:
entry.cond_value = 1; entry.cond_value = 1;
entry.enabled = 1; entry.enabled = 1;
entry.animation = 0; entry.animation = 0;
entry.min_expansion = 0;
entry.max_expansion = 0;
entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -189,6 +201,10 @@ public:
entry.cond_value = atoi(row[12]); entry.cond_value = atoi(row[12]);
entry.enabled = atoi(row[13]); entry.enabled = atoi(row[13]);
entry.animation = atoi(row[14]); 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; 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[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[13] + " = " + std::to_string(spawn2_entry.enabled));
update_values.push_back(columns[14] + " = " + std::to_string(spawn2_entry.animation)); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.cond_value));
insert_values.push_back(std::to_string(spawn2_entry.enabled)); 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.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( auto results = content_db.QueryDatabase(
fmt::format( 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.cond_value));
insert_values.push_back(std::to_string(spawn2_entry.enabled)); 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.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) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -358,6 +386,10 @@ public:
entry.cond_value = atoi(row[12]); entry.cond_value = atoi(row[12]);
entry.enabled = atoi(row[13]); entry.enabled = atoi(row[13]);
entry.animation = atoi(row[14]); 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); all_entries.push_back(entry);
} }
@ -397,6 +429,10 @@ public:
entry.cond_value = atoi(row[12]); entry.cond_value = atoi(row[12]);
entry.enabled = atoi(row[13]); entry.enabled = atoi(row[13]);
entry.animation = atoi(row[14]); 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); all_entries.push_back(entry);
} }

View File

@ -53,6 +53,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -81,6 +82,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -149,6 +151,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -201,6 +204,7 @@ public:
entry.min_expansion = atoi(row[15]); entry.min_expansion = atoi(row[15]);
entry.max_expansion = atoi(row[16]); entry.max_expansion = atoi(row[16]);
entry.content_flags = row[17] ? row[17] : ""; entry.content_flags = row[17] ? row[17] : "";
entry.content_flags_disabled = row[18] ? row[18] : "";
return entry; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(start_zones_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(start_zones_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(start_zones_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(start_zones_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -385,6 +392,7 @@ public:
entry.min_expansion = atoi(row[15]); entry.min_expansion = atoi(row[15]);
entry.max_expansion = atoi(row[16]); entry.max_expansion = atoi(row[16]);
entry.content_flags = row[17] ? row[17] : ""; entry.content_flags = row[17] ? row[17] : "";
entry.content_flags_disabled = row[18] ? row[18] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -427,6 +435,7 @@ public:
entry.min_expansion = atoi(row[15]); entry.min_expansion = atoi(row[15]);
entry.max_expansion = atoi(row[16]); entry.max_expansion = atoi(row[16]);
entry.content_flags = row[17] ? row[17] : ""; entry.content_flags = row[17] ? row[17] : "";
entry.content_flags_disabled = row[18] ? row[18] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -47,6 +47,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -69,6 +70,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -131,6 +133,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -177,6 +180,7 @@ public:
entry.min_expansion = atoi(row[9]); entry.min_expansion = atoi(row[9]);
entry.max_expansion = atoi(row[10]); entry.max_expansion = atoi(row[10]);
entry.content_flags = row[11] ? row[11] : ""; entry.content_flags = row[11] ? row[11] : "";
entry.content_flags_disabled = row[12] ? row[12] : "";
return entry; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(starting_items_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(starting_items_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(starting_items_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(starting_items_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -334,6 +341,7 @@ public:
entry.min_expansion = atoi(row[9]); entry.min_expansion = atoi(row[9]);
entry.max_expansion = atoi(row[10]); entry.max_expansion = atoi(row[10]);
entry.content_flags = row[11] ? row[11] : ""; entry.content_flags = row[11] ? row[11] : "";
entry.content_flags_disabled = row[12] ? row[12] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -370,6 +378,7 @@ public:
entry.min_expansion = atoi(row[9]); entry.min_expansion = atoi(row[9]);
entry.max_expansion = atoi(row[10]); entry.max_expansion = atoi(row[10]);
entry.content_flags = row[11] ? row[11] : ""; entry.content_flags = row[11] ? row[11] : "";
entry.content_flags_disabled = row[12] ? row[12] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -49,9 +49,6 @@ public:
std::string prefix; std::string prefix;
std::string suffix; std::string suffix;
int title_set; int title_set;
int min_expansion;
int max_expansion;
std::string content_flags;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -76,9 +73,6 @@ public:
"prefix", "prefix",
"suffix", "suffix",
"title_set", "title_set",
"min_expansion",
"max_expansion",
"content_flags",
}; };
} }
@ -143,9 +137,6 @@ public:
entry.prefix = ""; entry.prefix = "";
entry.suffix = ""; entry.suffix = "";
entry.title_set = 0; entry.title_set = 0;
entry.min_expansion = 0;
entry.max_expansion = 0;
entry.content_flags = "";
return entry; return entry;
} }
@ -194,9 +185,6 @@ public:
entry.prefix = row[11] ? row[11] : ""; entry.prefix = row[11] ? row[11] : "";
entry.suffix = row[12] ? row[12] : ""; entry.suffix = row[12] ? row[12] : "";
entry.title_set = atoi(row[13]); 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; return entry;
} }
@ -241,9 +229,6 @@ public:
update_values.push_back(columns[11] + " = '" + EscapeString(titles_entry.prefix) + "'"); 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[12] + " = '" + EscapeString(titles_entry.suffix) + "'");
update_values.push_back(columns[13] + " = " + std::to_string(titles_entry.title_set)); 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( auto results = database.QueryDatabase(
fmt::format( fmt::format(
@ -277,9 +262,6 @@ public:
insert_values.push_back("'" + EscapeString(titles_entry.prefix) + "'"); insert_values.push_back("'" + EscapeString(titles_entry.prefix) + "'");
insert_values.push_back("'" + EscapeString(titles_entry.suffix) + "'"); 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.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( auto results = database.QueryDatabase(
fmt::format( fmt::format(
@ -321,9 +303,6 @@ public:
insert_values.push_back("'" + EscapeString(titles_entry.prefix) + "'"); insert_values.push_back("'" + EscapeString(titles_entry.prefix) + "'");
insert_values.push_back("'" + EscapeString(titles_entry.suffix) + "'"); 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.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) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -371,9 +350,6 @@ public:
entry.prefix = row[11] ? row[11] : ""; entry.prefix = row[11] ? row[11] : "";
entry.suffix = row[12] ? row[12] : ""; entry.suffix = row[12] ? row[12] : "";
entry.title_set = atoi(row[13]); 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); all_entries.push_back(entry);
} }
@ -412,9 +388,6 @@ public:
entry.prefix = row[11] ? row[11] : ""; entry.prefix = row[11] ? row[11] : "";
entry.suffix = row[12] ? row[12] : ""; entry.suffix = row[12] ? row[12] : "";
entry.title_set = atoi(row[13]); 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); all_entries.push_back(entry);
} }

View File

@ -49,6 +49,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -73,6 +74,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -137,6 +139,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -185,6 +188,7 @@ public:
entry.min_expansion = atoi(row[11]); entry.min_expansion = atoi(row[11]);
entry.max_expansion = atoi(row[12]); entry.max_expansion = atoi(row[12]);
entry.content_flags = row[13] ? row[13] : ""; entry.content_flags = row[13] ? row[13] : "";
entry.content_flags_disabled = row[14] ? row[14] : "";
return entry; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(tradeskill_recipe_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(tradeskill_recipe_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -350,6 +357,7 @@ public:
entry.min_expansion = atoi(row[11]); entry.min_expansion = atoi(row[11]);
entry.max_expansion = atoi(row[12]); entry.max_expansion = atoi(row[12]);
entry.content_flags = row[13] ? row[13] : ""; entry.content_flags = row[13] ? row[13] : "";
entry.content_flags_disabled = row[14] ? row[14] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -388,6 +396,7 @@ public:
entry.min_expansion = atoi(row[11]); entry.min_expansion = atoi(row[11]);
entry.max_expansion = atoi(row[12]); entry.max_expansion = atoi(row[12]);
entry.content_flags = row[13] ? row[13] : ""; entry.content_flags = row[13] ? row[13] : "";
entry.content_flags_disabled = row[14] ? row[14] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -59,6 +59,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -93,6 +94,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -167,6 +169,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -225,6 +228,7 @@ public:
entry.min_expansion = atoi(row[21]); entry.min_expansion = atoi(row[21]);
entry.max_expansion = atoi(row[22]); entry.max_expansion = atoi(row[22]);
entry.content_flags = row[23] ? row[23] : ""; entry.content_flags = row[23] ? row[23] : "";
entry.content_flags_disabled = row[24] ? row[24] : "";
return entry; 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[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[22] + " = " + std::to_string(traps_entry.max_expansion));
update_values.push_back(columns[23] + " = '" + EscapeString(traps_entry.content_flags) + "'"); 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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(traps_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(traps_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(traps_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(traps_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -430,6 +437,7 @@ public:
entry.min_expansion = atoi(row[21]); entry.min_expansion = atoi(row[21]);
entry.max_expansion = atoi(row[22]); entry.max_expansion = atoi(row[22]);
entry.content_flags = row[23] ? row[23] : ""; entry.content_flags = row[23] ? row[23] : "";
entry.content_flags_disabled = row[24] ? row[24] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -478,6 +486,7 @@ public:
entry.min_expansion = atoi(row[21]); entry.min_expansion = atoi(row[21]);
entry.max_expansion = atoi(row[22]); entry.max_expansion = atoi(row[22]);
entry.content_flags = row[23] ? row[23] : ""; entry.content_flags = row[23] ? row[23] : "";
entry.content_flags_disabled = row[24] ? row[24] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -55,6 +55,7 @@ public:
int min_expansion; int min_expansion;
int max_expansion; int max_expansion;
std::string content_flags; std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -85,6 +86,7 @@ public:
"min_expansion", "min_expansion",
"max_expansion", "max_expansion",
"content_flags", "content_flags",
"content_flags_disabled",
}; };
} }
@ -155,6 +157,7 @@ public:
entry.min_expansion = 0; entry.min_expansion = 0;
entry.max_expansion = 0; entry.max_expansion = 0;
entry.content_flags = ""; entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -209,6 +212,7 @@ public:
entry.min_expansion = atoi(row[17]); entry.min_expansion = atoi(row[17]);
entry.max_expansion = atoi(row[18]); entry.max_expansion = atoi(row[18]);
entry.content_flags = row[19] ? row[19] : ""; entry.content_flags = row[19] ? row[19] : "";
entry.content_flags_disabled = row[20] ? row[20] : "";
return entry; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(zone_points_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(zone_points_entry.content_flags_disabled) + "'");
auto results = content_db.QueryDatabase( auto results = content_db.QueryDatabase(
fmt::format( 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.min_expansion));
insert_values.push_back(std::to_string(zone_points_entry.max_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) + "'");
insert_values.push_back("'" + EscapeString(zone_points_entry.content_flags_disabled) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -398,6 +405,7 @@ public:
entry.min_expansion = atoi(row[17]); entry.min_expansion = atoi(row[17]);
entry.max_expansion = atoi(row[18]); entry.max_expansion = atoi(row[18]);
entry.content_flags = row[19] ? row[19] : ""; entry.content_flags = row[19] ? row[19] : "";
entry.content_flags_disabled = row[20] ? row[20] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }
@ -442,6 +450,7 @@ public:
entry.min_expansion = atoi(row[17]); entry.min_expansion = atoi(row[17]);
entry.max_expansion = atoi(row[18]); entry.max_expansion = atoi(row[18]);
entry.content_flags = row[19] ? row[19] : ""; entry.content_flags = row[19] ? row[19] : "";
entry.content_flags_disabled = row[20] ? row[20] : "";
all_entries.push_back(entry); all_entries.push_back(entry);
} }

View File

@ -121,6 +121,10 @@ public:
int fast_regen_endurance; int fast_regen_endurance;
int npc_max_aggro_dist; int npc_max_aggro_dist;
int max_movement_update_range; int max_movement_update_range;
int min_expansion;
int max_expansion;
std::string content_flags;
std::string content_flags_disabled;
}; };
static std::string PrimaryKey() static std::string PrimaryKey()
@ -217,6 +221,10 @@ public:
"fast_regen_endurance", "fast_regen_endurance",
"npc_max_aggro_dist", "npc_max_aggro_dist",
"max_movement_update_range", "max_movement_update_range",
"min_expansion",
"max_expansion",
"content_flags",
"content_flags_disabled",
}; };
} }
@ -353,6 +361,10 @@ public:
entry.fast_regen_endurance = 180; entry.fast_regen_endurance = 180;
entry.npc_max_aggro_dist = 600; entry.npc_max_aggro_dist = 600;
entry.max_movement_update_range = 600; entry.max_movement_update_range = 600;
entry.min_expansion = 0;
entry.max_expansion = 0;
entry.content_flags = "";
entry.content_flags_disabled = "";
return entry; return entry;
} }
@ -473,6 +485,10 @@ public:
entry.fast_regen_endurance = atoi(row[83]); entry.fast_regen_endurance = atoi(row[83]);
entry.npc_max_aggro_dist = atoi(row[84]); entry.npc_max_aggro_dist = atoi(row[84]);
entry.max_movement_update_range = atoi(row[85]); 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; 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[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[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[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( auto results = content_db.QueryDatabase(
fmt::format( 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.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.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.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( auto results = content_db.QueryDatabase(
fmt::format( 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.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.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.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) + ")"); insert_chunks.push_back("(" + implode(",", insert_values) + ")");
} }
@ -926,6 +954,10 @@ public:
entry.fast_regen_endurance = atoi(row[83]); entry.fast_regen_endurance = atoi(row[83]);
entry.npc_max_aggro_dist = atoi(row[84]); entry.npc_max_aggro_dist = atoi(row[84]);
entry.max_movement_update_range = atoi(row[85]); 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); all_entries.push_back(entry);
} }
@ -1036,6 +1068,10 @@ public:
entry.fast_regen_endurance = atoi(row[83]); entry.fast_regen_endurance = atoi(row[83]);
entry.npc_max_aggro_dist = atoi(row[84]); entry.npc_max_aggro_dist = atoi(row[84]);
entry.max_movement_update_range = atoi(row[85]); 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); all_entries.push_back(entry);
} }