Merge branch 'master' into Bot_Raid_work

This commit is contained in:
neckkola
2022-02-13 07:26:18 -04:00
committed by GitHub
857 changed files with 92718 additions and 44581 deletions
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -74,7 +74,7 @@ public:
entry.accid = 0;
entry.ip = "";
entry.count = 1;
entry.lastused = current_timestamp();
entry.lastused = "";
return entry;
}
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -148,7 +148,7 @@ public:
entry.zone_in_time = 1800;
entry.win_points = 0;
entry.lose_points = 0;
entry.theme = 1;
entry.theme = LDoNThemes::GUK;
entry.zone_in_zone_id = 0;
entry.zone_in_x = 0;
entry.zone_in_y = 0;
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -19,7 +19,7 @@ class BaseBaseDataRepository {
public:
struct BaseData {
int level;
int class;
int class_;
float hp;
float mana;
float end;
@@ -39,7 +39,7 @@ public:
{
return {
"level",
"class",
"`class`",
"hp",
"mana",
"end",
@@ -84,7 +84,7 @@ public:
BaseData entry{};
entry.level = 0;
entry.class = 0;
entry.class_ = 0;
entry.hp = 0;
entry.mana = 0;
entry.end = 0;
@@ -129,7 +129,7 @@ public:
BaseData entry{};
entry.level = atoi(row[0]);
entry.class = atoi(row[1]);
entry.class_ = atoi(row[1]);
entry.hp = static_cast<float>(atof(row[2]));
entry.mana = static_cast<float>(atof(row[3]));
entry.end = static_cast<float>(atof(row[4]));
@@ -172,7 +172,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(base_data_entry.level));
update_values.push_back(columns[1] + " = " + std::to_string(base_data_entry.class));
update_values.push_back(columns[1] + " = " + std::to_string(base_data_entry.class_));
update_values.push_back(columns[2] + " = " + std::to_string(base_data_entry.hp));
update_values.push_back(columns[3] + " = " + std::to_string(base_data_entry.mana));
update_values.push_back(columns[4] + " = " + std::to_string(base_data_entry.end));
@@ -203,7 +203,7 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(base_data_entry.level));
insert_values.push_back(std::to_string(base_data_entry.class));
insert_values.push_back(std::to_string(base_data_entry.class_));
insert_values.push_back(std::to_string(base_data_entry.hp));
insert_values.push_back(std::to_string(base_data_entry.mana));
insert_values.push_back(std::to_string(base_data_entry.end));
@@ -242,7 +242,7 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(base_data_entry.level));
insert_values.push_back(std::to_string(base_data_entry.class));
insert_values.push_back(std::to_string(base_data_entry.class_));
insert_values.push_back(std::to_string(base_data_entry.hp));
insert_values.push_back(std::to_string(base_data_entry.mana));
insert_values.push_back(std::to_string(base_data_entry.end));
@@ -285,7 +285,7 @@ public:
BaseData entry{};
entry.level = atoi(row[0]);
entry.class = atoi(row[1]);
entry.class_ = atoi(row[1]);
entry.hp = static_cast<float>(atof(row[2]));
entry.mana = static_cast<float>(atof(row[3]));
entry.end = static_cast<float>(atof(row[4]));
@@ -319,7 +319,7 @@ public:
BaseData entry{};
entry.level = atoi(row[0]);
entry.class = atoi(row[1]);
entry.class_ = atoi(row[1]);
entry.hp = static_cast<float>(atof(row[2]));
entry.mana = static_cast<float>(atof(row[3]));
entry.end = static_cast<float>(atof(row[4]));
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -154,9 +154,9 @@ public:
entry._unknown_value = 0;
entry.bug_report = "";
entry.system_info = "";
entry.report_datetime = current_timestamp();
entry.report_datetime = "";
entry.bug_status = 0;
entry.last_review = current_timestamp();
entry.last_review = "";
entry.last_reviewer = "None";
entry.reviewer_notes = "";
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -20,7 +20,7 @@ public:
struct CharCreateCombinations {
int allocation_id;
int race;
int class;
int class_;
int deity;
int start_zone;
int expansions_req;
@@ -36,7 +36,7 @@ public:
return {
"allocation_id",
"race",
"class",
"`class`",
"deity",
"start_zone",
"expansions_req",
@@ -77,7 +77,7 @@ public:
entry.allocation_id = 0;
entry.race = 0;
entry.class = 0;
entry.class_ = 0;
entry.deity = 0;
entry.start_zone = 0;
entry.expansions_req = 0;
@@ -118,7 +118,7 @@ public:
entry.allocation_id = atoi(row[0]);
entry.race = atoi(row[1]);
entry.class = atoi(row[2]);
entry.class_ = atoi(row[2]);
entry.deity = atoi(row[3]);
entry.start_zone = atoi(row[4]);
entry.expansions_req = atoi(row[5]);
@@ -157,7 +157,7 @@ public:
update_values.push_back(columns[0] + " = " + std::to_string(char_create_combinations_entry.allocation_id));
update_values.push_back(columns[1] + " = " + std::to_string(char_create_combinations_entry.race));
update_values.push_back(columns[2] + " = " + std::to_string(char_create_combinations_entry.class));
update_values.push_back(columns[2] + " = " + std::to_string(char_create_combinations_entry.class_));
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));
@@ -184,7 +184,7 @@ public:
insert_values.push_back(std::to_string(char_create_combinations_entry.allocation_id));
insert_values.push_back(std::to_string(char_create_combinations_entry.race));
insert_values.push_back(std::to_string(char_create_combinations_entry.class));
insert_values.push_back(std::to_string(char_create_combinations_entry.class_));
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));
@@ -219,7 +219,7 @@ public:
insert_values.push_back(std::to_string(char_create_combinations_entry.allocation_id));
insert_values.push_back(std::to_string(char_create_combinations_entry.race));
insert_values.push_back(std::to_string(char_create_combinations_entry.class));
insert_values.push_back(std::to_string(char_create_combinations_entry.class_));
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));
@@ -258,7 +258,7 @@ public:
entry.allocation_id = atoi(row[0]);
entry.race = atoi(row[1]);
entry.class = atoi(row[2]);
entry.class_ = atoi(row[2]);
entry.deity = atoi(row[3]);
entry.start_zone = atoi(row[4]);
entry.expansions_req = atoi(row[5]);
@@ -288,7 +288,7 @@ public:
entry.allocation_id = atoi(row[0]);
entry.race = atoi(row[1]);
entry.class = atoi(row[2]);
entry.class_ = atoi(row[2]);
entry.deity = atoi(row[3]);
entry.start_zone = atoi(row[4]);
entry.expansions_req = atoi(row[5]);
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -38,7 +38,7 @@ public:
int level;
int race;
int gender;
int class;
int class_;
int deity;
int texture;
int helm_texture;
@@ -95,7 +95,7 @@ public:
"level",
"race",
"gender",
"class",
"`class`",
"deity",
"texture",
"helm_texture",
@@ -177,7 +177,7 @@ public:
entry.level = 0;
entry.race = 0;
entry.gender = 0;
entry.class = 0;
entry.class_ = 0;
entry.deity = 0;
entry.texture = 0;
entry.helm_texture = 0;
@@ -259,7 +259,7 @@ public:
entry.level = atoi(row[17]);
entry.race = atoi(row[18]);
entry.gender = atoi(row[19]);
entry.class = atoi(row[20]);
entry.class_ = atoi(row[20]);
entry.deity = atoi(row[21]);
entry.texture = atoi(row[22]);
entry.helm_texture = atoi(row[23]);
@@ -338,7 +338,7 @@ public:
update_values.push_back(columns[17] + " = " + std::to_string(character_corpses_entry.level));
update_values.push_back(columns[18] + " = " + std::to_string(character_corpses_entry.race));
update_values.push_back(columns[19] + " = " + std::to_string(character_corpses_entry.gender));
update_values.push_back(columns[20] + " = " + std::to_string(character_corpses_entry.class));
update_values.push_back(columns[20] + " = " + std::to_string(character_corpses_entry.class_));
update_values.push_back(columns[21] + " = " + std::to_string(character_corpses_entry.deity));
update_values.push_back(columns[22] + " = " + std::to_string(character_corpses_entry.texture));
update_values.push_back(columns[23] + " = " + std::to_string(character_corpses_entry.helm_texture));
@@ -406,7 +406,7 @@ public:
insert_values.push_back(std::to_string(character_corpses_entry.level));
insert_values.push_back(std::to_string(character_corpses_entry.race));
insert_values.push_back(std::to_string(character_corpses_entry.gender));
insert_values.push_back(std::to_string(character_corpses_entry.class));
insert_values.push_back(std::to_string(character_corpses_entry.class_));
insert_values.push_back(std::to_string(character_corpses_entry.deity));
insert_values.push_back(std::to_string(character_corpses_entry.texture));
insert_values.push_back(std::to_string(character_corpses_entry.helm_texture));
@@ -482,7 +482,7 @@ public:
insert_values.push_back(std::to_string(character_corpses_entry.level));
insert_values.push_back(std::to_string(character_corpses_entry.race));
insert_values.push_back(std::to_string(character_corpses_entry.gender));
insert_values.push_back(std::to_string(character_corpses_entry.class));
insert_values.push_back(std::to_string(character_corpses_entry.class_));
insert_values.push_back(std::to_string(character_corpses_entry.deity));
insert_values.push_back(std::to_string(character_corpses_entry.texture));
insert_values.push_back(std::to_string(character_corpses_entry.helm_texture));
@@ -562,7 +562,7 @@ public:
entry.level = atoi(row[17]);
entry.race = atoi(row[18]);
entry.gender = atoi(row[19]);
entry.class = atoi(row[20]);
entry.class_ = atoi(row[20]);
entry.deity = atoi(row[21]);
entry.texture = atoi(row[22]);
entry.helm_texture = atoi(row[23]);
@@ -633,7 +633,7 @@ public:
entry.level = atoi(row[17]);
entry.race = atoi(row[18]);
entry.gender = atoi(row[19]);
entry.class = atoi(row[20]);
entry.class_ = atoi(row[20]);
entry.deity = atoi(row[21]);
entry.texture = atoi(row[22]);
entry.helm_texture = atoi(row[23]);
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -32,7 +32,7 @@ public:
float heading;
int gender;
int race;
int class;
int class_;
int level;
int deity;
int birthday;
@@ -72,7 +72,7 @@ public:
int sta;
int cha;
int dex;
int int;
int int_;
int agi;
int wis;
int zone_change_count;
@@ -144,7 +144,7 @@ public:
"heading",
"gender",
"race",
"class",
"`class`",
"level",
"deity",
"birthday",
@@ -184,7 +184,7 @@ public:
"sta",
"cha",
"dex",
"int",
"`int`",
"agi",
"wis",
"zone_change_count",
@@ -281,7 +281,7 @@ public:
entry.heading = 0;
entry.gender = 0;
entry.race = 0;
entry.class = 0;
entry.class_ = 0;
entry.level = 0;
entry.deity = 0;
entry.birthday = 0;
@@ -321,7 +321,7 @@ public:
entry.sta = 0;
entry.cha = 0;
entry.dex = 0;
entry.int = 0;
entry.int_ = 0;
entry.agi = 0;
entry.wis = 0;
entry.zone_change_count = 0;
@@ -368,7 +368,7 @@ public:
entry.aa_points_spent_old = 0;
entry.aa_points_old = 0;
entry.e_last_invsnapshot = 0;
entry.deleted_at = 0;
entry.deleted_at = "";
return entry;
}
@@ -418,7 +418,7 @@ public:
entry.heading = static_cast<float>(atof(row[11]));
entry.gender = atoi(row[12]);
entry.race = atoi(row[13]);
entry.class = atoi(row[14]);
entry.class_ = atoi(row[14]);
entry.level = atoi(row[15]);
entry.deity = atoi(row[16]);
entry.birthday = atoi(row[17]);
@@ -458,7 +458,7 @@ public:
entry.sta = atoi(row[51]);
entry.cha = atoi(row[52]);
entry.dex = atoi(row[53]);
entry.int = atoi(row[54]);
entry.int_ = atoi(row[54]);
entry.agi = atoi(row[55]);
entry.wis = atoi(row[56]);
entry.zone_change_count = atoi(row[57]);
@@ -552,7 +552,7 @@ public:
update_values.push_back(columns[11] + " = " + std::to_string(character_data_entry.heading));
update_values.push_back(columns[12] + " = " + std::to_string(character_data_entry.gender));
update_values.push_back(columns[13] + " = " + std::to_string(character_data_entry.race));
update_values.push_back(columns[14] + " = " + std::to_string(character_data_entry.class));
update_values.push_back(columns[14] + " = " + std::to_string(character_data_entry.class_));
update_values.push_back(columns[15] + " = " + std::to_string(character_data_entry.level));
update_values.push_back(columns[16] + " = " + std::to_string(character_data_entry.deity));
update_values.push_back(columns[17] + " = " + std::to_string(character_data_entry.birthday));
@@ -592,7 +592,7 @@ public:
update_values.push_back(columns[51] + " = " + std::to_string(character_data_entry.sta));
update_values.push_back(columns[52] + " = " + std::to_string(character_data_entry.cha));
update_values.push_back(columns[53] + " = " + std::to_string(character_data_entry.dex));
update_values.push_back(columns[54] + " = " + std::to_string(character_data_entry.int));
update_values.push_back(columns[54] + " = " + std::to_string(character_data_entry.int_));
update_values.push_back(columns[55] + " = " + std::to_string(character_data_entry.agi));
update_values.push_back(columns[56] + " = " + std::to_string(character_data_entry.wis));
update_values.push_back(columns[57] + " = " + std::to_string(character_data_entry.zone_change_count));
@@ -675,7 +675,7 @@ public:
insert_values.push_back(std::to_string(character_data_entry.heading));
insert_values.push_back(std::to_string(character_data_entry.gender));
insert_values.push_back(std::to_string(character_data_entry.race));
insert_values.push_back(std::to_string(character_data_entry.class));
insert_values.push_back(std::to_string(character_data_entry.class_));
insert_values.push_back(std::to_string(character_data_entry.level));
insert_values.push_back(std::to_string(character_data_entry.deity));
insert_values.push_back(std::to_string(character_data_entry.birthday));
@@ -715,7 +715,7 @@ public:
insert_values.push_back(std::to_string(character_data_entry.sta));
insert_values.push_back(std::to_string(character_data_entry.cha));
insert_values.push_back(std::to_string(character_data_entry.dex));
insert_values.push_back(std::to_string(character_data_entry.int));
insert_values.push_back(std::to_string(character_data_entry.int_));
insert_values.push_back(std::to_string(character_data_entry.agi));
insert_values.push_back(std::to_string(character_data_entry.wis));
insert_values.push_back(std::to_string(character_data_entry.zone_change_count));
@@ -806,7 +806,7 @@ public:
insert_values.push_back(std::to_string(character_data_entry.heading));
insert_values.push_back(std::to_string(character_data_entry.gender));
insert_values.push_back(std::to_string(character_data_entry.race));
insert_values.push_back(std::to_string(character_data_entry.class));
insert_values.push_back(std::to_string(character_data_entry.class_));
insert_values.push_back(std::to_string(character_data_entry.level));
insert_values.push_back(std::to_string(character_data_entry.deity));
insert_values.push_back(std::to_string(character_data_entry.birthday));
@@ -846,7 +846,7 @@ public:
insert_values.push_back(std::to_string(character_data_entry.sta));
insert_values.push_back(std::to_string(character_data_entry.cha));
insert_values.push_back(std::to_string(character_data_entry.dex));
insert_values.push_back(std::to_string(character_data_entry.int));
insert_values.push_back(std::to_string(character_data_entry.int_));
insert_values.push_back(std::to_string(character_data_entry.agi));
insert_values.push_back(std::to_string(character_data_entry.wis));
insert_values.push_back(std::to_string(character_data_entry.zone_change_count));
@@ -941,7 +941,7 @@ public:
entry.heading = static_cast<float>(atof(row[11]));
entry.gender = atoi(row[12]);
entry.race = atoi(row[13]);
entry.class = atoi(row[14]);
entry.class_ = atoi(row[14]);
entry.level = atoi(row[15]);
entry.deity = atoi(row[16]);
entry.birthday = atoi(row[17]);
@@ -981,7 +981,7 @@ public:
entry.sta = atoi(row[51]);
entry.cha = atoi(row[52]);
entry.dex = atoi(row[53]);
entry.int = atoi(row[54]);
entry.int_ = atoi(row[54]);
entry.agi = atoi(row[55]);
entry.wis = atoi(row[56]);
entry.zone_change_count = atoi(row[57]);
@@ -1067,7 +1067,7 @@ public:
entry.heading = static_cast<float>(atof(row[11]));
entry.gender = atoi(row[12]);
entry.race = atoi(row[13]);
entry.class = atoi(row[14]);
entry.class_ = atoi(row[14]);
entry.level = atoi(row[15]);
entry.deity = atoi(row[16]);
entry.birthday = atoi(row[17]);
@@ -1107,7 +1107,7 @@ public:
entry.sta = atoi(row[51]);
entry.cha = atoi(row[52]);
entry.dex = atoi(row[53]);
entry.int = atoi(row[54]);
entry.int_ = atoi(row[54]);
entry.agi = atoi(row[55]);
entry.wis = atoi(row[56]);
entry.zone_change_count = atoi(row[57]);
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -0,0 +1,355 @@
/**
* DO NOT MODIFY THIS FILE
*
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
#ifndef EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
#define EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseCharacterInstanceSafereturnsRepository {
public:
struct CharacterInstanceSafereturns {
int id;
int character_id;
int instance_zone_id;
int instance_id;
int safe_zone_id;
float safe_x;
float safe_y;
float safe_z;
float safe_heading;
};
static std::string PrimaryKey()
{
return std::string("id");
}
static std::vector<std::string> Columns()
{
return {
"id",
"character_id",
"instance_zone_id",
"instance_id",
"safe_zone_id",
"safe_x",
"safe_y",
"safe_z",
"safe_heading",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string TableName()
{
return std::string("character_instance_safereturns");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
ColumnsRaw()
);
}
static CharacterInstanceSafereturns NewEntity()
{
CharacterInstanceSafereturns entry{};
entry.id = 0;
entry.character_id = 0;
entry.instance_zone_id = 0;
entry.instance_id = 0;
entry.safe_zone_id = 0;
entry.safe_x = 0;
entry.safe_y = 0;
entry.safe_z = 0;
entry.safe_heading = 0;
return entry;
}
static CharacterInstanceSafereturns GetCharacterInstanceSafereturnsEntry(
const std::vector<CharacterInstanceSafereturns> &character_instance_safereturnss,
int character_instance_safereturns_id
)
{
for (auto &character_instance_safereturns : character_instance_safereturnss) {
if (character_instance_safereturns.id == character_instance_safereturns_id) {
return character_instance_safereturns;
}
}
return NewEntity();
}
static CharacterInstanceSafereturns FindOne(
Database& db,
int character_instance_safereturns_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
character_instance_safereturns_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CharacterInstanceSafereturns entry{};
entry.id = atoi(row[0]);
entry.character_id = atoi(row[1]);
entry.instance_zone_id = atoi(row[2]);
entry.instance_id = atoi(row[3]);
entry.safe_zone_id = atoi(row[4]);
entry.safe_x = static_cast<float>(atof(row[5]));
entry.safe_y = static_cast<float>(atof(row[6]));
entry.safe_z = static_cast<float>(atof(row[7]));
entry.safe_heading = static_cast<float>(atof(row[8]));
return entry;
}
return NewEntity();
}
static int DeleteOne(
Database& db,
int character_instance_safereturns_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
character_instance_safereturns_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Database& db,
CharacterInstanceSafereturns character_instance_safereturns_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_instance_safereturns_entry.character_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_instance_safereturns_entry.instance_zone_id));
update_values.push_back(columns[3] + " = " + std::to_string(character_instance_safereturns_entry.instance_id));
update_values.push_back(columns[4] + " = " + std::to_string(character_instance_safereturns_entry.safe_zone_id));
update_values.push_back(columns[5] + " = " + std::to_string(character_instance_safereturns_entry.safe_x));
update_values.push_back(columns[6] + " = " + std::to_string(character_instance_safereturns_entry.safe_y));
update_values.push_back(columns[7] + " = " + std::to_string(character_instance_safereturns_entry.safe_z));
update_values.push_back(columns[8] + " = " + std::to_string(character_instance_safereturns_entry.safe_heading));
auto results = db.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_instance_safereturns_entry.id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CharacterInstanceSafereturns InsertOne(
Database& db,
CharacterInstanceSafereturns character_instance_safereturns_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_instance_safereturns_entry.id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.character_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_zone_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_zone_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_x));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_y));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_z));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_heading));
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
character_instance_safereturns_entry.id = results.LastInsertedID();
return character_instance_safereturns_entry;
}
character_instance_safereturns_entry = NewEntity();
return character_instance_safereturns_entry;
}
static int InsertMany(
Database& db,
std::vector<CharacterInstanceSafereturns> character_instance_safereturns_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &character_instance_safereturns_entry: character_instance_safereturns_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_instance_safereturns_entry.id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.character_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_zone_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.instance_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_zone_id));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_x));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_y));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_z));
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_heading));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CharacterInstanceSafereturns> All(Database& db)
{
std::vector<CharacterInstanceSafereturns> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterInstanceSafereturns entry{};
entry.id = atoi(row[0]);
entry.character_id = atoi(row[1]);
entry.instance_zone_id = atoi(row[2]);
entry.instance_id = atoi(row[3]);
entry.safe_zone_id = atoi(row[4]);
entry.safe_x = static_cast<float>(atof(row[5]));
entry.safe_y = static_cast<float>(atof(row[6]));
entry.safe_z = static_cast<float>(atof(row[7]));
entry.safe_heading = static_cast<float>(atof(row[8]));
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CharacterInstanceSafereturns> GetWhere(Database& db, std::string where_filter)
{
std::vector<CharacterInstanceSafereturns> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterInstanceSafereturns entry{};
entry.id = atoi(row[0]);
entry.character_id = atoi(row[1]);
entry.instance_zone_id = atoi(row[2]);
entry.instance_id = atoi(row[3]);
entry.safe_zone_id = atoi(row[4]);
entry.safe_x = static_cast<float>(atof(row[5]));
entry.safe_y = static_cast<float>(atof(row[6]));
entry.safe_z = static_cast<float>(atof(row[7]));
entry.safe_heading = static_cast<float>(atof(row[8]));
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(Database& db, std::string where_filter)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int Truncate(Database& db)
{
auto results = db.QueryDatabase(
fmt::format(
"TRUNCATE TABLE {}",
TableName()
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -0,0 +1,336 @@
/**
* DO NOT MODIFY THIS FILE
*
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
#ifndef EQEMU_BASE_CHARACTER_TASK_TIMERS_REPOSITORY_H
#define EQEMU_BASE_CHARACTER_TASK_TIMERS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
#include <ctime>
class BaseCharacterTaskTimersRepository {
public:
struct CharacterTaskTimers {
int id;
int character_id;
int task_id;
int timer_type;
time_t expire_time;
};
static std::string PrimaryKey()
{
return std::string("id");
}
static std::vector<std::string> Columns()
{
return {
"id",
"character_id",
"task_id",
"timer_type",
"expire_time",
};
}
static std::vector<std::string> SelectColumns()
{
return {
"id",
"character_id",
"task_id",
"timer_type",
"UNIX_TIMESTAMP(expire_time)",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string SelectColumnsRaw()
{
return std::string(implode(", ", SelectColumns()));
}
static std::string TableName()
{
return std::string("character_task_timers");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
SelectColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
ColumnsRaw()
);
}
static CharacterTaskTimers NewEntity()
{
CharacterTaskTimers entry{};
entry.id = 0;
entry.character_id = 0;
entry.task_id = 0;
entry.timer_type = 0;
entry.expire_time = std::time(nullptr);
return entry;
}
static CharacterTaskTimers GetCharacterTaskTimersEntry(
const std::vector<CharacterTaskTimers> &character_task_timerss,
int character_task_timers_id
)
{
for (auto &character_task_timers : character_task_timerss) {
if (character_task_timers.id == character_task_timers_id) {
return character_task_timers;
}
}
return NewEntity();
}
static CharacterTaskTimers FindOne(
Database& db,
int character_task_timers_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
character_task_timers_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CharacterTaskTimers entry{};
entry.id = atoi(row[0]);
entry.character_id = atoi(row[1]);
entry.task_id = atoi(row[2]);
entry.timer_type = atoi(row[3]);
entry.expire_time = strtoll(row[4], nullptr, 10);
return entry;
}
return NewEntity();
}
static int DeleteOne(
Database& db,
int character_task_timers_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
character_task_timers_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Database& db,
CharacterTaskTimers character_task_timers_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_task_timers_entry.character_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_task_timers_entry.task_id));
update_values.push_back(columns[3] + " = " + std::to_string(character_task_timers_entry.timer_type));
update_values.push_back(columns[4] + " = FROM_UNIXTIME(" + std::to_string(character_task_timers_entry.expire_time) + ")");
auto results = db.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_task_timers_entry.id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CharacterTaskTimers InsertOne(
Database& db,
CharacterTaskTimers character_task_timers_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_task_timers_entry.id));
insert_values.push_back(std::to_string(character_task_timers_entry.character_id));
insert_values.push_back(std::to_string(character_task_timers_entry.task_id));
insert_values.push_back(std::to_string(character_task_timers_entry.timer_type));
insert_values.push_back("FROM_UNIXTIME(" + std::to_string(character_task_timers_entry.expire_time) + ")");
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
character_task_timers_entry.id = results.LastInsertedID();
return character_task_timers_entry;
}
character_task_timers_entry = NewEntity();
return character_task_timers_entry;
}
static int InsertMany(
Database& db,
std::vector<CharacterTaskTimers> character_task_timers_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &character_task_timers_entry: character_task_timers_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_task_timers_entry.id));
insert_values.push_back(std::to_string(character_task_timers_entry.character_id));
insert_values.push_back(std::to_string(character_task_timers_entry.task_id));
insert_values.push_back(std::to_string(character_task_timers_entry.timer_type));
insert_values.push_back("FROM_UNIXTIME(" + std::to_string(character_task_timers_entry.expire_time) + ")");
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CharacterTaskTimers> All(Database& db)
{
std::vector<CharacterTaskTimers> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterTaskTimers entry{};
entry.id = atoi(row[0]);
entry.character_id = atoi(row[1]);
entry.task_id = atoi(row[2]);
entry.timer_type = atoi(row[3]);
entry.expire_time = strtoll(row[4], nullptr, 10);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CharacterTaskTimers> GetWhere(Database& db, std::string where_filter)
{
std::vector<CharacterTaskTimers> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterTaskTimers entry{};
entry.id = atoi(row[0]);
entry.character_id = atoi(row[1]);
entry.task_id = atoi(row[2]);
entry.timer_type = atoi(row[3]);
entry.expire_time = strtoll(row[4], nullptr, 10);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(Database& db, std::string where_filter)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int Truncate(Database& db)
{
auto results = db.QueryDatabase(
fmt::format(
"TRUNCATE TABLE {}",
TableName()
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_CHARACTER_TASK_TIMERS_REPOSITORY_H
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -0,0 +1,337 @@
/**
* DO NOT MODIFY THIS FILE
*
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
#ifndef EQEMU_BASE_COMPLETED_SHARED_TASK_ACTIVITY_STATE_REPOSITORY_H
#define EQEMU_BASE_COMPLETED_SHARED_TASK_ACTIVITY_STATE_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
#include <ctime>
class BaseCompletedSharedTaskActivityStateRepository {
public:
struct CompletedSharedTaskActivityState {
int64 shared_task_id;
int activity_id;
int done_count;
time_t updated_time;
time_t completed_time;
};
static std::string PrimaryKey()
{
return std::string("shared_task_id");
}
static std::vector<std::string> Columns()
{
return {
"shared_task_id",
"activity_id",
"done_count",
"updated_time",
"completed_time",
};
}
static std::vector<std::string> SelectColumns()
{
return {
"shared_task_id",
"activity_id",
"done_count",
"UNIX_TIMESTAMP(updated_time)",
"UNIX_TIMESTAMP(completed_time)",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string SelectColumnsRaw()
{
return std::string(implode(", ", SelectColumns()));
}
static std::string TableName()
{
return std::string("completed_shared_task_activity_state");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
SelectColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
ColumnsRaw()
);
}
static CompletedSharedTaskActivityState NewEntity()
{
CompletedSharedTaskActivityState entry{};
entry.shared_task_id = 0;
entry.activity_id = 0;
entry.done_count = 0;
entry.updated_time = 0;
entry.completed_time = 0;
return entry;
}
static CompletedSharedTaskActivityState GetCompletedSharedTaskActivityStateEntry(
const std::vector<CompletedSharedTaskActivityState> &completed_shared_task_activity_states,
int completed_shared_task_activity_state_id
)
{
for (auto &completed_shared_task_activity_state : completed_shared_task_activity_states) {
if (completed_shared_task_activity_state.shared_task_id == completed_shared_task_activity_state_id) {
return completed_shared_task_activity_state;
}
}
return NewEntity();
}
static CompletedSharedTaskActivityState FindOne(
Database& db,
int completed_shared_task_activity_state_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
completed_shared_task_activity_state_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CompletedSharedTaskActivityState entry{};
entry.shared_task_id = strtoll(row[0], nullptr, 10);
entry.activity_id = atoi(row[1]);
entry.done_count = atoi(row[2]);
entry.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
entry.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
return entry;
}
return NewEntity();
}
static int DeleteOne(
Database& db,
int completed_shared_task_activity_state_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
completed_shared_task_activity_state_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Database& db,
CompletedSharedTaskActivityState completed_shared_task_activity_state_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(completed_shared_task_activity_state_entry.shared_task_id));
update_values.push_back(columns[1] + " = " + std::to_string(completed_shared_task_activity_state_entry.activity_id));
update_values.push_back(columns[2] + " = " + std::to_string(completed_shared_task_activity_state_entry.done_count));
update_values.push_back(columns[3] + " = FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.updated_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.updated_time) : "null") + ")");
update_values.push_back(columns[4] + " = FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.completed_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.completed_time) : "null") + ")");
auto results = db.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
completed_shared_task_activity_state_entry.shared_task_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CompletedSharedTaskActivityState InsertOne(
Database& db,
CompletedSharedTaskActivityState completed_shared_task_activity_state_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_shared_task_activity_state_entry.shared_task_id));
insert_values.push_back(std::to_string(completed_shared_task_activity_state_entry.activity_id));
insert_values.push_back(std::to_string(completed_shared_task_activity_state_entry.done_count));
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.updated_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.updated_time) : "null") + ")");
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.completed_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.completed_time) : "null") + ")");
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
completed_shared_task_activity_state_entry.shared_task_id = results.LastInsertedID();
return completed_shared_task_activity_state_entry;
}
completed_shared_task_activity_state_entry = NewEntity();
return completed_shared_task_activity_state_entry;
}
static int InsertMany(
Database& db,
std::vector<CompletedSharedTaskActivityState> completed_shared_task_activity_state_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &completed_shared_task_activity_state_entry: completed_shared_task_activity_state_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_shared_task_activity_state_entry.shared_task_id));
insert_values.push_back(std::to_string(completed_shared_task_activity_state_entry.activity_id));
insert_values.push_back(std::to_string(completed_shared_task_activity_state_entry.done_count));
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.updated_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.updated_time) : "null") + ")");
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.completed_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.completed_time) : "null") + ")");
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CompletedSharedTaskActivityState> All(Database& db)
{
std::vector<CompletedSharedTaskActivityState> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CompletedSharedTaskActivityState entry{};
entry.shared_task_id = strtoll(row[0], nullptr, 10);
entry.activity_id = atoi(row[1]);
entry.done_count = atoi(row[2]);
entry.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
entry.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CompletedSharedTaskActivityState> GetWhere(Database& db, std::string where_filter)
{
std::vector<CompletedSharedTaskActivityState> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CompletedSharedTaskActivityState entry{};
entry.shared_task_id = strtoll(row[0], nullptr, 10);
entry.activity_id = atoi(row[1]);
entry.done_count = atoi(row[2]);
entry.updated_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
entry.completed_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(Database& db, std::string where_filter)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int Truncate(Database& db)
{
auto results = db.QueryDatabase(
fmt::format(
"TRUNCATE TABLE {}",
TableName()
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_COMPLETED_SHARED_TASK_ACTIVITY_STATE_REPOSITORY_H
@@ -0,0 +1,317 @@
/**
* DO NOT MODIFY THIS FILE
*
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
#ifndef EQEMU_BASE_COMPLETED_SHARED_TASK_MEMBERS_REPOSITORY_H
#define EQEMU_BASE_COMPLETED_SHARED_TASK_MEMBERS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
#include <ctime>
class BaseCompletedSharedTaskMembersRepository {
public:
struct CompletedSharedTaskMembers {
int64 shared_task_id;
int64 character_id;
int is_leader;
};
static std::string PrimaryKey()
{
return std::string("shared_task_id");
}
static std::vector<std::string> Columns()
{
return {
"shared_task_id",
"character_id",
"is_leader",
};
}
static std::vector<std::string> SelectColumns()
{
return {
"shared_task_id",
"character_id",
"is_leader",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string SelectColumnsRaw()
{
return std::string(implode(", ", SelectColumns()));
}
static std::string TableName()
{
return std::string("completed_shared_task_members");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
SelectColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
ColumnsRaw()
);
}
static CompletedSharedTaskMembers NewEntity()
{
CompletedSharedTaskMembers entry{};
entry.shared_task_id = 0;
entry.character_id = 0;
entry.is_leader = 0;
return entry;
}
static CompletedSharedTaskMembers GetCompletedSharedTaskMembersEntry(
const std::vector<CompletedSharedTaskMembers> &completed_shared_task_memberss,
int completed_shared_task_members_id
)
{
for (auto &completed_shared_task_members : completed_shared_task_memberss) {
if (completed_shared_task_members.shared_task_id == completed_shared_task_members_id) {
return completed_shared_task_members;
}
}
return NewEntity();
}
static CompletedSharedTaskMembers FindOne(
Database& db,
int completed_shared_task_members_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
completed_shared_task_members_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CompletedSharedTaskMembers entry{};
entry.shared_task_id = strtoll(row[0], nullptr, 10);
entry.character_id = strtoll(row[1], nullptr, 10);
entry.is_leader = atoi(row[2]);
return entry;
}
return NewEntity();
}
static int DeleteOne(
Database& db,
int completed_shared_task_members_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
completed_shared_task_members_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Database& db,
CompletedSharedTaskMembers completed_shared_task_members_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(completed_shared_task_members_entry.shared_task_id));
update_values.push_back(columns[1] + " = " + std::to_string(completed_shared_task_members_entry.character_id));
update_values.push_back(columns[2] + " = " + std::to_string(completed_shared_task_members_entry.is_leader));
auto results = db.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
completed_shared_task_members_entry.shared_task_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CompletedSharedTaskMembers InsertOne(
Database& db,
CompletedSharedTaskMembers completed_shared_task_members_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_shared_task_members_entry.shared_task_id));
insert_values.push_back(std::to_string(completed_shared_task_members_entry.character_id));
insert_values.push_back(std::to_string(completed_shared_task_members_entry.is_leader));
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
completed_shared_task_members_entry.shared_task_id = results.LastInsertedID();
return completed_shared_task_members_entry;
}
completed_shared_task_members_entry = NewEntity();
return completed_shared_task_members_entry;
}
static int InsertMany(
Database& db,
std::vector<CompletedSharedTaskMembers> completed_shared_task_members_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &completed_shared_task_members_entry: completed_shared_task_members_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_shared_task_members_entry.shared_task_id));
insert_values.push_back(std::to_string(completed_shared_task_members_entry.character_id));
insert_values.push_back(std::to_string(completed_shared_task_members_entry.is_leader));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CompletedSharedTaskMembers> All(Database& db)
{
std::vector<CompletedSharedTaskMembers> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CompletedSharedTaskMembers entry{};
entry.shared_task_id = strtoll(row[0], nullptr, 10);
entry.character_id = strtoll(row[1], nullptr, 10);
entry.is_leader = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CompletedSharedTaskMembers> GetWhere(Database& db, std::string where_filter)
{
std::vector<CompletedSharedTaskMembers> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CompletedSharedTaskMembers entry{};
entry.shared_task_id = strtoll(row[0], nullptr, 10);
entry.character_id = strtoll(row[1], nullptr, 10);
entry.is_leader = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(Database& db, std::string where_filter)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int Truncate(Database& db)
{
auto results = db.QueryDatabase(
fmt::format(
"TRUNCATE TABLE {}",
TableName()
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_COMPLETED_SHARED_TASK_MEMBERS_REPOSITORY_H
@@ -0,0 +1,347 @@
/**
* DO NOT MODIFY THIS FILE
*
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
#ifndef EQEMU_BASE_COMPLETED_SHARED_TASKS_REPOSITORY_H
#define EQEMU_BASE_COMPLETED_SHARED_TASKS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
#include <ctime>
class BaseCompletedSharedTasksRepository {
public:
struct CompletedSharedTasks {
int64 id;
int task_id;
time_t accepted_time;
time_t expire_time;
time_t completion_time;
int is_locked;
};
static std::string PrimaryKey()
{
return std::string("id");
}
static std::vector<std::string> Columns()
{
return {
"id",
"task_id",
"accepted_time",
"expire_time",
"completion_time",
"is_locked",
};
}
static std::vector<std::string> SelectColumns()
{
return {
"id",
"task_id",
"UNIX_TIMESTAMP(accepted_time)",
"UNIX_TIMESTAMP(expire_time)",
"UNIX_TIMESTAMP(completion_time)",
"is_locked",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string SelectColumnsRaw()
{
return std::string(implode(", ", SelectColumns()));
}
static std::string TableName()
{
return std::string("completed_shared_tasks");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
SelectColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
ColumnsRaw()
);
}
static CompletedSharedTasks NewEntity()
{
CompletedSharedTasks entry{};
entry.id = 0;
entry.task_id = 0;
entry.accepted_time = 0;
entry.expire_time = 0;
entry.completion_time = 0;
entry.is_locked = 0;
return entry;
}
static CompletedSharedTasks GetCompletedSharedTasksEntry(
const std::vector<CompletedSharedTasks> &completed_shared_taskss,
int completed_shared_tasks_id
)
{
for (auto &completed_shared_tasks : completed_shared_taskss) {
if (completed_shared_tasks.id == completed_shared_tasks_id) {
return completed_shared_tasks;
}
}
return NewEntity();
}
static CompletedSharedTasks FindOne(
Database& db,
int completed_shared_tasks_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
completed_shared_tasks_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CompletedSharedTasks entry{};
entry.id = strtoll(row[0], nullptr, 10);
entry.task_id = atoi(row[1]);
entry.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
entry.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
entry.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
entry.is_locked = atoi(row[5]);
return entry;
}
return NewEntity();
}
static int DeleteOne(
Database& db,
int completed_shared_tasks_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
completed_shared_tasks_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Database& db,
CompletedSharedTasks completed_shared_tasks_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(completed_shared_tasks_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(completed_shared_tasks_entry.task_id));
update_values.push_back(columns[2] + " = FROM_UNIXTIME(" + (completed_shared_tasks_entry.accepted_time > 0 ? std::to_string(completed_shared_tasks_entry.accepted_time) : "null") + ")");
update_values.push_back(columns[3] + " = FROM_UNIXTIME(" + (completed_shared_tasks_entry.expire_time > 0 ? std::to_string(completed_shared_tasks_entry.expire_time) : "null") + ")");
update_values.push_back(columns[4] + " = FROM_UNIXTIME(" + (completed_shared_tasks_entry.completion_time > 0 ? std::to_string(completed_shared_tasks_entry.completion_time) : "null") + ")");
update_values.push_back(columns[5] + " = " + std::to_string(completed_shared_tasks_entry.is_locked));
auto results = db.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
completed_shared_tasks_entry.id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CompletedSharedTasks InsertOne(
Database& db,
CompletedSharedTasks completed_shared_tasks_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_shared_tasks_entry.id));
insert_values.push_back(std::to_string(completed_shared_tasks_entry.task_id));
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.accepted_time > 0 ? std::to_string(completed_shared_tasks_entry.accepted_time) : "null") + ")");
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.expire_time > 0 ? std::to_string(completed_shared_tasks_entry.expire_time) : "null") + ")");
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.completion_time > 0 ? std::to_string(completed_shared_tasks_entry.completion_time) : "null") + ")");
insert_values.push_back(std::to_string(completed_shared_tasks_entry.is_locked));
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
completed_shared_tasks_entry.id = results.LastInsertedID();
return completed_shared_tasks_entry;
}
completed_shared_tasks_entry = NewEntity();
return completed_shared_tasks_entry;
}
static int InsertMany(
Database& db,
std::vector<CompletedSharedTasks> completed_shared_tasks_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &completed_shared_tasks_entry: completed_shared_tasks_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_shared_tasks_entry.id));
insert_values.push_back(std::to_string(completed_shared_tasks_entry.task_id));
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.accepted_time > 0 ? std::to_string(completed_shared_tasks_entry.accepted_time) : "null") + ")");
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.expire_time > 0 ? std::to_string(completed_shared_tasks_entry.expire_time) : "null") + ")");
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.completion_time > 0 ? std::to_string(completed_shared_tasks_entry.completion_time) : "null") + ")");
insert_values.push_back(std::to_string(completed_shared_tasks_entry.is_locked));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = db.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CompletedSharedTasks> All(Database& db)
{
std::vector<CompletedSharedTasks> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CompletedSharedTasks entry{};
entry.id = strtoll(row[0], nullptr, 10);
entry.task_id = atoi(row[1]);
entry.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
entry.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
entry.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
entry.is_locked = atoi(row[5]);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CompletedSharedTasks> GetWhere(Database& db, std::string where_filter)
{
std::vector<CompletedSharedTasks> all_entries;
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CompletedSharedTasks entry{};
entry.id = strtoll(row[0], nullptr, 10);
entry.task_id = atoi(row[1]);
entry.accepted_time = strtoll(row[2] ? row[2] : "-1", nullptr, 10);
entry.expire_time = strtoll(row[3] ? row[3] : "-1", nullptr, 10);
entry.completion_time = strtoll(row[4] ? row[4] : "-1", nullptr, 10);
entry.is_locked = atoi(row[5]);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(Database& db, std::string where_filter)
{
auto results = db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int Truncate(Database& db)
{
auto results = db.QueryDatabase(
fmt::format(
"TRUNCATE TABLE {}",
TableName()
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_COMPLETED_SHARED_TASKS_REPOSITORY_H
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -18,7 +18,7 @@
class BaseDataBucketsRepository {
public:
struct DataBuckets {
int id;
int64 id;
std::string key;
std::string value;
int expires;
@@ -110,7 +110,7 @@ public:
if (results.RowCount() == 1) {
DataBuckets entry{};
entry.id = atoi(row[0]);
entry.id = strtoll(row[0], NULL, 10);
entry.key = row[1] ? row[1] : "";
entry.value = row[2] ? row[2] : "";
entry.expires = atoi(row[3]);
@@ -241,7 +241,7 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
DataBuckets entry{};
entry.id = atoi(row[0]);
entry.id = strtoll(row[0], NULL, 10);
entry.key = row[1] ? row[1] : "";
entry.value = row[2] ? row[2] : "";
entry.expires = atoi(row[3]);
@@ -269,7 +269,7 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
DataBuckets entry{};
entry.id = atoi(row[0]);
entry.id = strtoll(row[0], NULL, 10);
entry.key = row[1] ? row[1] : "";
entry.value = row[2] ? row[2] : "";
entry.expires = atoi(row[3]);
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -53,7 +53,6 @@ public:
int max_expansion;
std::string content_flags;
std::string content_flags_disabled;
int is_instance_door;
};
static std::string PrimaryKey()
@@ -99,7 +98,6 @@ public:
"max_expansion",
"content_flags",
"content_flags_disabled",
"is_instance_door",
};
}
@@ -170,7 +168,6 @@ public:
entry.max_expansion = 0;
entry.content_flags = "";
entry.content_flags_disabled = "";
entry.is_instance_door = 0;
return entry;
}
@@ -241,7 +238,6 @@ public:
entry.max_expansion = atoi(row[32]);
entry.content_flags = row[33] ? row[33] : "";
entry.content_flags_disabled = row[34] ? row[34] : "";
entry.is_instance_door = atoi(row[35]);
return entry;
}
@@ -309,7 +305,6 @@ public:
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) + "'");
update_values.push_back(columns[35] + " = " + std::to_string(doors_entry.is_instance_door));
auto results = db.QueryDatabase(
fmt::format(
@@ -366,7 +361,6 @@ public:
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_values.push_back(std::to_string(doors_entry.is_instance_door));
auto results = db.QueryDatabase(
fmt::format(
@@ -431,7 +425,6 @@ public:
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_values.push_back(std::to_string(doors_entry.is_instance_door));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
@@ -500,7 +493,6 @@ public:
entry.max_expansion = atoi(row[32]);
entry.content_flags = row[33] ? row[33] : "";
entry.content_flags_disabled = row[34] ? row[34] : "";
entry.is_instance_door = atoi(row[35]);
all_entries.push_back(entry);
}
@@ -560,7 +552,6 @@ public:
entry.max_expansion = atoi(row[32]);
entry.content_flags = row[33] ? row[33] : "";
entry.content_flags_disabled = row[34] ? row[34] : "";
entry.is_instance_door = atoi(row[35]);
all_entries.push_back(entry);
}
@@ -4,24 +4,23 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
#ifndef EQEMU_BASE_EXPEDITION_MEMBERS_REPOSITORY_H
#define EQEMU_BASE_EXPEDITION_MEMBERS_REPOSITORY_H
#ifndef EQEMU_BASE_DYNAMIC_ZONE_MEMBERS_REPOSITORY_H
#define EQEMU_BASE_DYNAMIC_ZONE_MEMBERS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseExpeditionMembersRepository {
class BaseDynamicZoneMembersRepository {
public:
struct ExpeditionMembers {
struct DynamicZoneMembers {
int id;
int expedition_id;
int dynamic_zone_id;
int character_id;
int is_current_member;
};
static std::string PrimaryKey()
@@ -33,9 +32,8 @@ public:
{
return {
"id",
"expedition_id",
"dynamic_zone_id",
"character_id",
"is_current_member",
};
}
@@ -46,7 +44,7 @@ public:
static std::string TableName()
{
return std::string("expedition_members");
return std::string("dynamic_zone_members");
}
static std::string BaseSelect()
@@ -67,53 +65,51 @@ public:
);
}
static ExpeditionMembers NewEntity()
static DynamicZoneMembers NewEntity()
{
ExpeditionMembers entry{};
DynamicZoneMembers entry{};
entry.id = 0;
entry.expedition_id = 0;
entry.character_id = 0;
entry.is_current_member = 1;
entry.id = 0;
entry.dynamic_zone_id = 0;
entry.character_id = 0;
return entry;
}
static ExpeditionMembers GetExpeditionMembersEntry(
const std::vector<ExpeditionMembers> &expedition_memberss,
int expedition_members_id
static DynamicZoneMembers GetDynamicZoneMembersEntry(
const std::vector<DynamicZoneMembers> &dynamic_zone_memberss,
int dynamic_zone_members_id
)
{
for (auto &expedition_members : expedition_memberss) {
if (expedition_members.id == expedition_members_id) {
return expedition_members;
for (auto &dynamic_zone_members : dynamic_zone_memberss) {
if (dynamic_zone_members.id == dynamic_zone_members_id) {
return dynamic_zone_members;
}
}
return NewEntity();
}
static ExpeditionMembers FindOne(
static DynamicZoneMembers FindOne(
Database& db,
int expedition_members_id
int dynamic_zone_members_id
)
{
auto results = db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
expedition_members_id
dynamic_zone_members_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
ExpeditionMembers entry{};
DynamicZoneMembers entry{};
entry.id = atoi(row[0]);
entry.expedition_id = atoi(row[1]);
entry.character_id = atoi(row[2]);
entry.is_current_member = atoi(row[3]);
entry.id = atoi(row[0]);
entry.dynamic_zone_id = atoi(row[1]);
entry.character_id = atoi(row[2]);
return entry;
}
@@ -123,7 +119,7 @@ public:
static int DeleteOne(
Database& db,
int expedition_members_id
int dynamic_zone_members_id
)
{
auto results = db.QueryDatabase(
@@ -131,7 +127,7 @@ public:
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
expedition_members_id
dynamic_zone_members_id
)
);
@@ -140,16 +136,15 @@ public:
static int UpdateOne(
Database& db,
ExpeditionMembers expedition_members_entry
DynamicZoneMembers dynamic_zone_members_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(expedition_members_entry.expedition_id));
update_values.push_back(columns[2] + " = " + std::to_string(expedition_members_entry.character_id));
update_values.push_back(columns[3] + " = " + std::to_string(expedition_members_entry.is_current_member));
update_values.push_back(columns[1] + " = " + std::to_string(dynamic_zone_members_entry.dynamic_zone_id));
update_values.push_back(columns[2] + " = " + std::to_string(dynamic_zone_members_entry.character_id));
auto results = db.QueryDatabase(
fmt::format(
@@ -157,24 +152,23 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
expedition_members_entry.id
dynamic_zone_members_entry.id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static ExpeditionMembers InsertOne(
static DynamicZoneMembers InsertOne(
Database& db,
ExpeditionMembers expedition_members_entry
DynamicZoneMembers dynamic_zone_members_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(expedition_members_entry.id));
insert_values.push_back(std::to_string(expedition_members_entry.expedition_id));
insert_values.push_back(std::to_string(expedition_members_entry.character_id));
insert_values.push_back(std::to_string(expedition_members_entry.is_current_member));
insert_values.push_back(std::to_string(dynamic_zone_members_entry.id));
insert_values.push_back(std::to_string(dynamic_zone_members_entry.dynamic_zone_id));
insert_values.push_back(std::to_string(dynamic_zone_members_entry.character_id));
auto results = db.QueryDatabase(
fmt::format(
@@ -185,29 +179,28 @@ public:
);
if (results.Success()) {
expedition_members_entry.id = results.LastInsertedID();
return expedition_members_entry;
dynamic_zone_members_entry.id = results.LastInsertedID();
return dynamic_zone_members_entry;
}
expedition_members_entry = NewEntity();
dynamic_zone_members_entry = NewEntity();
return expedition_members_entry;
return dynamic_zone_members_entry;
}
static int InsertMany(
Database& db,
std::vector<ExpeditionMembers> expedition_members_entries
std::vector<DynamicZoneMembers> dynamic_zone_members_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &expedition_members_entry: expedition_members_entries) {
for (auto &dynamic_zone_members_entry: dynamic_zone_members_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(expedition_members_entry.id));
insert_values.push_back(std::to_string(expedition_members_entry.expedition_id));
insert_values.push_back(std::to_string(expedition_members_entry.character_id));
insert_values.push_back(std::to_string(expedition_members_entry.is_current_member));
insert_values.push_back(std::to_string(dynamic_zone_members_entry.id));
insert_values.push_back(std::to_string(dynamic_zone_members_entry.dynamic_zone_id));
insert_values.push_back(std::to_string(dynamic_zone_members_entry.character_id));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
@@ -225,9 +218,9 @@ public:
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<ExpeditionMembers> All(Database& db)
static std::vector<DynamicZoneMembers> All(Database& db)
{
std::vector<ExpeditionMembers> all_entries;
std::vector<DynamicZoneMembers> all_entries;
auto results = db.QueryDatabase(
fmt::format(
@@ -239,12 +232,11 @@ public:
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
ExpeditionMembers entry{};
DynamicZoneMembers entry{};
entry.id = atoi(row[0]);
entry.expedition_id = atoi(row[1]);
entry.character_id = atoi(row[2]);
entry.is_current_member = atoi(row[3]);
entry.id = atoi(row[0]);
entry.dynamic_zone_id = atoi(row[1]);
entry.character_id = atoi(row[2]);
all_entries.push_back(entry);
}
@@ -252,9 +244,9 @@ public:
return all_entries;
}
static std::vector<ExpeditionMembers> GetWhere(Database& db, std::string where_filter)
static std::vector<DynamicZoneMembers> GetWhere(Database& db, std::string where_filter)
{
std::vector<ExpeditionMembers> all_entries;
std::vector<DynamicZoneMembers> all_entries;
auto results = db.QueryDatabase(
fmt::format(
@@ -267,12 +259,11 @@ public:
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
ExpeditionMembers entry{};
DynamicZoneMembers entry{};
entry.id = atoi(row[0]);
entry.expedition_id = atoi(row[1]);
entry.character_id = atoi(row[2]);
entry.is_current_member = atoi(row[3]);
entry.id = atoi(row[0]);
entry.dynamic_zone_id = atoi(row[1]);
entry.character_id = atoi(row[2]);
all_entries.push_back(entry);
}
@@ -307,4 +298,4 @@ public:
};
#endif //EQEMU_BASE_EXPEDITION_MEMBERS_REPOSITORY_H
#endif //EQEMU_BASE_DYNAMIC_ZONE_MEMBERS_REPOSITORY_H
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -18,23 +18,28 @@
class BaseDynamicZonesRepository {
public:
struct DynamicZones {
int id;
int instance_id;
int type;
int compass_zone_id;
float compass_x;
float compass_y;
float compass_z;
int safe_return_zone_id;
float safe_return_x;
float safe_return_y;
float safe_return_z;
float safe_return_heading;
float zone_in_x;
float zone_in_y;
float zone_in_z;
float zone_in_heading;
int has_zone_in;
int id;
int instance_id;
int type;
std::string uuid;
std::string name;
int leader_id;
int min_players;
int max_players;
int compass_zone_id;
float compass_x;
float compass_y;
float compass_z;
int safe_return_zone_id;
float safe_return_x;
float safe_return_y;
float safe_return_z;
float safe_return_heading;
float zone_in_x;
float zone_in_y;
float zone_in_z;
float zone_in_heading;
int has_zone_in;
};
static std::string PrimaryKey()
@@ -48,6 +53,11 @@ public:
"id",
"instance_id",
"type",
"uuid",
"name",
"leader_id",
"min_players",
"max_players",
"compass_zone_id",
"compass_x",
"compass_y",
@@ -100,6 +110,11 @@ public:
entry.id = 0;
entry.instance_id = 0;
entry.type = 0;
entry.uuid = "";
entry.name = "";
entry.leader_id = 0;
entry.min_players = 0;
entry.max_players = 0;
entry.compass_zone_id = 0;
entry.compass_x = 0;
entry.compass_y = 0;
@@ -152,20 +167,25 @@ public:
entry.id = atoi(row[0]);
entry.instance_id = atoi(row[1]);
entry.type = atoi(row[2]);
entry.compass_zone_id = atoi(row[3]);
entry.compass_x = static_cast<float>(atof(row[4]));
entry.compass_y = static_cast<float>(atof(row[5]));
entry.compass_z = static_cast<float>(atof(row[6]));
entry.safe_return_zone_id = atoi(row[7]);
entry.safe_return_x = static_cast<float>(atof(row[8]));
entry.safe_return_y = static_cast<float>(atof(row[9]));
entry.safe_return_z = static_cast<float>(atof(row[10]));
entry.safe_return_heading = static_cast<float>(atof(row[11]));
entry.zone_in_x = static_cast<float>(atof(row[12]));
entry.zone_in_y = static_cast<float>(atof(row[13]));
entry.zone_in_z = static_cast<float>(atof(row[14]));
entry.zone_in_heading = static_cast<float>(atof(row[15]));
entry.has_zone_in = atoi(row[16]);
entry.uuid = row[3] ? row[3] : "";
entry.name = row[4] ? row[4] : "";
entry.leader_id = atoi(row[5]);
entry.min_players = atoi(row[6]);
entry.max_players = atoi(row[7]);
entry.compass_zone_id = atoi(row[8]);
entry.compass_x = static_cast<float>(atof(row[9]));
entry.compass_y = static_cast<float>(atof(row[10]));
entry.compass_z = static_cast<float>(atof(row[11]));
entry.safe_return_zone_id = atoi(row[12]);
entry.safe_return_x = static_cast<float>(atof(row[13]));
entry.safe_return_y = static_cast<float>(atof(row[14]));
entry.safe_return_z = static_cast<float>(atof(row[15]));
entry.safe_return_heading = static_cast<float>(atof(row[16]));
entry.zone_in_x = static_cast<float>(atof(row[17]));
entry.zone_in_y = static_cast<float>(atof(row[18]));
entry.zone_in_z = static_cast<float>(atof(row[19]));
entry.zone_in_heading = static_cast<float>(atof(row[20]));
entry.has_zone_in = atoi(row[21]);
return entry;
}
@@ -201,20 +221,25 @@ public:
update_values.push_back(columns[1] + " = " + std::to_string(dynamic_zones_entry.instance_id));
update_values.push_back(columns[2] + " = " + std::to_string(dynamic_zones_entry.type));
update_values.push_back(columns[3] + " = " + std::to_string(dynamic_zones_entry.compass_zone_id));
update_values.push_back(columns[4] + " = " + std::to_string(dynamic_zones_entry.compass_x));
update_values.push_back(columns[5] + " = " + std::to_string(dynamic_zones_entry.compass_y));
update_values.push_back(columns[6] + " = " + std::to_string(dynamic_zones_entry.compass_z));
update_values.push_back(columns[7] + " = " + std::to_string(dynamic_zones_entry.safe_return_zone_id));
update_values.push_back(columns[8] + " = " + std::to_string(dynamic_zones_entry.safe_return_x));
update_values.push_back(columns[9] + " = " + std::to_string(dynamic_zones_entry.safe_return_y));
update_values.push_back(columns[10] + " = " + std::to_string(dynamic_zones_entry.safe_return_z));
update_values.push_back(columns[11] + " = " + std::to_string(dynamic_zones_entry.safe_return_heading));
update_values.push_back(columns[12] + " = " + std::to_string(dynamic_zones_entry.zone_in_x));
update_values.push_back(columns[13] + " = " + std::to_string(dynamic_zones_entry.zone_in_y));
update_values.push_back(columns[14] + " = " + std::to_string(dynamic_zones_entry.zone_in_z));
update_values.push_back(columns[15] + " = " + std::to_string(dynamic_zones_entry.zone_in_heading));
update_values.push_back(columns[16] + " = " + std::to_string(dynamic_zones_entry.has_zone_in));
update_values.push_back(columns[3] + " = '" + EscapeString(dynamic_zones_entry.uuid) + "'");
update_values.push_back(columns[4] + " = '" + EscapeString(dynamic_zones_entry.name) + "'");
update_values.push_back(columns[5] + " = " + std::to_string(dynamic_zones_entry.leader_id));
update_values.push_back(columns[6] + " = " + std::to_string(dynamic_zones_entry.min_players));
update_values.push_back(columns[7] + " = " + std::to_string(dynamic_zones_entry.max_players));
update_values.push_back(columns[8] + " = " + std::to_string(dynamic_zones_entry.compass_zone_id));
update_values.push_back(columns[9] + " = " + std::to_string(dynamic_zones_entry.compass_x));
update_values.push_back(columns[10] + " = " + std::to_string(dynamic_zones_entry.compass_y));
update_values.push_back(columns[11] + " = " + std::to_string(dynamic_zones_entry.compass_z));
update_values.push_back(columns[12] + " = " + std::to_string(dynamic_zones_entry.safe_return_zone_id));
update_values.push_back(columns[13] + " = " + std::to_string(dynamic_zones_entry.safe_return_x));
update_values.push_back(columns[14] + " = " + std::to_string(dynamic_zones_entry.safe_return_y));
update_values.push_back(columns[15] + " = " + std::to_string(dynamic_zones_entry.safe_return_z));
update_values.push_back(columns[16] + " = " + std::to_string(dynamic_zones_entry.safe_return_heading));
update_values.push_back(columns[17] + " = " + std::to_string(dynamic_zones_entry.zone_in_x));
update_values.push_back(columns[18] + " = " + std::to_string(dynamic_zones_entry.zone_in_y));
update_values.push_back(columns[19] + " = " + std::to_string(dynamic_zones_entry.zone_in_z));
update_values.push_back(columns[20] + " = " + std::to_string(dynamic_zones_entry.zone_in_heading));
update_values.push_back(columns[21] + " = " + std::to_string(dynamic_zones_entry.has_zone_in));
auto results = db.QueryDatabase(
fmt::format(
@@ -239,6 +264,11 @@ public:
insert_values.push_back(std::to_string(dynamic_zones_entry.id));
insert_values.push_back(std::to_string(dynamic_zones_entry.instance_id));
insert_values.push_back(std::to_string(dynamic_zones_entry.type));
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.uuid) + "'");
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.name) + "'");
insert_values.push_back(std::to_string(dynamic_zones_entry.leader_id));
insert_values.push_back(std::to_string(dynamic_zones_entry.min_players));
insert_values.push_back(std::to_string(dynamic_zones_entry.max_players));
insert_values.push_back(std::to_string(dynamic_zones_entry.compass_zone_id));
insert_values.push_back(std::to_string(dynamic_zones_entry.compass_x));
insert_values.push_back(std::to_string(dynamic_zones_entry.compass_y));
@@ -285,6 +315,11 @@ public:
insert_values.push_back(std::to_string(dynamic_zones_entry.id));
insert_values.push_back(std::to_string(dynamic_zones_entry.instance_id));
insert_values.push_back(std::to_string(dynamic_zones_entry.type));
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.uuid) + "'");
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.name) + "'");
insert_values.push_back(std::to_string(dynamic_zones_entry.leader_id));
insert_values.push_back(std::to_string(dynamic_zones_entry.min_players));
insert_values.push_back(std::to_string(dynamic_zones_entry.max_players));
insert_values.push_back(std::to_string(dynamic_zones_entry.compass_zone_id));
insert_values.push_back(std::to_string(dynamic_zones_entry.compass_x));
insert_values.push_back(std::to_string(dynamic_zones_entry.compass_y));
@@ -335,20 +370,25 @@ public:
entry.id = atoi(row[0]);
entry.instance_id = atoi(row[1]);
entry.type = atoi(row[2]);
entry.compass_zone_id = atoi(row[3]);
entry.compass_x = static_cast<float>(atof(row[4]));
entry.compass_y = static_cast<float>(atof(row[5]));
entry.compass_z = static_cast<float>(atof(row[6]));
entry.safe_return_zone_id = atoi(row[7]);
entry.safe_return_x = static_cast<float>(atof(row[8]));
entry.safe_return_y = static_cast<float>(atof(row[9]));
entry.safe_return_z = static_cast<float>(atof(row[10]));
entry.safe_return_heading = static_cast<float>(atof(row[11]));
entry.zone_in_x = static_cast<float>(atof(row[12]));
entry.zone_in_y = static_cast<float>(atof(row[13]));
entry.zone_in_z = static_cast<float>(atof(row[14]));
entry.zone_in_heading = static_cast<float>(atof(row[15]));
entry.has_zone_in = atoi(row[16]);
entry.uuid = row[3] ? row[3] : "";
entry.name = row[4] ? row[4] : "";
entry.leader_id = atoi(row[5]);
entry.min_players = atoi(row[6]);
entry.max_players = atoi(row[7]);
entry.compass_zone_id = atoi(row[8]);
entry.compass_x = static_cast<float>(atof(row[9]));
entry.compass_y = static_cast<float>(atof(row[10]));
entry.compass_z = static_cast<float>(atof(row[11]));
entry.safe_return_zone_id = atoi(row[12]);
entry.safe_return_x = static_cast<float>(atof(row[13]));
entry.safe_return_y = static_cast<float>(atof(row[14]));
entry.safe_return_z = static_cast<float>(atof(row[15]));
entry.safe_return_heading = static_cast<float>(atof(row[16]));
entry.zone_in_x = static_cast<float>(atof(row[17]));
entry.zone_in_y = static_cast<float>(atof(row[18]));
entry.zone_in_z = static_cast<float>(atof(row[19]));
entry.zone_in_heading = static_cast<float>(atof(row[20]));
entry.has_zone_in = atoi(row[21]);
all_entries.push_back(entry);
}
@@ -376,20 +416,25 @@ public:
entry.id = atoi(row[0]);
entry.instance_id = atoi(row[1]);
entry.type = atoi(row[2]);
entry.compass_zone_id = atoi(row[3]);
entry.compass_x = static_cast<float>(atof(row[4]));
entry.compass_y = static_cast<float>(atof(row[5]));
entry.compass_z = static_cast<float>(atof(row[6]));
entry.safe_return_zone_id = atoi(row[7]);
entry.safe_return_x = static_cast<float>(atof(row[8]));
entry.safe_return_y = static_cast<float>(atof(row[9]));
entry.safe_return_z = static_cast<float>(atof(row[10]));
entry.safe_return_heading = static_cast<float>(atof(row[11]));
entry.zone_in_x = static_cast<float>(atof(row[12]));
entry.zone_in_y = static_cast<float>(atof(row[13]));
entry.zone_in_z = static_cast<float>(atof(row[14]));
entry.zone_in_heading = static_cast<float>(atof(row[15]));
entry.has_zone_in = atoi(row[16]);
entry.uuid = row[3] ? row[3] : "";
entry.name = row[4] ? row[4] : "";
entry.leader_id = atoi(row[5]);
entry.min_players = atoi(row[6]);
entry.max_players = atoi(row[7]);
entry.compass_zone_id = atoi(row[8]);
entry.compass_x = static_cast<float>(atof(row[9]));
entry.compass_y = static_cast<float>(atof(row[10]));
entry.compass_z = static_cast<float>(atof(row[11]));
entry.safe_return_zone_id = atoi(row[12]);
entry.safe_return_x = static_cast<float>(atof(row[13]));
entry.safe_return_y = static_cast<float>(atof(row[14]));
entry.safe_return_z = static_cast<float>(atof(row[15]));
entry.safe_return_heading = static_cast<float>(atof(row[16]));
entry.zone_in_x = static_cast<float>(atof(row[17]));
entry.zone_in_y = static_cast<float>(atof(row[18]));
entry.zone_in_z = static_cast<float>(atof(row[19]));
entry.zone_in_heading = static_cast<float>(atof(row[20]));
entry.has_zone_in = atoi(row[21]);
all_entries.push_back(entry);
}
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -89,7 +89,7 @@ public:
entry.status = 0;
entry.charname = "";
entry.target = "None";
entry.time = current_timestamp();
entry.time = "";
entry.descriptiontype = "";
entry.description = "";
entry.event_nid = 0;
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -78,7 +78,7 @@ public:
entry.id = 0;
entry.expedition_id = 0;
entry.event_name = "";
entry.expire_time = current_timestamp();
entry.expire_time = "";
entry.duration = 0;
entry.from_expedition_uuid = "";
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -18,15 +18,10 @@
class BaseExpeditionsRepository {
public:
struct Expeditions {
int id;
std::string uuid;
int dynamic_zone_id;
std::string expedition_name;
int leader_id;
int min_players;
int max_players;
int add_replay_on_join;
int is_locked;
int id;
int dynamic_zone_id;
int add_replay_on_join;
int is_locked;
};
static std::string PrimaryKey()
@@ -38,12 +33,7 @@ public:
{
return {
"id",
"uuid",
"dynamic_zone_id",
"expedition_name",
"leader_id",
"min_players",
"max_players",
"add_replay_on_join",
"is_locked",
};
@@ -82,12 +72,7 @@ public:
Expeditions entry{};
entry.id = 0;
entry.uuid = "";
entry.dynamic_zone_id = 0;
entry.expedition_name = "";
entry.leader_id = 0;
entry.min_players = 0;
entry.max_players = 0;
entry.add_replay_on_join = 1;
entry.is_locked = 0;
@@ -126,14 +111,9 @@ public:
Expeditions entry{};
entry.id = atoi(row[0]);
entry.uuid = row[1] ? row[1] : "";
entry.dynamic_zone_id = atoi(row[2]);
entry.expedition_name = row[3] ? row[3] : "";
entry.leader_id = atoi(row[4]);
entry.min_players = atoi(row[5]);
entry.max_players = atoi(row[6]);
entry.add_replay_on_join = atoi(row[7]);
entry.is_locked = atoi(row[8]);
entry.dynamic_zone_id = atoi(row[1]);
entry.add_replay_on_join = atoi(row[2]);
entry.is_locked = atoi(row[3]);
return entry;
}
@@ -167,14 +147,9 @@ public:
auto columns = Columns();
update_values.push_back(columns[1] + " = '" + EscapeString(expeditions_entry.uuid) + "'");
update_values.push_back(columns[2] + " = " + std::to_string(expeditions_entry.dynamic_zone_id));
update_values.push_back(columns[3] + " = '" + EscapeString(expeditions_entry.expedition_name) + "'");
update_values.push_back(columns[4] + " = " + std::to_string(expeditions_entry.leader_id));
update_values.push_back(columns[5] + " = " + std::to_string(expeditions_entry.min_players));
update_values.push_back(columns[6] + " = " + std::to_string(expeditions_entry.max_players));
update_values.push_back(columns[7] + " = " + std::to_string(expeditions_entry.add_replay_on_join));
update_values.push_back(columns[8] + " = " + std::to_string(expeditions_entry.is_locked));
update_values.push_back(columns[1] + " = " + std::to_string(expeditions_entry.dynamic_zone_id));
update_values.push_back(columns[2] + " = " + std::to_string(expeditions_entry.add_replay_on_join));
update_values.push_back(columns[3] + " = " + std::to_string(expeditions_entry.is_locked));
auto results = db.QueryDatabase(
fmt::format(
@@ -197,12 +172,7 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(expeditions_entry.id));
insert_values.push_back("'" + EscapeString(expeditions_entry.uuid) + "'");
insert_values.push_back(std::to_string(expeditions_entry.dynamic_zone_id));
insert_values.push_back("'" + EscapeString(expeditions_entry.expedition_name) + "'");
insert_values.push_back(std::to_string(expeditions_entry.leader_id));
insert_values.push_back(std::to_string(expeditions_entry.min_players));
insert_values.push_back(std::to_string(expeditions_entry.max_players));
insert_values.push_back(std::to_string(expeditions_entry.add_replay_on_join));
insert_values.push_back(std::to_string(expeditions_entry.is_locked));
@@ -235,12 +205,7 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(expeditions_entry.id));
insert_values.push_back("'" + EscapeString(expeditions_entry.uuid) + "'");
insert_values.push_back(std::to_string(expeditions_entry.dynamic_zone_id));
insert_values.push_back("'" + EscapeString(expeditions_entry.expedition_name) + "'");
insert_values.push_back(std::to_string(expeditions_entry.leader_id));
insert_values.push_back(std::to_string(expeditions_entry.min_players));
insert_values.push_back(std::to_string(expeditions_entry.max_players));
insert_values.push_back(std::to_string(expeditions_entry.add_replay_on_join));
insert_values.push_back(std::to_string(expeditions_entry.is_locked));
@@ -277,14 +242,9 @@ public:
Expeditions entry{};
entry.id = atoi(row[0]);
entry.uuid = row[1] ? row[1] : "";
entry.dynamic_zone_id = atoi(row[2]);
entry.expedition_name = row[3] ? row[3] : "";
entry.leader_id = atoi(row[4]);
entry.min_players = atoi(row[5]);
entry.max_players = atoi(row[6]);
entry.add_replay_on_join = atoi(row[7]);
entry.is_locked = atoi(row[8]);
entry.dynamic_zone_id = atoi(row[1]);
entry.add_replay_on_join = atoi(row[2]);
entry.is_locked = atoi(row[3]);
all_entries.push_back(entry);
}
@@ -310,14 +270,9 @@ public:
Expeditions entry{};
entry.id = atoi(row[0]);
entry.uuid = row[1] ? row[1] : "";
entry.dynamic_zone_id = atoi(row[2]);
entry.expedition_name = row[3] ? row[3] : "";
entry.leader_id = atoi(row[4]);
entry.min_players = atoi(row[5]);
entry.max_players = atoi(row[6]);
entry.add_replay_on_join = atoi(row[7]);
entry.is_locked = atoi(row[8]);
entry.dynamic_zone_id = atoi(row[1]);
entry.add_replay_on_join = atoi(row[2]);
entry.is_locked = atoi(row[3]);
all_entries.push_back(entry);
}
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -27,7 +27,7 @@ public:
int rare;
int raid;
std::string race;
std::string class;
std::string class_;
std::string bodytype;
std::string zone;
int hot_zone;
@@ -54,7 +54,7 @@ public:
"rare",
"raid",
"race",
"class",
"`class`",
"bodytype",
"zone",
"hot_zone",
@@ -106,7 +106,7 @@ public:
entry.rare = 0;
entry.raid = 0;
entry.race = "";
entry.class = "";
entry.class_ = "";
entry.bodytype = "";
entry.zone = "";
entry.hot_zone = 0;
@@ -158,7 +158,7 @@ public:
entry.rare = atoi(row[6]);
entry.raid = atoi(row[7]);
entry.race = row[8] ? row[8] : "";
entry.class = row[9] ? row[9] : "";
entry.class_ = row[9] ? row[9] : "";
entry.bodytype = row[10] ? row[10] : "";
entry.zone = row[11] ? row[11] : "";
entry.hot_zone = atoi(row[12]);
@@ -207,7 +207,7 @@ public:
update_values.push_back(columns[6] + " = " + std::to_string(global_loot_entry.rare));
update_values.push_back(columns[7] + " = " + std::to_string(global_loot_entry.raid));
update_values.push_back(columns[8] + " = '" + EscapeString(global_loot_entry.race) + "'");
update_values.push_back(columns[9] + " = '" + EscapeString(global_loot_entry.class) + "'");
update_values.push_back(columns[9] + " = '" + EscapeString(global_loot_entry.class_) + "'");
update_values.push_back(columns[10] + " = '" + EscapeString(global_loot_entry.bodytype) + "'");
update_values.push_back(columns[11] + " = '" + EscapeString(global_loot_entry.zone) + "'");
update_values.push_back(columns[12] + " = " + std::to_string(global_loot_entry.hot_zone));
@@ -245,7 +245,7 @@ public:
insert_values.push_back(std::to_string(global_loot_entry.rare));
insert_values.push_back(std::to_string(global_loot_entry.raid));
insert_values.push_back("'" + EscapeString(global_loot_entry.race) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.class) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.class_) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.bodytype) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.zone) + "'");
insert_values.push_back(std::to_string(global_loot_entry.hot_zone));
@@ -291,7 +291,7 @@ public:
insert_values.push_back(std::to_string(global_loot_entry.rare));
insert_values.push_back(std::to_string(global_loot_entry.raid));
insert_values.push_back("'" + EscapeString(global_loot_entry.race) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.class) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.class_) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.bodytype) + "'");
insert_values.push_back("'" + EscapeString(global_loot_entry.zone) + "'");
insert_values.push_back(std::to_string(global_loot_entry.hot_zone));
@@ -341,7 +341,7 @@ public:
entry.rare = atoi(row[6]);
entry.raid = atoi(row[7]);
entry.race = row[8] ? row[8] : "";
entry.class = row[9] ? row[9] : "";
entry.class_ = row[9] ? row[9] : "";
entry.bodytype = row[10] ? row[10] : "";
entry.zone = row[11] ? row[11] : "";
entry.hot_zone = atoi(row[12]);
@@ -382,7 +382,7 @@ public:
entry.rare = atoi(row[6]);
entry.raid = atoi(row[7]);
entry.race = row[8] ? row[8] : "";
entry.class = row[9] ? row[9] : "";
entry.class_ = row[9] ? row[9] : "";
entry.bodytype = row[10] ? row[10] : "";
entry.zone = row[11] ? row[11] : "";
entry.hot_zone = atoi(row[12]);
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -80,7 +80,7 @@ public:
entry.name = "";
entry.hacked = "";
entry.zone = "";
entry.date = current_timestamp();
entry.date = "";
return entry;
}
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -717,7 +717,7 @@ public:
entry.itemclass = 0;
entry.itemtype = 0;
entry.ldonprice = 0;
entry.ldontheme = 0;
entry.ldontheme = LDoNThemes::Unused;
entry.ldonsold = 0;
entry.light = 0;
entry.lore = "";
@@ -797,8 +797,8 @@ public:
entry.scrolllevel2 = 0;
entry.scrolllevel = 0;
entry.UNK157 = 0;
entry.serialized = 0;
entry.verified = 0;
entry.serialized = "";
entry.verified = "";
entry.serialization = "";
entry.source = "";
entry.UNK033 = 0;
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -87,9 +87,9 @@ public:
entry.account_email = "";
entry.source_loginserver = "";
entry.last_ip_address = "";
entry.last_login_date = 0;
entry.created_at = 0;
entry.updated_at = current_timestamp();
entry.last_login_date = "";
entry.created_at = "";
entry.updated_at = "";
return entry;
}
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -79,8 +79,8 @@ public:
entry.token = "";
entry.can_write = 0;
entry.can_read = 0;
entry.created_at = 0;
entry.updated_at = current_timestamp();
entry.created_at = "";
entry.updated_at = "";
return entry;
}
@@ -4,7 +4,7 @@
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to the repository extending the base.
* Any modifications to base repositories are to be made by the generator only
*
*
* @generator ./utils/scripts/generators/repository-generator.pl
* @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories
*/
@@ -85,7 +85,7 @@ public:
entry.first_name = "";
entry.last_name = "";
entry.email = "";
entry.registration_date = 0;
entry.registration_date = "";
entry.registration_ip_address = "";
return entry;

Some files were not shown because too many files have changed in this diff Show More