mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 20:51:29 +00:00
[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:
parent
883b3b5826
commit
3e50427bb7
@ -21,7 +21,7 @@ public:
|
|||||||
struct CharacterLeadershipAbilities {
|
struct CharacterLeadershipAbilities {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
uint16_t slot;
|
uint16_t slot;
|
||||||
uint16_t rank;
|
uint16_t rank_;
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
@ -34,7 +34,7 @@ public:
|
|||||||
return {
|
return {
|
||||||
"id",
|
"id",
|
||||||
"slot",
|
"slot",
|
||||||
"rank",
|
"`rank`",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ public:
|
|||||||
return {
|
return {
|
||||||
"id",
|
"id",
|
||||||
"slot",
|
"slot",
|
||||||
"rank",
|
"`rank`",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,9 +84,9 @@ public:
|
|||||||
{
|
{
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = 0;
|
e.id = 0;
|
||||||
e.slot = 0;
|
e.slot = 0;
|
||||||
e.rank = 0;
|
e.rank_ = 0;
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -123,9 +123,9 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||||
e.slot = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
e.slot = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||||
e.rank = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
e.rank_ = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@ -161,7 +161,7 @@ public:
|
|||||||
|
|
||||||
v.push_back(columns[0] + " = " + std::to_string(e.id));
|
v.push_back(columns[0] + " = " + std::to_string(e.id));
|
||||||
v.push_back(columns[1] + " = " + std::to_string(e.slot));
|
v.push_back(columns[1] + " = " + std::to_string(e.slot));
|
||||||
v.push_back(columns[2] + " = " + std::to_string(e.rank));
|
v.push_back(columns[2] + " = " + std::to_string(e.rank_));
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@ -185,7 +185,7 @@ public:
|
|||||||
|
|
||||||
v.push_back(std::to_string(e.id));
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back(std::to_string(e.slot));
|
v.push_back(std::to_string(e.slot));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@ -217,7 +217,7 @@ public:
|
|||||||
|
|
||||||
v.push_back(std::to_string(e.id));
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back(std::to_string(e.slot));
|
v.push_back(std::to_string(e.slot));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
|
|
||||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||||
}
|
}
|
||||||
@ -251,9 +251,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||||
e.slot = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
e.slot = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||||
e.rank = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
e.rank_ = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -278,9 +278,9 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharacterLeadershipAbilities e{};
|
CharacterLeadershipAbilities e{};
|
||||||
|
|
||||||
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||||
e.slot = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
e.slot = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||||
e.rank = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
e.rank_ = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ public:
|
|||||||
|
|
||||||
v.push_back(std::to_string(e.id));
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back(std::to_string(e.slot));
|
v.push_back(std::to_string(e.slot));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@ -382,7 +382,7 @@ public:
|
|||||||
|
|
||||||
v.push_back(std::to_string(e.id));
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back(std::to_string(e.slot));
|
v.push_back(std::to_string(e.slot));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
|
|
||||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@ public:
|
|||||||
struct GuildMembers {
|
struct GuildMembers {
|
||||||
int32_t char_id;
|
int32_t char_id;
|
||||||
uint32_t guild_id;
|
uint32_t guild_id;
|
||||||
uint8_t rank;
|
uint8_t rank_;
|
||||||
uint8_t tribute_enable;
|
uint8_t tribute_enable;
|
||||||
uint32_t total_tribute;
|
uint32_t total_tribute;
|
||||||
uint32_t last_tribute;
|
uint32_t last_tribute;
|
||||||
@ -41,7 +41,7 @@ public:
|
|||||||
return {
|
return {
|
||||||
"char_id",
|
"char_id",
|
||||||
"guild_id",
|
"guild_id",
|
||||||
"rank",
|
"`rank`",
|
||||||
"tribute_enable",
|
"tribute_enable",
|
||||||
"total_tribute",
|
"total_tribute",
|
||||||
"last_tribute",
|
"last_tribute",
|
||||||
@ -57,7 +57,7 @@ public:
|
|||||||
return {
|
return {
|
||||||
"char_id",
|
"char_id",
|
||||||
"guild_id",
|
"guild_id",
|
||||||
"rank",
|
"`rank`",
|
||||||
"tribute_enable",
|
"tribute_enable",
|
||||||
"total_tribute",
|
"total_tribute",
|
||||||
"last_tribute",
|
"last_tribute",
|
||||||
@ -107,7 +107,7 @@ public:
|
|||||||
|
|
||||||
e.char_id = 0;
|
e.char_id = 0;
|
||||||
e.guild_id = 0;
|
e.guild_id = 0;
|
||||||
e.rank = 0;
|
e.rank_ = 0;
|
||||||
e.tribute_enable = 0;
|
e.tribute_enable = 0;
|
||||||
e.total_tribute = 0;
|
e.total_tribute = 0;
|
||||||
e.last_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.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.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.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.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;
|
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[0] + " = " + std::to_string(e.char_id));
|
||||||
v.push_back(columns[1] + " = " + std::to_string(e.guild_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[3] + " = " + std::to_string(e.tribute_enable));
|
||||||
v.push_back(columns[4] + " = " + std::to_string(e.total_tribute));
|
v.push_back(columns[4] + " = " + std::to_string(e.total_tribute));
|
||||||
v.push_back(columns[5] + " = " + std::to_string(e.last_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.char_id));
|
||||||
v.push_back(std::to_string(e.guild_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.tribute_enable));
|
||||||
v.push_back(std::to_string(e.total_tribute));
|
v.push_back(std::to_string(e.total_tribute));
|
||||||
v.push_back(std::to_string(e.last_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.char_id));
|
||||||
v.push_back(std::to_string(e.guild_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.tribute_enable));
|
||||||
v.push_back(std::to_string(e.total_tribute));
|
v.push_back(std::to_string(e.total_tribute));
|
||||||
v.push_back(std::to_string(e.last_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.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.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.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.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;
|
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.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.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.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.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;
|
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.char_id));
|
||||||
v.push_back(std::to_string(e.guild_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.tribute_enable));
|
||||||
v.push_back(std::to_string(e.total_tribute));
|
v.push_back(std::to_string(e.total_tribute));
|
||||||
v.push_back(std::to_string(e.last_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.char_id));
|
||||||
v.push_back(std::to_string(e.guild_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.tribute_enable));
|
||||||
v.push_back(std::to_string(e.total_tribute));
|
v.push_back(std::to_string(e.total_tribute));
|
||||||
v.push_back(std::to_string(e.last_tribute));
|
v.push_back(std::to_string(e.last_tribute));
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class BaseGuildRanksRepository {
|
|||||||
public:
|
public:
|
||||||
struct GuildRanks {
|
struct GuildRanks {
|
||||||
uint32_t guild_id;
|
uint32_t guild_id;
|
||||||
uint8_t rank;
|
uint8_t rank_;
|
||||||
std::string title;
|
std::string title;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ public:
|
|||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
"guild_id",
|
"guild_id",
|
||||||
"rank",
|
"`rank`",
|
||||||
"title",
|
"title",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ public:
|
|||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
"guild_id",
|
"guild_id",
|
||||||
"rank",
|
"`rank`",
|
||||||
"title",
|
"title",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ public:
|
|||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = 0;
|
e.guild_id = 0;
|
||||||
e.rank = 0;
|
e.rank_ = 0;
|
||||||
e.title = "";
|
e.title = "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||||
e.rank = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
e.rank_ = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||||
e.title = row[2] ? row[2] : "";
|
e.title = row[2] ? row[2] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@ -160,7 +160,7 @@ public:
|
|||||||
auto columns = Columns();
|
auto columns = Columns();
|
||||||
|
|
||||||
v.push_back(columns[0] + " = " + std::to_string(e.guild_id));
|
v.push_back(columns[0] + " = " + std::to_string(e.guild_id));
|
||||||
v.push_back(columns[1] + " = " + std::to_string(e.rank));
|
v.push_back(columns[1] + " = " + std::to_string(e.rank_));
|
||||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.title) + "'");
|
v.push_back(columns[2] + " = '" + Strings::Escape(e.title) + "'");
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
@ -184,7 +184,7 @@ public:
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
v.push_back(std::to_string(e.guild_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("'" + Strings::Escape(e.title) + "'");
|
v.push_back("'" + Strings::Escape(e.title) + "'");
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
@ -216,7 +216,7 @@ public:
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
v.push_back(std::to_string(e.guild_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("'" + Strings::Escape(e.title) + "'");
|
v.push_back("'" + Strings::Escape(e.title) + "'");
|
||||||
|
|
||||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||||
@ -252,7 +252,7 @@ public:
|
|||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||||
e.rank = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
e.rank_ = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||||
e.title = row[2] ? row[2] : "";
|
e.title = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -279,7 +279,7 @@ public:
|
|||||||
GuildRanks e{};
|
GuildRanks e{};
|
||||||
|
|
||||||
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
e.guild_id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
|
||||||
e.rank = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
e.rank_ = row[1] ? static_cast<uint8_t>(strtoul(row[1], nullptr, 10)) : 0;
|
||||||
e.title = row[2] ? row[2] : "";
|
e.title = row[2] ? row[2] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
@ -356,7 +356,7 @@ public:
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
v.push_back(std::to_string(e.guild_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("'" + Strings::Escape(e.title) + "'");
|
v.push_back("'" + Strings::Escape(e.title) + "'");
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
@ -381,7 +381,7 @@ public:
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
v.push_back(std::to_string(e.guild_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("'" + Strings::Escape(e.title) + "'");
|
v.push_back("'" + Strings::Escape(e.title) + "'");
|
||||||
|
|
||||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||||
|
|||||||
@ -227,7 +227,7 @@ public:
|
|||||||
int32_t no_block;
|
int32_t no_block;
|
||||||
int32_t field206;
|
int32_t field206;
|
||||||
int32_t spellgroup;
|
int32_t spellgroup;
|
||||||
int32_t rank;
|
int32_t rank_;
|
||||||
int32_t field209;
|
int32_t field209;
|
||||||
int32_t field210;
|
int32_t field210;
|
||||||
int32_t CastRestriction;
|
int32_t CastRestriction;
|
||||||
@ -474,7 +474,7 @@ public:
|
|||||||
"no_block",
|
"no_block",
|
||||||
"field206",
|
"field206",
|
||||||
"spellgroup",
|
"spellgroup",
|
||||||
"rank",
|
"`rank`",
|
||||||
"field209",
|
"field209",
|
||||||
"field210",
|
"field210",
|
||||||
"CastRestriction",
|
"CastRestriction",
|
||||||
@ -717,7 +717,7 @@ public:
|
|||||||
"no_block",
|
"no_block",
|
||||||
"field206",
|
"field206",
|
||||||
"spellgroup",
|
"spellgroup",
|
||||||
"rank",
|
"`rank`",
|
||||||
"field209",
|
"field209",
|
||||||
"field210",
|
"field210",
|
||||||
"CastRestriction",
|
"CastRestriction",
|
||||||
@ -994,7 +994,7 @@ public:
|
|||||||
e.no_block = 0;
|
e.no_block = 0;
|
||||||
e.field206 = -1;
|
e.field206 = -1;
|
||||||
e.spellgroup = 0;
|
e.spellgroup = 0;
|
||||||
e.rank = 0;
|
e.rank_ = 0;
|
||||||
e.field209 = 0;
|
e.field209 = 0;
|
||||||
e.field210 = 1;
|
e.field210 = 1;
|
||||||
e.CastRestriction = 0;
|
e.CastRestriction = 0;
|
||||||
@ -1267,7 +1267,7 @@ public:
|
|||||||
e.no_block = row[205] ? static_cast<int32_t>(atoi(row[205])) : 0;
|
e.no_block = row[205] ? static_cast<int32_t>(atoi(row[205])) : 0;
|
||||||
e.field206 = row[206] ? static_cast<int32_t>(atoi(row[206])) : -1;
|
e.field206 = row[206] ? static_cast<int32_t>(atoi(row[206])) : -1;
|
||||||
e.spellgroup = row[207] ? static_cast<int32_t>(atoi(row[207])) : 0;
|
e.spellgroup = row[207] ? static_cast<int32_t>(atoi(row[207])) : 0;
|
||||||
e.rank = row[208] ? static_cast<int32_t>(atoi(row[208])) : 0;
|
e.rank_ = row[208] ? static_cast<int32_t>(atoi(row[208])) : 0;
|
||||||
e.field209 = row[209] ? static_cast<int32_t>(atoi(row[209])) : 0;
|
e.field209 = row[209] ? static_cast<int32_t>(atoi(row[209])) : 0;
|
||||||
e.field210 = row[210] ? static_cast<int32_t>(atoi(row[210])) : 1;
|
e.field210 = row[210] ? static_cast<int32_t>(atoi(row[210])) : 1;
|
||||||
e.CastRestriction = row[211] ? static_cast<int32_t>(atoi(row[211])) : 0;
|
e.CastRestriction = row[211] ? static_cast<int32_t>(atoi(row[211])) : 0;
|
||||||
@ -1537,7 +1537,7 @@ public:
|
|||||||
v.push_back(columns[205] + " = " + std::to_string(e.no_block));
|
v.push_back(columns[205] + " = " + std::to_string(e.no_block));
|
||||||
v.push_back(columns[206] + " = " + std::to_string(e.field206));
|
v.push_back(columns[206] + " = " + std::to_string(e.field206));
|
||||||
v.push_back(columns[207] + " = " + std::to_string(e.spellgroup));
|
v.push_back(columns[207] + " = " + std::to_string(e.spellgroup));
|
||||||
v.push_back(columns[208] + " = " + std::to_string(e.rank));
|
v.push_back(columns[208] + " = " + std::to_string(e.rank_));
|
||||||
v.push_back(columns[209] + " = " + std::to_string(e.field209));
|
v.push_back(columns[209] + " = " + std::to_string(e.field209));
|
||||||
v.push_back(columns[210] + " = " + std::to_string(e.field210));
|
v.push_back(columns[210] + " = " + std::to_string(e.field210));
|
||||||
v.push_back(columns[211] + " = " + std::to_string(e.CastRestriction));
|
v.push_back(columns[211] + " = " + std::to_string(e.CastRestriction));
|
||||||
@ -1795,7 +1795,7 @@ public:
|
|||||||
v.push_back(std::to_string(e.no_block));
|
v.push_back(std::to_string(e.no_block));
|
||||||
v.push_back(std::to_string(e.field206));
|
v.push_back(std::to_string(e.field206));
|
||||||
v.push_back(std::to_string(e.spellgroup));
|
v.push_back(std::to_string(e.spellgroup));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
v.push_back(std::to_string(e.field209));
|
v.push_back(std::to_string(e.field209));
|
||||||
v.push_back(std::to_string(e.field210));
|
v.push_back(std::to_string(e.field210));
|
||||||
v.push_back(std::to_string(e.CastRestriction));
|
v.push_back(std::to_string(e.CastRestriction));
|
||||||
@ -2061,7 +2061,7 @@ public:
|
|||||||
v.push_back(std::to_string(e.no_block));
|
v.push_back(std::to_string(e.no_block));
|
||||||
v.push_back(std::to_string(e.field206));
|
v.push_back(std::to_string(e.field206));
|
||||||
v.push_back(std::to_string(e.spellgroup));
|
v.push_back(std::to_string(e.spellgroup));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
v.push_back(std::to_string(e.field209));
|
v.push_back(std::to_string(e.field209));
|
||||||
v.push_back(std::to_string(e.field210));
|
v.push_back(std::to_string(e.field210));
|
||||||
v.push_back(std::to_string(e.CastRestriction));
|
v.push_back(std::to_string(e.CastRestriction));
|
||||||
@ -2331,7 +2331,7 @@ public:
|
|||||||
e.no_block = row[205] ? static_cast<int32_t>(atoi(row[205])) : 0;
|
e.no_block = row[205] ? static_cast<int32_t>(atoi(row[205])) : 0;
|
||||||
e.field206 = row[206] ? static_cast<int32_t>(atoi(row[206])) : -1;
|
e.field206 = row[206] ? static_cast<int32_t>(atoi(row[206])) : -1;
|
||||||
e.spellgroup = row[207] ? static_cast<int32_t>(atoi(row[207])) : 0;
|
e.spellgroup = row[207] ? static_cast<int32_t>(atoi(row[207])) : 0;
|
||||||
e.rank = row[208] ? static_cast<int32_t>(atoi(row[208])) : 0;
|
e.rank_ = row[208] ? static_cast<int32_t>(atoi(row[208])) : 0;
|
||||||
e.field209 = row[209] ? static_cast<int32_t>(atoi(row[209])) : 0;
|
e.field209 = row[209] ? static_cast<int32_t>(atoi(row[209])) : 0;
|
||||||
e.field210 = row[210] ? static_cast<int32_t>(atoi(row[210])) : 1;
|
e.field210 = row[210] ? static_cast<int32_t>(atoi(row[210])) : 1;
|
||||||
e.CastRestriction = row[211] ? static_cast<int32_t>(atoi(row[211])) : 0;
|
e.CastRestriction = row[211] ? static_cast<int32_t>(atoi(row[211])) : 0;
|
||||||
@ -2592,7 +2592,7 @@ public:
|
|||||||
e.no_block = row[205] ? static_cast<int32_t>(atoi(row[205])) : 0;
|
e.no_block = row[205] ? static_cast<int32_t>(atoi(row[205])) : 0;
|
||||||
e.field206 = row[206] ? static_cast<int32_t>(atoi(row[206])) : -1;
|
e.field206 = row[206] ? static_cast<int32_t>(atoi(row[206])) : -1;
|
||||||
e.spellgroup = row[207] ? static_cast<int32_t>(atoi(row[207])) : 0;
|
e.spellgroup = row[207] ? static_cast<int32_t>(atoi(row[207])) : 0;
|
||||||
e.rank = row[208] ? static_cast<int32_t>(atoi(row[208])) : 0;
|
e.rank_ = row[208] ? static_cast<int32_t>(atoi(row[208])) : 0;
|
||||||
e.field209 = row[209] ? static_cast<int32_t>(atoi(row[209])) : 0;
|
e.field209 = row[209] ? static_cast<int32_t>(atoi(row[209])) : 0;
|
||||||
e.field210 = row[210] ? static_cast<int32_t>(atoi(row[210])) : 1;
|
e.field210 = row[210] ? static_cast<int32_t>(atoi(row[210])) : 1;
|
||||||
e.CastRestriction = row[211] ? static_cast<int32_t>(atoi(row[211])) : 0;
|
e.CastRestriction = row[211] ? static_cast<int32_t>(atoi(row[211])) : 0;
|
||||||
@ -2903,7 +2903,7 @@ public:
|
|||||||
v.push_back(std::to_string(e.no_block));
|
v.push_back(std::to_string(e.no_block));
|
||||||
v.push_back(std::to_string(e.field206));
|
v.push_back(std::to_string(e.field206));
|
||||||
v.push_back(std::to_string(e.spellgroup));
|
v.push_back(std::to_string(e.spellgroup));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
v.push_back(std::to_string(e.field209));
|
v.push_back(std::to_string(e.field209));
|
||||||
v.push_back(std::to_string(e.field210));
|
v.push_back(std::to_string(e.field210));
|
||||||
v.push_back(std::to_string(e.CastRestriction));
|
v.push_back(std::to_string(e.CastRestriction));
|
||||||
@ -3162,7 +3162,7 @@ public:
|
|||||||
v.push_back(std::to_string(e.no_block));
|
v.push_back(std::to_string(e.no_block));
|
||||||
v.push_back(std::to_string(e.field206));
|
v.push_back(std::to_string(e.field206));
|
||||||
v.push_back(std::to_string(e.spellgroup));
|
v.push_back(std::to_string(e.spellgroup));
|
||||||
v.push_back(std::to_string(e.rank));
|
v.push_back(std::to_string(e.rank_));
|
||||||
v.push_back(std::to_string(e.field209));
|
v.push_back(std::to_string(e.field209));
|
||||||
v.push_back(std::to_string(e.field210));
|
v.push_back(std::to_string(e.field210));
|
||||||
v.push_back(std::to_string(e.CastRestriction));
|
v.push_back(std::to_string(e.CastRestriction));
|
||||||
|
|||||||
@ -599,6 +599,7 @@ sub get_reserved_cpp_variable_names
|
|||||||
"class",
|
"class",
|
||||||
"int",
|
"int",
|
||||||
"key",
|
"key",
|
||||||
|
"rank",
|
||||||
"range"
|
"range"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -739,7 +739,7 @@ bool ZoneDatabase::LoadCharacterLeadershipAbilities(uint32 character_id, PlayerP
|
|||||||
);
|
);
|
||||||
|
|
||||||
for (const auto& e : l) {
|
for (const auto& e : l) {
|
||||||
pp->leader_abilities.ranks[e.slot] = e.rank;
|
pp->leader_abilities.ranks[e.slot] = e.rank_;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1098,9 +1098,9 @@ bool ZoneDatabase::SaveCharacterLeadershipAbilities(uint32 character_id, PlayerP
|
|||||||
|
|
||||||
for (int slot_id = 0; slot_id < MAX_LEADERSHIP_AA_ARRAY; slot_id++) {
|
for (int slot_id = 0; slot_id < MAX_LEADERSHIP_AA_ARRAY; slot_id++) {
|
||||||
if (pp->leader_abilities.ranks[slot_id] > 0) {
|
if (pp->leader_abilities.ranks[slot_id] > 0) {
|
||||||
e.id = character_id;
|
e.id = character_id;
|
||||||
e.slot = slot_id;
|
e.slot = slot_id;
|
||||||
e.rank = pp->leader_abilities.ranks[slot_id];
|
e.rank_ = pp->leader_abilities.ranks[slot_id];
|
||||||
|
|
||||||
v.emplace_back(e);
|
v.emplace_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user