[Repositories] Add rank to reserved words (#3982)

* [Repositories] Add `rank` to reserved words

* Update zonedb.cpp

* Guild Ranks

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
Chris Miles
2024-01-14 19:58:03 -06:00
committed by GitHub
parent 883b3b5826
commit 3e50427bb7
6 changed files with 61 additions and 60 deletions
@@ -21,7 +21,7 @@ public:
struct GuildMembers {
int32_t char_id;
uint32_t guild_id;
uint8_t rank;
uint8_t rank_;
uint8_t tribute_enable;
uint32_t total_tribute;
uint32_t last_tribute;
@@ -41,7 +41,7 @@ public:
return {
"char_id",
"guild_id",
"rank",
"`rank`",
"tribute_enable",
"total_tribute",
"last_tribute",
@@ -57,7 +57,7 @@ public:
return {
"char_id",
"guild_id",
"rank",
"`rank`",
"tribute_enable",
"total_tribute",
"last_tribute",
@@ -107,7 +107,7 @@ public:
e.char_id = 0;
e.guild_id = 0;
e.rank = 0;
e.rank_ = 0;
e.tribute_enable = 0;
e.total_tribute = 0;
e.last_tribute = 0;
@@ -153,7 +153,7 @@ public:
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
e.guild_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
e.rank = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
e.rank_ = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
e.tribute_enable = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
e.total_tribute = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
e.last_tribute = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
@@ -196,7 +196,7 @@ public:
v.push_back(columns[0] + " = " + std::to_string(e.char_id));
v.push_back(columns[1] + " = " + std::to_string(e.guild_id));
v.push_back(columns[2] + " = " + std::to_string(e.rank));
v.push_back(columns[2] + " = " + std::to_string(e.rank_));
v.push_back(columns[3] + " = " + std::to_string(e.tribute_enable));
v.push_back(columns[4] + " = " + std::to_string(e.total_tribute));
v.push_back(columns[5] + " = " + std::to_string(e.last_tribute));
@@ -227,7 +227,7 @@ public:
v.push_back(std::to_string(e.char_id));
v.push_back(std::to_string(e.guild_id));
v.push_back(std::to_string(e.rank));
v.push_back(std::to_string(e.rank_));
v.push_back(std::to_string(e.tribute_enable));
v.push_back(std::to_string(e.total_tribute));
v.push_back(std::to_string(e.last_tribute));
@@ -266,7 +266,7 @@ public:
v.push_back(std::to_string(e.char_id));
v.push_back(std::to_string(e.guild_id));
v.push_back(std::to_string(e.rank));
v.push_back(std::to_string(e.rank_));
v.push_back(std::to_string(e.tribute_enable));
v.push_back(std::to_string(e.total_tribute));
v.push_back(std::to_string(e.last_tribute));
@@ -309,7 +309,7 @@ public:
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
e.guild_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
e.rank = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
e.rank_ = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
e.tribute_enable = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
e.total_tribute = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
e.last_tribute = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
@@ -343,7 +343,7 @@ public:
e.char_id = row[0] ? static_cast<int32_t>(atoi(row[0])) : 0;
e.guild_id = row[1] ? static_cast<uint32_t>(strtoul(row[1], nullptr, 10)) : 0;
e.rank = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
e.rank_ = row[2] ? static_cast<uint8_t>(strtoul(row[2], nullptr, 10)) : 0;
e.tribute_enable = row[3] ? static_cast<uint8_t>(strtoul(row[3], nullptr, 10)) : 0;
e.total_tribute = row[4] ? static_cast<uint32_t>(strtoul(row[4], nullptr, 10)) : 0;
e.last_tribute = row[5] ? static_cast<uint32_t>(strtoul(row[5], nullptr, 10)) : 0;
@@ -427,7 +427,7 @@ public:
v.push_back(std::to_string(e.char_id));
v.push_back(std::to_string(e.guild_id));
v.push_back(std::to_string(e.rank));
v.push_back(std::to_string(e.rank_));
v.push_back(std::to_string(e.tribute_enable));
v.push_back(std::to_string(e.total_tribute));
v.push_back(std::to_string(e.last_tribute));
@@ -459,7 +459,7 @@ public:
v.push_back(std::to_string(e.char_id));
v.push_back(std::to_string(e.guild_id));
v.push_back(std::to_string(e.rank));
v.push_back(std::to_string(e.rank_));
v.push_back(std::to_string(e.tribute_enable));
v.push_back(std::to_string(e.total_tribute));
v.push_back(std::to_string(e.last_tribute));