mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 12:41:30 +00:00
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint * More functions converted * Commify * More functions * Fin * Sort declarations * Split functions between files * Bots * Update strings.h * Split * Revert find replaces * Repository template * Money * Misc function * Update CMakeLists.txt * Saylink * Update strings.cpp * Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database * API casings
This commit is contained in:
parent
44c85a0dd7
commit
dfd8f84cac
@ -25,7 +25,7 @@
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/crash.h"
|
||||
#include "../../common/rulesys.h"
|
||||
#include "../../common/string_util.h"
|
||||
#include "../../common/strings.h"
|
||||
#include "../../common/content/world_content_service.h"
|
||||
|
||||
EQEmuLogSys LogSys;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/crash.h"
|
||||
#include "../../common/rulesys.h"
|
||||
#include "../../common/string_util.h"
|
||||
#include "../../common/strings.h"
|
||||
#include "../../common/content/world_content_service.h"
|
||||
|
||||
EQEmuLogSys LogSys;
|
||||
@ -146,8 +146,8 @@ void ImportSpells(SharedDatabase *db) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string escaped = ::EscapeString(buffer);
|
||||
auto split = SplitString(escaped, '^');
|
||||
std::string escaped = ::Strings::Escape(buffer);
|
||||
auto split = Strings::Split(escaped, '^');
|
||||
int line_columns = (int)split.size();
|
||||
|
||||
std::string sql;
|
||||
@ -225,7 +225,7 @@ void ImportSkillCaps(SharedDatabase *db) {
|
||||
|
||||
char buffer[2048];
|
||||
while(fgets(buffer, 2048, f)) {
|
||||
auto split = SplitString(buffer, '^');
|
||||
auto split = Strings::Split(buffer, '^');
|
||||
|
||||
if(split.size() < 4) {
|
||||
continue;
|
||||
@ -260,7 +260,7 @@ void ImportBaseData(SharedDatabase *db) {
|
||||
|
||||
char buffer[2048];
|
||||
while(fgets(buffer, 2048, f)) {
|
||||
auto split = SplitString(buffer, '^');
|
||||
auto split = Strings::Split(buffer, '^');
|
||||
|
||||
if(split.size() < 10) {
|
||||
continue;
|
||||
@ -318,7 +318,7 @@ void ImportDBStrings(SharedDatabase *db) {
|
||||
}
|
||||
}
|
||||
|
||||
auto split = SplitString(buffer, '^');
|
||||
auto split = Strings::Split(buffer, '^');
|
||||
|
||||
if(split.size() < 2) {
|
||||
continue;
|
||||
@ -332,7 +332,7 @@ void ImportDBStrings(SharedDatabase *db) {
|
||||
type = atoi(split[1].c_str());
|
||||
|
||||
if(split.size() >= 3) {
|
||||
value = ::EscapeString(split[2]);
|
||||
value = ::Strings::Escape(split[2]);
|
||||
}
|
||||
|
||||
sql = StringFormat("INSERT INTO db_str(id, type, value) VALUES(%u, %u, '%s')",
|
||||
|
||||
@ -77,7 +77,7 @@ SET(common_sources
|
||||
shareddb.cpp
|
||||
skills.cpp
|
||||
spdat.cpp
|
||||
string_util.cpp
|
||||
strings.cpp
|
||||
struct_strategy.cpp
|
||||
textures.cpp
|
||||
timer.cpp
|
||||
@ -579,7 +579,7 @@ SET(common_headers
|
||||
shareddb.h
|
||||
skills.h
|
||||
spdat.h
|
||||
string_util.h
|
||||
strings.h
|
||||
struct_strategy.h
|
||||
tasks.h
|
||||
textures.h
|
||||
|
||||
@ -168,15 +168,15 @@ bool WorldContentService::DoesPassContentFiltering(const ContentFlags &f)
|
||||
}
|
||||
|
||||
// if we don't have any enabled flag in enabled flags, we fail
|
||||
for (const auto& flag: SplitString(f.content_flags)) {
|
||||
if (!contains(GetContentFlagsEnabled(), flag)) {
|
||||
for (const auto& flag: Strings::Split(f.content_flags)) {
|
||||
if (!Strings::Contains(GetContentFlagsEnabled(), flag)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// if we don't have any disabled flag in disabled flags, we fail
|
||||
for (const auto& flag: SplitString(f.content_flags_disabled)) {
|
||||
if (!contains(GetContentFlagsDisabled(), flag)) {
|
||||
for (const auto& flag: Strings::Split(f.content_flags_disabled)) {
|
||||
if (!Strings::Contains(GetContentFlagsDisabled(), flag)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
#include "database.h"
|
||||
#include "eq_packet_structs.h"
|
||||
#include "extprofile.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
#include "database_schema.h"
|
||||
#include "http/httplib.h"
|
||||
#include "http/uri.h"
|
||||
@ -107,7 +107,7 @@ uint32 Database::CheckLogin(const char* name, const char* password, const char *
|
||||
"SELECT id, status FROM account WHERE `name` = '{}' AND ls_id = '{}' AND password is NOT NULL "
|
||||
"AND length(password) > 0 AND (password = '{}' OR password = MD5('{}'))",
|
||||
temporary_username,
|
||||
EscapeString(loginserver),
|
||||
Strings::Escape(loginserver),
|
||||
temporary_password,
|
||||
temporary_password
|
||||
);
|
||||
@ -148,8 +148,8 @@ bool Database::CheckBannedIPs(std::string login_ip)
|
||||
bool Database::AddBannedIP(std::string banned_ip, std::string notes) {
|
||||
auto query = fmt::format(
|
||||
"INSERT into banned_ips SET ip_address = '{}', notes = '{}'",
|
||||
EscapeString(banned_ip),
|
||||
EscapeString(notes)
|
||||
Strings::Escape(banned_ip),
|
||||
Strings::Escape(notes)
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
@ -280,7 +280,7 @@ bool Database::DeleteAccount(const char* name, const char *loginserver) {
|
||||
}
|
||||
|
||||
bool Database::SetLocalPassword(uint32 accid, const char* password) {
|
||||
std::string query = StringFormat("UPDATE account SET password=MD5('%s') where id=%i;", EscapeString(password).c_str(), accid);
|
||||
std::string query = StringFormat("UPDATE account SET password=MD5('%s') where id=%i;", Strings::Escape(password).c_str(), accid);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
@ -619,8 +619,8 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
||||
")",
|
||||
character_id, // " id, "
|
||||
account_id, // " account_id, "
|
||||
EscapeString(pp->name).c_str(), // " `name`, "
|
||||
EscapeString(pp->last_name).c_str(), // " last_name, "
|
||||
Strings::Escape(pp->name).c_str(), // " `name`, "
|
||||
Strings::Escape(pp->last_name).c_str(), // " last_name, "
|
||||
pp->gender, // " gender, "
|
||||
pp->race, // " race, "
|
||||
pp->class_, // " class, "
|
||||
@ -644,8 +644,8 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
||||
pp->ability_number, // " ability_number, "
|
||||
pp->ability_time_minutes, // " ability_time_minutes, "
|
||||
pp->ability_time_hours, // " ability_time_hours, "
|
||||
EscapeString(pp->title).c_str(), // " title, "
|
||||
EscapeString(pp->suffix).c_str(), // " suffix, "
|
||||
Strings::Escape(pp->title).c_str(), // " title, "
|
||||
Strings::Escape(pp->suffix).c_str(), // " suffix, "
|
||||
pp->exp, // " exp, "
|
||||
pp->points, // " points, "
|
||||
pp->mana, // " mana, "
|
||||
@ -781,7 +781,7 @@ uint32 Database::GetCharacterID(const char *name) {
|
||||
Zero will also be returned if there is a database error.
|
||||
*/
|
||||
uint32 Database::GetAccountIDByChar(const char* charname, uint32* oCharID) {
|
||||
std::string query = StringFormat("SELECT `account_id`, `id` FROM `character_data` WHERE name='%s'", EscapeString(charname).c_str());
|
||||
std::string query = StringFormat("SELECT `account_id`, `id` FROM `character_data` WHERE name='%s'", Strings::Escape(charname).c_str());
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
@ -825,8 +825,8 @@ uint32 Database::GetAccountIDByName(std::string account_name, std::string logins
|
||||
|
||||
auto query = fmt::format(
|
||||
"SELECT `id`, `status`, `lsaccount_id` FROM `account` WHERE `name` = '{}' AND `ls_id` = '{}' LIMIT 1",
|
||||
EscapeString(account_name),
|
||||
EscapeString(loginserver)
|
||||
Strings::Escape(account_name),
|
||||
Strings::Escape(loginserver)
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
@ -982,8 +982,8 @@ bool Database::GetVariable(std::string varname, std::string &varvalue)
|
||||
|
||||
bool Database::SetVariable(const std::string varname, const std::string &varvalue)
|
||||
{
|
||||
std::string escaped_name = EscapeString(varname);
|
||||
std::string escaped_value = EscapeString(varvalue);
|
||||
std::string escaped_name = Strings::Escape(varname);
|
||||
std::string escaped_value = Strings::Escape(varvalue);
|
||||
std::string query = StringFormat("Update variables set value='%s' WHERE varname like '%s'", escaped_value.c_str(), escaped_name.c_str());
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
@ -1156,7 +1156,7 @@ uint8 Database::GetPEQZone(uint32 zone_id, uint32 version){
|
||||
|
||||
bool Database::CheckNameFilter(std::string name, bool surname)
|
||||
{
|
||||
name = str_tolower(name);
|
||||
name = Strings::ToLower(name);
|
||||
|
||||
// the minimum 4 is enforced by the client too
|
||||
if (name.empty() || name.size() < 4) {
|
||||
@ -1196,7 +1196,7 @@ bool Database::CheckNameFilter(std::string name, bool surname)
|
||||
}
|
||||
|
||||
for (auto row : results) {
|
||||
std::string current_row = str_tolower(row[0]);
|
||||
std::string current_row = Strings::ToLower(row[0]);
|
||||
if (name.find(current_row) != std::string::npos) {
|
||||
return false;
|
||||
}
|
||||
@ -1473,7 +1473,7 @@ uint32 Database::GetCharacterInfo(std::string character_name, uint32 *account_id
|
||||
{
|
||||
auto query = fmt::format(
|
||||
"SELECT `id`, `account_id`, `zone_id`, `zone_instance` FROM `character_data` WHERE `name` = '{}'",
|
||||
EscapeString(character_name)
|
||||
Strings::Escape(character_name)
|
||||
);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
@ -1546,7 +1546,7 @@ void Database::AddReport(std::string who, std::string against, std::string lines
|
||||
auto escape_str = new char[lines.size() * 2 + 1];
|
||||
DoEscapeString(escape_str, lines.c_str(), lines.size());
|
||||
|
||||
std::string query = StringFormat("INSERT INTO reports (name, reported, reported_text) VALUES('%s', '%s', '%s')", EscapeString(who).c_str(), EscapeString(against).c_str(), escape_str);
|
||||
std::string query = StringFormat("INSERT INTO reports (name, reported, reported_text) VALUES('%s', '%s', '%s')", Strings::Escape(who).c_str(), Strings::Escape(against).c_str(), escape_str);
|
||||
QueryDatabase(query);
|
||||
safe_delete_array(escape_str);
|
||||
}
|
||||
@ -1644,7 +1644,7 @@ std::string Database::GetGroupLeaderForLogin(std::string character_name) {
|
||||
}
|
||||
|
||||
void Database::SetGroupLeaderName(uint32 gid, const char* name) {
|
||||
std::string query = StringFormat("UPDATE group_leaders SET leadername = '%s' WHERE gid = %u", EscapeString(name).c_str(), gid);
|
||||
std::string query = StringFormat("UPDATE group_leaders SET leadername = '%s' WHERE gid = %u", Strings::Escape(name).c_str(), gid);
|
||||
auto result = QueryDatabase(query);
|
||||
|
||||
if(result.RowsAffected() != 0) {
|
||||
@ -1652,7 +1652,7 @@ void Database::SetGroupLeaderName(uint32 gid, const char* name) {
|
||||
}
|
||||
|
||||
query = StringFormat("REPLACE INTO group_leaders(gid, leadername, marknpc, leadershipaa, maintank, assist, puller, mentoree, mentor_percent) VALUES(%u, '%s', '', '', '', '', '', '', '0')",
|
||||
gid, EscapeString(name).c_str());
|
||||
gid, Strings::Escape(name).c_str());
|
||||
result = QueryDatabase(query);
|
||||
|
||||
if(!result.Success()) {
|
||||
@ -2358,7 +2358,7 @@ bool Database::CopyCharacter(
|
||||
results = QueryDatabase(
|
||||
fmt::format(
|
||||
"SELECT {} FROM {} WHERE {} = {}",
|
||||
implode(",", wrap(columns, "`")),
|
||||
Strings::Implode(",", Strings::Wrap(columns, "`")),
|
||||
table_name,
|
||||
character_id_column_name,
|
||||
source_character_id
|
||||
@ -2394,7 +2394,7 @@ bool Database::CopyCharacter(
|
||||
std::vector<std::string> insert_rows;
|
||||
|
||||
for (auto &r: new_rows) {
|
||||
std::string insert_row = "(" + implode(",", wrap(r, "'")) + ")";
|
||||
std::string insert_row = "(" + Strings::Implode(",", Strings::Wrap(r, "'")) + ")";
|
||||
insert_rows.emplace_back(insert_row);
|
||||
}
|
||||
|
||||
@ -2412,8 +2412,8 @@ bool Database::CopyCharacter(
|
||||
fmt::format(
|
||||
"INSERT INTO {} ({}) VALUES {}",
|
||||
table_name,
|
||||
implode(",", wrap(columns, "`")),
|
||||
implode(",", insert_rows)
|
||||
Strings::Implode(",", Strings::Wrap(columns, "`")),
|
||||
Strings::Implode(",", insert_rows)
|
||||
)
|
||||
);
|
||||
|
||||
@ -2465,8 +2465,8 @@ void Database::SourceDatabaseTableFromUrl(std::string table_name, std::string ur
|
||||
|
||||
if (auto res = cli.Get(request_uri.get_path().c_str())) {
|
||||
if (res->status == 200) {
|
||||
for (auto &s: SplitString(res->body, ';')) {
|
||||
if (!trim(s).empty()) {
|
||||
for (auto &s: Strings::Split(res->body, ';')) {
|
||||
if (!Strings::Trim(s).empty()) {
|
||||
auto results = QueryDatabase(s);
|
||||
if (!results.ErrorMessage().empty()) {
|
||||
LogError("Error sourcing SQL [{}]", results.ErrorMessage());
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include <iterator>
|
||||
#include "database_dump_service.h"
|
||||
#include "../eqemu_logsys.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../eqemu_config.h"
|
||||
#include "../database_schema.h"
|
||||
#include "../file_util.h"
|
||||
@ -119,7 +119,7 @@ std::string DatabaseDumpService::GetMySQLVersion()
|
||||
{
|
||||
std::string version_output = execute("mysql --version");
|
||||
|
||||
return trim(version_output);
|
||||
return Strings::Trim(version_output);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -160,7 +160,7 @@ std::string DatabaseDumpService::GetPlayerTablesList()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -174,7 +174,7 @@ std::string DatabaseDumpService::GetBotTablesList()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -188,7 +188,7 @@ std::string DatabaseDumpService::GetLoginTableList()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -202,7 +202,7 @@ std::string DatabaseDumpService::GetQueryServTables()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -222,7 +222,7 @@ std::string DatabaseDumpService::GetSystemTablesList()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
/**
|
||||
* @return
|
||||
@ -236,7 +236,7 @@ std::string DatabaseDumpService::GetStateTablesList()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -251,7 +251,7 @@ std::string DatabaseDumpService::GetContentTablesList()
|
||||
tables_list += table + " ";
|
||||
}
|
||||
|
||||
return trim(tables_list);
|
||||
return Strings::Trim(tables_list);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -331,7 +331,7 @@ void DatabaseDumpService::Dump()
|
||||
tables_to_dump += GetPlayerTablesList() + " ";
|
||||
dump_descriptor += "-player";
|
||||
}
|
||||
|
||||
|
||||
if (IsDumpBotTables()) {
|
||||
tables_to_dump += GetBotTablesList() + " ";
|
||||
dump_descriptor += "-bots";
|
||||
@ -388,7 +388,7 @@ void DatabaseDumpService::Dump()
|
||||
}
|
||||
|
||||
if (IsDumpDropTableSyntaxOnly()) {
|
||||
std::vector<std::string> tables = SplitString(tables_to_dump, ' ');
|
||||
std::vector<std::string> tables = Strings::Split(tables_to_dump, ' ');
|
||||
|
||||
for (auto &table : tables) {
|
||||
std::cout << "DROP TABLE IF EXISTS `" << table << "`;" << std::endl;
|
||||
|
||||
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/timer.h"
|
||||
|
||||
#include "database.h"
|
||||
@ -961,7 +961,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
std::string rquery = StringFormat("REPLACE INTO `character_inspect_messages` (id, inspect_message)"
|
||||
"VALUES (%u, '%s')",
|
||||
character_id,
|
||||
EscapeString(inspectmessage).c_str()
|
||||
Strings::Escape(inspectmessage).c_str()
|
||||
);
|
||||
auto results = QueryDatabase(rquery);
|
||||
}
|
||||
@ -1097,95 +1097,95 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
"e_expended_aa_spent"
|
||||
")"
|
||||
"VALUES ("
|
||||
"%u," // id
|
||||
"%u," // account_id
|
||||
"'%s'," // `name`
|
||||
"'%s'," // last_name
|
||||
"%u," // gender
|
||||
"%u," // race
|
||||
"%u," // class
|
||||
"%u," // `level`
|
||||
"%u," // deity
|
||||
"%u," // birthday
|
||||
"%u," // last_login
|
||||
"%u," // time_played
|
||||
"%u," // pvp_status
|
||||
"%u," // level2
|
||||
"%u," // anon
|
||||
"%u," // gm
|
||||
"%u," // intoxication
|
||||
"%u," // hair_color
|
||||
"%u," // beard_color
|
||||
"%u," // eye_color_1
|
||||
"%u," // eye_color_2
|
||||
"%u," // hair_style
|
||||
"%u," // beard
|
||||
"%u," // ability_time_seconds
|
||||
"%u," // ability_number
|
||||
"%u," // ability_time_minutes
|
||||
"%u," // ability_time_hours
|
||||
"'%s'," // title
|
||||
"'%s'," // suffix
|
||||
"%u," // exp
|
||||
"%u," // points
|
||||
"%u," // mana
|
||||
"%u," // cur_hp
|
||||
"%u," // str
|
||||
"%u," // sta
|
||||
"%u," // cha
|
||||
"%u," // dex
|
||||
"%u," // `int`
|
||||
"%u," // agi
|
||||
"%u," // wis
|
||||
"%u," // face
|
||||
"%f," // y
|
||||
"%f," // x
|
||||
"%f," // z
|
||||
"%f," // heading
|
||||
"%u," // pvp2
|
||||
"%u," // pvp_type
|
||||
"%u," // autosplit_enabled
|
||||
"%u," // zone_change_count
|
||||
"%u," // drakkin_heritage
|
||||
"%u," // drakkin_tattoo
|
||||
"%u," // drakkin_details
|
||||
"%i," // toxicity
|
||||
"%u," // hunger_level
|
||||
"%u," // thirst_level
|
||||
"%u," // ability_up
|
||||
"%u," // zone_id
|
||||
"%u," // zone_instance
|
||||
"%u," // leadership_exp_on
|
||||
"%u," // ldon_points_guk
|
||||
"%u," // ldon_points_mir
|
||||
"%u," // ldon_points_mmc
|
||||
"%u," // ldon_points_ruj
|
||||
"%u," // ldon_points_tak
|
||||
"%u," // ldon_points_available
|
||||
"%u," // tribute_time_remaining
|
||||
"%u," // show_helm
|
||||
"%u," // career_tribute_points
|
||||
"%u," // tribute_points
|
||||
"%u," // tribute_active
|
||||
"%u," // endurance
|
||||
"%u," // group_leadership_exp
|
||||
"%u," // raid_leadership_exp
|
||||
"%u," // group_leadership_points
|
||||
"%u," // raid_leadership_points
|
||||
"%u," // air_remaining
|
||||
"%u," // pvp_kills
|
||||
"%u," // pvp_deaths
|
||||
"%u," // pvp_current_points
|
||||
"%u," // pvp_career_points
|
||||
"%u," // pvp_best_kill_streak
|
||||
"%u," // pvp_worst_death_streak
|
||||
"%u," // pvp_current_kill_streak
|
||||
"%u," // aa_points_spent
|
||||
"%u," // aa_exp
|
||||
"%u," // aa_points
|
||||
"%u," // group_auto_consent
|
||||
"%u," // raid_auto_consent
|
||||
"%u," // guild_auto_consent
|
||||
"%u," // id
|
||||
"%u," // account_id
|
||||
"'%s'," // `name`
|
||||
"'%s'," // last_name
|
||||
"%u," // gender
|
||||
"%u," // race
|
||||
"%u," // class
|
||||
"%u," // `level`
|
||||
"%u," // deity
|
||||
"%u," // birthday
|
||||
"%u," // last_login
|
||||
"%u," // time_played
|
||||
"%u," // pvp_status
|
||||
"%u," // level2
|
||||
"%u," // anon
|
||||
"%u," // gm
|
||||
"%u," // intoxication
|
||||
"%u," // hair_color
|
||||
"%u," // beard_color
|
||||
"%u," // eye_color_1
|
||||
"%u," // eye_color_2
|
||||
"%u," // hair_style
|
||||
"%u," // beard
|
||||
"%u," // ability_time_seconds
|
||||
"%u," // ability_number
|
||||
"%u," // ability_time_minutes
|
||||
"%u," // ability_time_hours
|
||||
"'%s'," // title
|
||||
"'%s'," // suffix
|
||||
"%u," // exp
|
||||
"%u," // points
|
||||
"%u," // mana
|
||||
"%u," // cur_hp
|
||||
"%u," // str
|
||||
"%u," // sta
|
||||
"%u," // cha
|
||||
"%u," // dex
|
||||
"%u," // `int`
|
||||
"%u," // agi
|
||||
"%u," // wis
|
||||
"%u," // face
|
||||
"%f," // y
|
||||
"%f," // x
|
||||
"%f," // z
|
||||
"%f," // heading
|
||||
"%u," // pvp2
|
||||
"%u," // pvp_type
|
||||
"%u," // autosplit_enabled
|
||||
"%u," // zone_change_count
|
||||
"%u," // drakkin_heritage
|
||||
"%u," // drakkin_tattoo
|
||||
"%u," // drakkin_details
|
||||
"%i," // toxicity
|
||||
"%u," // hunger_level
|
||||
"%u," // thirst_level
|
||||
"%u," // ability_up
|
||||
"%u," // zone_id
|
||||
"%u," // zone_instance
|
||||
"%u," // leadership_exp_on
|
||||
"%u," // ldon_points_guk
|
||||
"%u," // ldon_points_mir
|
||||
"%u," // ldon_points_mmc
|
||||
"%u," // ldon_points_ruj
|
||||
"%u," // ldon_points_tak
|
||||
"%u," // ldon_points_available
|
||||
"%u," // tribute_time_remaining
|
||||
"%u," // show_helm
|
||||
"%u," // career_tribute_points
|
||||
"%u," // tribute_points
|
||||
"%u," // tribute_active
|
||||
"%u," // endurance
|
||||
"%u," // group_leadership_exp
|
||||
"%u," // raid_leadership_exp
|
||||
"%u," // group_leadership_points
|
||||
"%u," // raid_leadership_points
|
||||
"%u," // air_remaining
|
||||
"%u," // pvp_kills
|
||||
"%u," // pvp_deaths
|
||||
"%u," // pvp_current_points
|
||||
"%u," // pvp_career_points
|
||||
"%u," // pvp_best_kill_streak
|
||||
"%u," // pvp_worst_death_streak
|
||||
"%u," // pvp_current_kill_streak
|
||||
"%u," // aa_points_spent
|
||||
"%u," // aa_exp
|
||||
"%u," // aa_points
|
||||
"%u," // group_auto_consent
|
||||
"%u," // raid_auto_consent
|
||||
"%u," // guild_auto_consent
|
||||
"%u," // RestTimer
|
||||
"%u," // First Logon - References online status for EVENT_CONNECT/EVENT_DISCONNECt
|
||||
"%u," // Looking for Group
|
||||
@ -1198,8 +1198,8 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
")",
|
||||
character_id,
|
||||
account_id,
|
||||
EscapeString(pp->name).c_str(),
|
||||
EscapeString(pp->last_name).c_str(),
|
||||
Strings::Escape(pp->name).c_str(),
|
||||
Strings::Escape(pp->last_name).c_str(),
|
||||
pp->gender,
|
||||
pp->race,
|
||||
pp->class_,
|
||||
@ -1223,8 +1223,8 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
pp->ability_number,
|
||||
pp->ability_time_minutes,
|
||||
pp->ability_time_hours,
|
||||
EscapeString(pp->title).c_str(),
|
||||
EscapeString(pp->suffix).c_str(),
|
||||
Strings::Escape(pp->title).c_str(),
|
||||
Strings::Escape(pp->suffix).c_str(),
|
||||
pp->exp,
|
||||
pp->points,
|
||||
pp->mana,
|
||||
|
||||
@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/repositories/dynamic_zone_members_repository.h"
|
||||
#include "../common/repositories/dynamic_zones_repository.h"
|
||||
@ -485,7 +485,7 @@ void Database::BuryCorpsesInInstance(uint16 instance_id) {
|
||||
void Database::DeleteInstance(uint16 instance_id)
|
||||
{
|
||||
std::string query;
|
||||
|
||||
|
||||
query = StringFormat("DELETE FROM instance_list_player WHERE id=%u", instance_id);
|
||||
QueryDatabase(query);
|
||||
|
||||
@ -580,7 +580,7 @@ void Database::PurgeExpiredInstances()
|
||||
instance_ids.emplace_back(row[0]);
|
||||
}
|
||||
|
||||
std::string imploded_instance_ids = implode(",", instance_ids);
|
||||
std::string imploded_instance_ids = Strings::Implode(",", instance_ids);
|
||||
|
||||
QueryDatabase(fmt::format("DELETE FROM instance_list WHERE id IN ({})", imploded_instance_ids));
|
||||
QueryDatabase(fmt::format("DELETE FROM instance_list_player WHERE id IN ({})", imploded_instance_ids));
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "discord.h"
|
||||
#include "../http/httplib.h"
|
||||
#include "../json/json.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../eqemu_logsys.h"
|
||||
|
||||
constexpr int MAX_RETRIES = 10;
|
||||
@ -21,11 +21,11 @@ void Discord::SendWebhookMessage(const std::string &message, const std::string &
|
||||
}
|
||||
|
||||
// split
|
||||
auto s = SplitString(webhook_url, '/');
|
||||
auto s = Strings::Split(webhook_url, '/');
|
||||
|
||||
// url
|
||||
std::string base_url = fmt::format("{}//{}", s[0], s[2]);
|
||||
std::string endpoint = replace_string(webhook_url, base_url, "");
|
||||
std::string endpoint = Strings::Replace(webhook_url, base_url, "");
|
||||
|
||||
// client
|
||||
httplib::Client cli(base_url.c_str());
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "discord_manager.h"
|
||||
#include "../common/discord/discord.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
|
||||
void DiscordManager::QueueWebhookMessage(uint32 webhook_id, const std::string &message)
|
||||
{
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
#include "op_codes.h"
|
||||
#include "crc16.h"
|
||||
#include "platform.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
#include <string>
|
||||
#include <iomanip>
|
||||
@ -406,7 +406,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||
LogNetcode(_L "Pre-OOA Invalid Sequenced queue: BS [{}] + SQ [{}] != NOS [{}]" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||
}
|
||||
|
||||
|
||||
//if the packet they got out of order is between our last acked packet and the last sent packet, then its valid.
|
||||
if (CompareSequence(SequencedBase,seq) != SeqPast && CompareSequence(NextOutSeq,seq) == SeqPast) {
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck for sequence %d, starting retransmit at the start of our unacked buffer (seq %d, was %d)." __L,
|
||||
@ -453,7 +453,7 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
||||
(unsigned long)ntohl(ClientStats->packets_received), (unsigned long)ntohl(ClientStats->packets_sent), (unsigned long)ntohl(ClientStats->last_local_delta),
|
||||
(unsigned long)ntohl(ClientStats->low_delta), (unsigned long)ntohl(ClientStats->average_delta),
|
||||
(unsigned long)ntohl(ClientStats->high_delta), (unsigned long)ntohl(ClientStats->last_remote_delta));
|
||||
|
||||
|
||||
AdjustRates(ntohl(ClientStats->average_delta));
|
||||
|
||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
||||
@ -951,7 +951,7 @@ EQRawApplicationPacket *p=nullptr;
|
||||
EmuOpcode emu_op = (*OpMgr)->EQToEmu(p->opcode);
|
||||
if (emu_op == OP_Unknown) {
|
||||
// Log(Logs::General, Logs::Client_Server_Packet_Unhandled, "Unknown :: [%s - 0x%04x] [Size: %u] %s", OpcodeManager::EmuToName(p->GetOpcode()), p->opcode, p->Size(), DumpPacketToString(p).c_str());
|
||||
}
|
||||
}
|
||||
p->SetOpcode(emu_op);
|
||||
}
|
||||
}
|
||||
@ -1359,11 +1359,11 @@ void EQStream::AdjustRates(uint32 average_delta)
|
||||
DecayRate=DECAYBASE/average_delta;
|
||||
if (BytesWritten > RateThreshold)
|
||||
BytesWritten = RateThreshold + DecayRate;
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
||||
RateThreshold, DecayRate, average_delta);
|
||||
MRate.unlock();
|
||||
} else {
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Not adjusting data rate because avg delta over max (%d > %d)" __L,
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Not adjusting data rate because avg delta over max (%d > %d)" __L,
|
||||
average_delta, AVERAGE_DELTA_MAX);
|
||||
AverageDelta = AVERAGE_DELTA_MAX;
|
||||
}
|
||||
@ -1374,7 +1374,7 @@ void EQStream::AdjustRates(uint32 average_delta)
|
||||
BytesWritten = 0;
|
||||
RateThreshold=RATEBASE/average_delta;
|
||||
DecayRate=DECAYBASE/average_delta;
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
||||
Log(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
||||
RateThreshold, DecayRate, average_delta);
|
||||
MRate.unlock();
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include "eqemu_logsys.h"
|
||||
#include "rulesys.h"
|
||||
#include "platform.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
#include "misc.h"
|
||||
#include "discord/discord.h"
|
||||
#include "repositories/discord_webhooks_repository.h"
|
||||
@ -650,7 +650,7 @@ EQEmuLogSys *EQEmuLogSys::LoadLogDatabaseSettings()
|
||||
|
||||
auto new_category = LogsysCategoriesRepository::NewEntity();
|
||||
new_category.log_category_id = i;
|
||||
new_category.log_category_description = EscapeString(Logs::LogCategoryName[i]);
|
||||
new_category.log_category_description = Strings::Escape(Logs::LogCategoryName[i]);
|
||||
new_category.log_to_console = log_settings[i].log_to_console;
|
||||
new_category.log_to_gmsay = log_settings[i].log_to_gmsay;
|
||||
new_category.log_to_file = log_settings[i].log_to_file;
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "expedition_lockout_timer.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/util/uuid.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#include "database.h"
|
||||
|
||||
//#include "misc_functions.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
@ -1281,10 +1281,10 @@ bool BaseGuildManager::IsCharacterInGuild(uint32 character_id, uint32 guild_id)
|
||||
if (current_guild_id == GUILD_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (guild_id && current_guild_id != guild_id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
//#include "races.h"
|
||||
//#include "rulesys.h"
|
||||
//#include "shareddb.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
#include "../common/light_source.h"
|
||||
|
||||
@ -245,7 +245,7 @@ int16 EQ::InventoryProfile::PutItem(int16 slot_id, const ItemInstance& inst)
|
||||
if (temp_slot >= m_lookup->InventoryTypeSize.Bank)
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
|
||||
// Clean up item already in slot (if exists)
|
||||
DeleteItem(slot_id);
|
||||
|
||||
@ -617,7 +617,7 @@ int EQ::InventoryProfile::CountAugmentEquippedByID(uint32 item_id)
|
||||
quantity += item->CountAugmentByID(item_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return quantity;
|
||||
}
|
||||
|
||||
@ -648,7 +648,7 @@ int EQ::InventoryProfile::CountItemEquippedByID(uint32 item_id)
|
||||
quantity += item->IsStackable() ? item->GetCharges() : 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return quantity;
|
||||
}
|
||||
|
||||
@ -993,7 +993,7 @@ int16 EQ::InventoryProfile::CalcSlotId(int16 slot_id) {
|
||||
//else if (slot_id >= EmuConstants::BANK_BEGIN && slot_id <= EmuConstants::BANK_END)
|
||||
// parent_slot_id = EmuConstants::BANK_BEGIN + (slot_id - EmuConstants::BANK_BEGIN) / EmuConstants::ITEM_CONTAINER_SIZE;
|
||||
//else if (slot_id >= 3100 && slot_id <= 3179) should be {3031..3110}..where did this range come from!!? (verified db save range)
|
||||
|
||||
|
||||
if (slot_id >= invbag::GENERAL_BAGS_BEGIN && slot_id <= invbag::GENERAL_BAGS_END) {
|
||||
parent_slot_id = invslot::GENERAL_BEGIN + (slot_id - invbag::GENERAL_BAGS_BEGIN) / invbag::SLOT_COUNT;
|
||||
}
|
||||
@ -1231,7 +1231,7 @@ uint8 EQ::InventoryProfile::FindBrightestLightType()
|
||||
for (auto iter = m_worn.begin(); iter != m_worn.end(); ++iter) {
|
||||
if ((iter->first < invslot::EQUIPMENT_BEGIN || iter->first > invslot::EQUIPMENT_END))
|
||||
continue;
|
||||
|
||||
|
||||
if (iter->first == invslot::slotAmmo)
|
||||
continue;
|
||||
|
||||
@ -1369,7 +1369,7 @@ EQ::ItemInstance* EQ::InventoryProfile::_GetItem(const std::map<int16, ItemInsta
|
||||
if (slot_id - EQ::invslot::BANK_BEGIN >= m_lookup->InventoryTypeSize.Bank)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
auto it = bucket.find(slot_id);
|
||||
if (it != bucket.end()) {
|
||||
return it->second;
|
||||
@ -1441,7 +1441,7 @@ int16 EQ::InventoryProfile::_PutItem(int16 slot_id, ItemInstance* inst)
|
||||
result = slot_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (result == INVALID_INDEX) {
|
||||
LogError("InventoryProfile::_PutItem: Invalid slot_id specified ({}) with parent slot id ({})", slot_id, parentSlot);
|
||||
InventoryProfile::MarkDirty(inst); // Slot not found, clean up
|
||||
@ -1478,7 +1478,7 @@ int16 EQ::InventoryProfile::_HasItem(std::map<int16, ItemInstance*>& bucket, uin
|
||||
if (inst->GetAugmentItemID(index) == item_id && quantity <= 1)
|
||||
return invslot::SLOT_AUGMENT_GENERIC_RETURN;
|
||||
}
|
||||
|
||||
|
||||
if (!inst->IsClassBag()) { continue; }
|
||||
|
||||
for (auto bag_iter = inst->_cbegin(); bag_iter != inst->_cend(); ++bag_iter) {
|
||||
@ -1509,7 +1509,7 @@ int16 EQ::InventoryProfile::_HasItem(ItemInstQueue& iqueue, uint32 item_id, uint
|
||||
// is sufficient. However, in cases where referential criteria is considered, this can lead
|
||||
// to unintended results. Funtionality should be observed when referencing the return value
|
||||
// of this query
|
||||
|
||||
|
||||
uint32 quantity_found = 0;
|
||||
|
||||
for (auto iter = iqueue.cbegin(); iter != iqueue.cend(); ++iter) {
|
||||
@ -1715,6 +1715,6 @@ int16 EQ::InventoryProfile::_HasItemByLoreGroup(ItemInstQueue& iqueue, uint32 lo
|
||||
// We only check the visible cursor due to lack of queue processing ability (client allows duplicate in limbo)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "inventory_slot.h"
|
||||
#include "textures.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
|
||||
int8 EQ::inventory::ConvertEquipmentIndexToTextureIndex(int16 slot_index)
|
||||
@ -86,7 +86,7 @@ bool EQ::InventorySlot::IsValidSlot() const
|
||||
{
|
||||
if (_typeless)
|
||||
return false;
|
||||
|
||||
|
||||
int16 slot_count = invtype::GetInvTypeSize(_type_index);
|
||||
if (!slot_count || _slot_index < invslot::SLOT_BEGIN || _slot_index >= slot_count)
|
||||
return false;
|
||||
@ -136,7 +136,7 @@ bool EQ::InventorySlot::IsWeaponIndex(int16 slot_index)
|
||||
{
|
||||
if (slot_index == invslot::slotPrimary || slot_index == invslot::slotSecondary || slot_index == invslot::slotRange)
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -364,7 +364,7 @@ bool EQ::InventorySlot::operator<(const InventorySlot& rhs) const
|
||||
{
|
||||
if (Typeless() || rhs.Typeless())
|
||||
return inventory_slot_typeless_lessthan(*this, rhs);
|
||||
|
||||
|
||||
if (TypeIndex() < rhs.TypeIndex())
|
||||
return true;
|
||||
|
||||
@ -384,6 +384,6 @@ bool EQ::operator==(const InventorySlot& lhs, const InventorySlot& rhs)
|
||||
{
|
||||
if (lhs.Typeless() || rhs.Typeless())
|
||||
return ((lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||
|
||||
|
||||
return ((lhs.TypeIndex() == rhs.TypeIndex()) && (lhs.SlotIndex() == rhs.SlotIndex()) && (lhs.ContainerIndex() == rhs.ContainerIndex()) && (lhs.SocketIndex() == rhs.SocketIndex()));
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
//#include "races.h"
|
||||
#include "rulesys.h"
|
||||
#include "shareddb.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
//#include "../common/light_source.h"
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*/
|
||||
#include <string.h> /* for memcpy() */
|
||||
#include "../common/md5.h"
|
||||
#include "../common/string_util.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/seperator.h"
|
||||
|
||||
MD5::MD5() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "console_server.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include <fmt/format.h>
|
||||
|
||||
EQ::Net::ConsoleServer::ConsoleServer(const std::string &addr, int port)
|
||||
@ -52,11 +52,11 @@ void EQ::Net::ConsoleServer::ConnectionDisconnected(ConsoleServerConnection *c)
|
||||
|
||||
void EQ::Net::ConsoleServer::ProcessCommand(ConsoleServerConnection *c, const std::string &cmd)
|
||||
{
|
||||
auto split = SplitString(cmd, ' ');
|
||||
|
||||
auto split = Strings::Split(cmd, ' ');
|
||||
|
||||
if (split.size() > 0) {
|
||||
auto command = split[0];
|
||||
ToLowerString(command);
|
||||
command = Strings::ToLower(command);
|
||||
|
||||
if (command == "help" || command == "?") {
|
||||
c->SendLine("Commands:");
|
||||
@ -70,9 +70,9 @@ void EQ::Net::ConsoleServer::ProcessCommand(ConsoleServerConnection *c, const st
|
||||
c->SendPrompt();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
split.erase(split.begin(), split.begin() + 1);
|
||||
|
||||
|
||||
auto cmd_def = m_commands.find(command);
|
||||
if (cmd_def != m_commands.end()) {
|
||||
if (c->Admin() >= cmd_def->second.status_required) {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../inventory_profile.h"
|
||||
#include "rof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
@ -52,13 +52,13 @@ namespace RoF
|
||||
static inline structs::InventorySlot_Struct ServerToRoFCorpseSlot(uint32 server_corpse_slot);
|
||||
static inline uint32 ServerToRoFCorpseMainSlot(uint32 server_corpse_slot);
|
||||
static inline structs::TypelessInventorySlot_Struct ServerToRoFTypelessSlot(uint32 server_slot, int16 server_type);
|
||||
|
||||
|
||||
// client to server inventory location converters
|
||||
static inline uint32 RoFToServerSlot(structs::InventorySlot_Struct rof_slot);
|
||||
static inline uint32 RoFToServerCorpseSlot(structs::InventorySlot_Struct rof_corpse_slot);
|
||||
static inline uint32 RoFToServerCorpseMainSlot(uint32 rof_corpse_slot);
|
||||
static inline uint32 RoFToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof_slot, int16 rof_type);
|
||||
|
||||
|
||||
// server to client say link converter
|
||||
static inline void ServerToRoFSayLink(std::string& rofSayLink, const std::string& serverSayLink);
|
||||
|
||||
@ -1558,7 +1558,7 @@ namespace RoF
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -5188,7 +5188,7 @@ namespace RoF
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
{
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
|
||||
RoF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
//sprintf(hdr.unknown000, "06e0002Y1W00");
|
||||
@ -5207,7 +5207,7 @@ namespace RoF
|
||||
slot_id = ServerToRoFSlot(slot_id_in);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type);
|
||||
hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot);
|
||||
hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex);
|
||||
@ -5295,7 +5295,7 @@ namespace RoF
|
||||
ob.write("\0", 1);
|
||||
|
||||
ob.write("\0", 1);
|
||||
|
||||
|
||||
RoF::structs::ItemBodyStruct ibs;
|
||||
memset(&ibs, 0, sizeof(RoF::structs::ItemBodyStruct));
|
||||
|
||||
@ -5608,7 +5608,7 @@ namespace RoF
|
||||
iqbs.unknown28 = 0;
|
||||
iqbs.unknown30 = 0;
|
||||
iqbs.unknown39 = 1;
|
||||
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(RoF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
@ -5776,7 +5776,7 @@ namespace RoF
|
||||
static inline uint32 ServerToRoFCorpseMainSlot(uint32 server_corpse_slot)
|
||||
{
|
||||
uint32 RoFSlot = invslot::SLOT_INVALID;
|
||||
|
||||
|
||||
if (server_corpse_slot <= EQ::invslot::CORPSE_END && server_corpse_slot >= EQ::invslot::CORPSE_BEGIN) {
|
||||
RoFSlot = server_corpse_slot;
|
||||
}
|
||||
@ -6123,7 +6123,7 @@ namespace RoF
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
auto segments = Strings::Split(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
@ -6162,7 +6162,7 @@ namespace RoF
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(rofSayLink, '\x12');
|
||||
auto segments = Strings::Split(rofSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../inventory_profile.h"
|
||||
#include "rof2_structs.h"
|
||||
#include "../rulesys.h"
|
||||
@ -53,13 +53,13 @@ namespace RoF2
|
||||
static inline structs::InventorySlot_Struct ServerToRoF2CorpseSlot(uint32 server_corpse_slot);
|
||||
static inline uint32 ServerToRoF2CorpseMainSlot(uint32 server_corpse_slot);
|
||||
static inline structs::TypelessInventorySlot_Struct ServerToRoF2TypelessSlot(uint32 server_slot, int16 server_type);
|
||||
|
||||
|
||||
// client to server inventory location converters
|
||||
static inline uint32 RoF2ToServerSlot(structs::InventorySlot_Struct rof2_slot);
|
||||
static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2_corpse_slot);
|
||||
static inline uint32 RoF2ToServerCorpseMainSlot(uint32 rof2_corpse_slot);
|
||||
static inline uint32 RoF2ToServerTypelessSlot(structs::TypelessInventorySlot_Struct rof2_slot, int16 rof2_type);
|
||||
|
||||
|
||||
// server to client say link converter
|
||||
static inline void ServerToRoF2SayLink(std::string &rof2_saylink, const std::string &server_saylink);
|
||||
|
||||
@ -2894,12 +2894,12 @@ namespace RoF2
|
||||
EQApplicationPacket *inapp = *p;
|
||||
*p = nullptr;
|
||||
AARankInfo_Struct *emu = (AARankInfo_Struct*)inapp->pBuffer;
|
||||
|
||||
|
||||
// the structs::SendAA_Struct includes enough space for 1 prereq which is the min even if it has no prereqs
|
||||
auto prereq_size = emu->total_prereqs > 1 ? (emu->total_prereqs - 1) * 8 : 0;
|
||||
auto outapp = new EQApplicationPacket(OP_SendAATable, sizeof(structs::SendAA_Struct) + emu->total_effects * sizeof(structs::AA_Ability) + prereq_size);
|
||||
inapp->SetReadPosition(sizeof(AARankInfo_Struct)+emu->total_effects * sizeof(AARankEffect_Struct));
|
||||
|
||||
|
||||
|
||||
std::vector<int32> skill;
|
||||
std::vector<int32> points;
|
||||
@ -2962,7 +2962,7 @@ namespace RoF2
|
||||
outapp->WriteUInt32(inapp->ReadUInt32()); // base2
|
||||
outapp->WriteUInt32(inapp->ReadUInt32()); // slot
|
||||
}
|
||||
|
||||
|
||||
dest->FastQueuePacket(&outapp);
|
||||
delete inapp;
|
||||
}
|
||||
@ -5062,11 +5062,11 @@ namespace RoF2
|
||||
SETUP_DIRECT_DECODE(MoveItem_Struct, structs::MoveItem_Struct);
|
||||
|
||||
Log(Logs::Moderate, Logs::Netcode, "RoF2::DECODE(OP_MoveItem)");
|
||||
|
||||
|
||||
emu->from_slot = RoF2ToServerSlot(eq->from_slot);
|
||||
emu->to_slot = RoF2ToServerSlot(eq->to_slot);
|
||||
IN(number_in_stack);
|
||||
|
||||
|
||||
//LogNetcode("[RoF2] MoveItem Slot from [{}] to [{}], Number [{}]", emu->from_slot, emu->to_slot, emu->number_in_stack);
|
||||
|
||||
FINISH_DIRECT_DECODE();
|
||||
@ -5443,7 +5443,7 @@ namespace RoF2
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth, ItemPacketType packet_type)
|
||||
{
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
|
||||
RoF2::structs::ItemSerializationHeader hdr;
|
||||
|
||||
//sprintf(hdr.unknown000, "06e0002Y1W00");
|
||||
@ -5462,7 +5462,7 @@ namespace RoF2
|
||||
slot_id = ServerToRoF2Slot(slot_id_in);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
hdr.slot_type = (inst->GetMerchantSlot() ? invtype::typeMerchant : slot_id.Type);
|
||||
hdr.main_slot = (inst->GetMerchantSlot() ? inst->GetMerchantSlot() : slot_id.Slot);
|
||||
hdr.sub_slot = (inst->GetMerchantSlot() ? 0xffff : slot_id.SubIndex);
|
||||
@ -5550,7 +5550,7 @@ namespace RoF2
|
||||
ob.write("\0", 1);
|
||||
|
||||
ob.write("\0", 1);
|
||||
|
||||
|
||||
RoF2::structs::ItemBodyStruct ibs;
|
||||
memset(&ibs, 0, sizeof(RoF2::structs::ItemBodyStruct));
|
||||
|
||||
@ -5873,7 +5873,7 @@ namespace RoF2
|
||||
iqbs.unknown37a = 0; // (guessed position) New to RoF2
|
||||
iqbs.unknown38 = 0;
|
||||
iqbs.unknown39 = 1;
|
||||
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(RoF2::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
@ -6073,7 +6073,7 @@ namespace RoF2
|
||||
|
||||
uint32 server_slot = EQ::invslot::SLOT_INVALID;
|
||||
uint32 temp_slot = invslot::SLOT_INVALID;
|
||||
|
||||
|
||||
switch (rof2_slot.Type) {
|
||||
case invtype::typePossessions: {
|
||||
if (rof2_slot.Slot >= invslot::POSSESSIONS_BEGIN && rof2_slot.Slot <= invslot::POSSESSIONS_END) {
|
||||
@ -6188,11 +6188,11 @@ namespace RoF2
|
||||
static inline uint32 RoF2ToServerCorpseSlot(structs::InventorySlot_Struct rof2_corpse_slot)
|
||||
{
|
||||
uint32 ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
|
||||
|
||||
if (rof2_corpse_slot.Type != invtype::typeCorpse || rof2_corpse_slot.SubIndex != invbag::SLOT_INVALID || rof2_corpse_slot.AugIndex != invaug::SOCKET_INVALID) {
|
||||
ServerSlot = EQ::invslot::SLOT_INVALID;
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
ServerSlot = RoF2ToServerCorpseMainSlot(rof2_corpse_slot.Slot);
|
||||
}
|
||||
@ -6346,7 +6346,7 @@ namespace RoF2
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(server_saylink, '\x12');
|
||||
auto segments = Strings::Split(server_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
@ -6378,7 +6378,7 @@ namespace RoF2
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(rof2_saylink, '\x12');
|
||||
auto segments = Strings::Split(rof2_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "rof2_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
|
||||
|
||||
int16 RoF2::invtype::GetInvTypeSize(int16 inv_type)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "rof_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
|
||||
|
||||
int16 RoF::invtype::GetInvTypeSize(int16 inv_type)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../item_instance.h"
|
||||
#include "sod_structs.h"
|
||||
#include "../rulesys.h"
|
||||
@ -407,7 +407,7 @@ namespace SoD
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -1089,7 +1089,7 @@ namespace SoD
|
||||
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQ::OutBuffer ob;
|
||||
@ -1106,7 +1106,7 @@ namespace SoD
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -3538,7 +3538,7 @@ namespace SoD
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
|
||||
SoD::structs::ItemSerializationHeader hdr;
|
||||
|
||||
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||
@ -3849,7 +3849,7 @@ namespace SoD
|
||||
iqbs.HealAmt = item->HealAmt;
|
||||
iqbs.SpellDmg = item->SpellDmg;
|
||||
iqbs.Clairvoyance = item->Clairvoyance;
|
||||
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(SoD::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
@ -4061,7 +4061,7 @@ namespace SoD
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(server_saylink, '\x12');
|
||||
auto segments = Strings::Split(server_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
@ -4101,7 +4101,7 @@ namespace SoD
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(sod_saylink, '\x12');
|
||||
auto segments = Strings::Split(sod_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "sod_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
|
||||
|
||||
int16 SoD::invtype::GetInvTypeSize(int16 inv_type)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../item_instance.h"
|
||||
#include "sof_structs.h"
|
||||
#include "../rulesys.h"
|
||||
@ -387,7 +387,7 @@ namespace SoF
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -885,7 +885,7 @@ namespace SoF
|
||||
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQ::OutBuffer ob;
|
||||
@ -902,7 +902,7 @@ namespace SoF
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -2936,7 +2936,7 @@ namespace SoF
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
|
||||
SoF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 254) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||
@ -3245,7 +3245,7 @@ namespace SoF
|
||||
iqbs.HeroicSVCorrup = item->HeroicSVCorrup;
|
||||
iqbs.HealAmt = item->HealAmt;
|
||||
iqbs.SpellDmg = item->SpellDmg;
|
||||
|
||||
|
||||
ob.write((const char*)&iqbs, sizeof(SoF::structs::ItemQuaternaryBodyStruct));
|
||||
|
||||
EQ::OutBuffer::pos_type count_pos = ob.tellp();
|
||||
@ -3354,7 +3354,7 @@ namespace SoF
|
||||
static inline uint32 ServerToSoFCorpseSlot(uint32 server_corpse_slot)
|
||||
{
|
||||
uint32 SoFSlot = invslot::SLOT_INVALID;
|
||||
|
||||
|
||||
if (server_corpse_slot <= EQ::invslot::slotGeneral8 && server_corpse_slot >= EQ::invslot::slotGeneral1) {
|
||||
SoFSlot = server_corpse_slot;
|
||||
}
|
||||
@ -3465,7 +3465,7 @@ namespace SoF
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(server_saylink, '\x12');
|
||||
auto segments = Strings::Split(server_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
@ -3505,7 +3505,7 @@ namespace SoF
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(sof_saylink, '\x12');
|
||||
auto segments = Strings::Split(sof_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "sof_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
|
||||
|
||||
int16 SoF::invtype::GetInvTypeSize(int16 inv_type)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../item_instance.h"
|
||||
#include "titanium_structs.h"
|
||||
|
||||
@ -338,13 +338,13 @@ namespace Titanium
|
||||
SerializeItem(ob, (const EQ::ItemInstance*)eq->inst, ServerToTitaniumSlot(eq->slot_id), 0);
|
||||
if (ob.tellp() == last_pos)
|
||||
LogNetcode("Titanium::ENCODE(OP_CharInventory) Serialization failed on item slot [{}] during OP_CharInventory. Item skipped", eq->slot_id);
|
||||
|
||||
|
||||
last_pos = ob.tellp();
|
||||
}
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -861,7 +861,7 @@ namespace Titanium
|
||||
|
||||
//store away the emu struct
|
||||
uchar* __emu_buffer = in->pBuffer;
|
||||
|
||||
|
||||
EQ::InternalSerializedItem_Struct* int_struct = (EQ::InternalSerializedItem_Struct*)(&__emu_buffer[4]);
|
||||
|
||||
EQ::OutBuffer ob;
|
||||
@ -878,7 +878,7 @@ namespace Titanium
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -2845,7 +2845,7 @@ namespace Titanium
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(server_saylink, '\x12');
|
||||
auto segments = Strings::Split(server_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
@ -2885,7 +2885,7 @@ namespace Titanium
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(titanium_saylink, '\x12');
|
||||
auto segments = Strings::Split(titanium_saylink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "titanium_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
|
||||
|
||||
int16 Titanium::invtype::GetInvTypeSize(int16 inv_type)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -28,7 +28,7 @@
|
||||
|
||||
#include "../eq_packet_structs.h"
|
||||
#include "../misc_functions.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "../item_instance.h"
|
||||
#include "uf_structs.h"
|
||||
#include "../rulesys.h"
|
||||
@ -527,7 +527,7 @@ namespace UF
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -1314,7 +1314,7 @@ namespace UF
|
||||
|
||||
in->size = ob.size();
|
||||
in->pBuffer = ob.detach();
|
||||
|
||||
|
||||
delete[] __emu_buffer;
|
||||
|
||||
dest->FastQueuePacket(&in, ack_req);
|
||||
@ -1741,7 +1741,7 @@ namespace UF
|
||||
OUT(WIS);
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQ::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
@ -2122,7 +2122,7 @@ namespace UF
|
||||
eq->aa_expansion = emu->expansion;
|
||||
eq->special_category = emu->category;
|
||||
eq->total_abilities = emu->total_effects;
|
||||
|
||||
|
||||
for(auto i = 0; i < eq->total_abilities; ++i) {
|
||||
eq->abilities[i].skill_id = inapp->ReadUInt32();
|
||||
eq->abilities[i].base_value = inapp->ReadUInt32();
|
||||
@ -3835,7 +3835,7 @@ namespace UF
|
||||
void SerializeItem(EQ::OutBuffer& ob, const EQ::ItemInstance *inst, int16 slot_id_in, uint8 depth)
|
||||
{
|
||||
const EQ::ItemData *item = inst->GetUnscaledItem();
|
||||
|
||||
|
||||
UF::structs::ItemSerializationHeader hdr;
|
||||
|
||||
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
|
||||
@ -4420,7 +4420,7 @@ namespace UF
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(serverSayLink, '\x12');
|
||||
auto segments = Strings::Split(serverSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
@ -4460,7 +4460,7 @@ namespace UF
|
||||
return;
|
||||
}
|
||||
|
||||
auto segments = SplitString(ufSayLink, '\x12');
|
||||
auto segments = Strings::Split(ufSayLink, '\x12');
|
||||
|
||||
for (size_t segment_iter = 0; segment_iter < segments.size(); ++segment_iter) {
|
||||
if (segment_iter & 1) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "uf_limits.h"
|
||||
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
|
||||
|
||||
int16 UF::invtype::GetInvTypeSize(int16 inv_type)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
|
||||
Copyright (C) 2001-2019 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@ -11,7 +11,7 @@
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
#include "profanity_manager.h"
|
||||
#include "dbcore.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cstring>
|
||||
@ -66,7 +66,7 @@ bool EQ::ProfanityManager::AddProfanity(DBcore *db, std::string profanity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string entry = str_tolower(profanity);
|
||||
std::string entry = Strings::ToLower(profanity);
|
||||
|
||||
if (check_for_existing_entry(entry)) {
|
||||
return true;
|
||||
@ -98,7 +98,7 @@ bool EQ::ProfanityManager::RemoveProfanity(DBcore *db, std::string profanity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string entry = str_tolower(profanity);
|
||||
std::string entry = Strings::ToLower(profanity);
|
||||
|
||||
if (!check_for_existing_entry(entry)) {
|
||||
return true;
|
||||
@ -126,13 +126,13 @@ void EQ::ProfanityManager::RedactMessage(char *message) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string test_message = str_tolower(message);
|
||||
std::string test_message = Strings::ToLower(message);
|
||||
// hard-coded max length based on channel message buffer size (4096 bytes)..
|
||||
// ..will need to change or remove if other sources are used for redaction
|
||||
if (test_message.length() < REDACTION_LENGTH_MIN || test_message.length() >= 4096) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
for (const auto &iter : profanity_list) { // consider adding textlink checks if it becomes an issue
|
||||
size_t pos = 0;
|
||||
size_t start_pos = 0;
|
||||
@ -162,7 +162,7 @@ void EQ::ProfanityManager::RedactMessage(std::string &message) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::string test_message = str_tolower(message);
|
||||
std::string test_message = Strings::ToLower(message);
|
||||
|
||||
for (const auto &iter : profanity_list) {
|
||||
size_t pos = 0;
|
||||
@ -194,7 +194,7 @@ bool EQ::ProfanityManager::ContainsCensoredLanguage(const std::string &message)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string test_message = str_tolower(message);
|
||||
std::string test_message = Strings::ToLower(message);
|
||||
|
||||
for (const auto &iter : profanity_list) {
|
||||
if (test_message.find(iter) != std::string::npos) {
|
||||
@ -227,8 +227,8 @@ bool EQ::ProfanityManager::load_database_entries(DBcore *db) {
|
||||
}
|
||||
|
||||
for (auto row : results) {
|
||||
std::string entry = str_tolower(row[0]);
|
||||
if (entry.length() >= REDACTION_LENGTH_MIN) {
|
||||
std::string entry = Strings::ToLower(row[0]);
|
||||
if (entry.length() >= REDACTION_LENGTH_MIN) {
|
||||
if (!check_for_existing_entry(entry)) {
|
||||
profanity_list.push_back(entry);
|
||||
}
|
||||
@ -265,6 +265,6 @@ bool EQ::ProfanityManager::check_for_existing_entry(std::string profanity) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
#include "timer.h"
|
||||
#include "ptimer.h"
|
||||
#include "database.h"
|
||||
#include "string_util.h"
|
||||
#include "strings.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#include <winsock2.h>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_ABILITY_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_ability_repository.h"
|
||||
|
||||
class AaAbilityRepository: public BaseAaAbilityRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_RANK_EFFECTS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_rank_effects_repository.h"
|
||||
|
||||
class AaRankEffectsRepository: public BaseAaRankEffectsRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_RANK_PREREQS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_rank_prereqs_repository.h"
|
||||
|
||||
class AaRankPrereqsRepository: public BaseAaRankPrereqsRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_RANKS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_ranks_repository.h"
|
||||
|
||||
class AaRanksRepository: public BaseAaRanksRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_FLAGS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_flags_repository.h"
|
||||
|
||||
class AccountFlagsRepository: public BaseAccountFlagsRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_IP_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_ip_repository.h"
|
||||
|
||||
class AccountIpRepository: public BaseAccountIpRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_repository.h"
|
||||
|
||||
class AccountRepository: public BaseAccountRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_REWARDS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_rewards_repository.h"
|
||||
|
||||
class AccountRewardsRepository: public BaseAccountRewardsRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_DETAILS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_details_repository.h"
|
||||
|
||||
class AdventureDetailsRepository: public BaseAdventureDetailsRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_MEMBERS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_members_repository.h"
|
||||
|
||||
class AdventureMembersRepository: public BaseAdventureMembersRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_STATS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_stats_repository.h"
|
||||
|
||||
class AdventureStatsRepository: public BaseAdventureStatsRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_TEMPLATE_ENTRY_FLAVOR_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_template_entry_flavor_repository.h"
|
||||
|
||||
class AdventureTemplateEntryFlavorRepository: public BaseAdventureTemplateEntryFlavorRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_TEMPLATE_ENTRY_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_template_entry_repository.h"
|
||||
|
||||
class AdventureTemplateEntryRepository: public BaseAdventureTemplateEntryRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_TEMPLATE_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_template_repository.h"
|
||||
|
||||
class AdventureTemplateRepository: public BaseAdventureTemplateRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_ALTERNATE_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_alternate_currency_repository.h"
|
||||
|
||||
class AlternateCurrencyRepository: public BaseAlternateCurrencyRepository {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
#define EQEMU_AURAS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_auras_repository.h"
|
||||
|
||||
class AurasRepository: public BaseAurasRepository {
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_ABILITY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaAbilityRepository {
|
||||
@ -82,12 +82,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -214,7 +214,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(aa_ability_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(aa_ability_entry.name) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(aa_ability_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(aa_ability_entry.category));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(aa_ability_entry.classes));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(aa_ability_entry.races));
|
||||
@ -232,7 +232,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_ability_entry.id
|
||||
)
|
||||
@ -249,7 +249,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.category));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.classes));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.races));
|
||||
@ -267,7 +267,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -292,7 +292,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.category));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.classes));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.races));
|
||||
@ -306,7 +306,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.enabled));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.reset_on_death));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -315,7 +315,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_RANK_EFFECTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaRankEffectsRepository {
|
||||
@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -178,7 +178,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_rank_effects_entry.rank_id
|
||||
)
|
||||
@ -204,7 +204,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -234,7 +234,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_rank_effects_entry.base1));
|
||||
insert_values.push_back(std::to_string(aa_rank_effects_entry.base2));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -243,7 +243,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_RANK_PREREQS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaRankPrereqsRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_rank_prereqs_entry.rank_id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_rank_prereqs_entry.aa_id));
|
||||
insert_values.push_back(std::to_string(aa_rank_prereqs_entry.points));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_RANKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaRanksRepository {
|
||||
@ -79,12 +79,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_ranks_entry.id
|
||||
)
|
||||
@ -260,7 +260,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -298,7 +298,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_ranks_entry.prev_id));
|
||||
insert_values.push_back(std::to_string(aa_ranks_entry.next_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -307,7 +307,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_FLAGS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountFlagsRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -159,14 +159,14 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(account_flags_entry.p_accid));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(account_flags_entry.p_flag) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(account_flags_entry.p_value) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(account_flags_entry.p_flag) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(account_flags_entry.p_value) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_flags_entry.p_accid
|
||||
)
|
||||
@ -183,14 +183,14 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_flags_entry.p_accid));
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_value) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -215,10 +215,10 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_flags_entry.p_accid));
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_value) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_IP_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountIpRepository {
|
||||
@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -164,15 +164,15 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(account_ip_entry.accid));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(account_ip_entry.ip) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(account_ip_entry.ip) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(account_ip_entry.count));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(account_ip_entry.lastused) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(account_ip_entry.lastused) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_ip_entry.accid
|
||||
)
|
||||
@ -189,15 +189,15 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_ip_entry.accid));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_ip_entry.count));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.lastused) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.lastused) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -222,11 +222,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_ip_entry.accid));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_ip_entry.count));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.lastused) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.lastused) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountRepository {
|
||||
@ -106,12 +106,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -253,33 +253,33 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(account_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(account_entry.charname) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(account_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(account_entry.charname) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(account_entry.sharedplat));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(account_entry.password) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(account_entry.password) + "'");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(account_entry.status));
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(account_entry.ls_id) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(account_entry.ls_id) + "'");
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(account_entry.lsaccount_id));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(account_entry.gmspeed));
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(account_entry.revoked));
|
||||
update_values.push_back(columns[10] + " = " + std::to_string(account_entry.karma));
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(account_entry.minilogin_ip) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(account_entry.minilogin_ip) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(account_entry.hideme));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(account_entry.rulesflag));
|
||||
update_values.push_back(columns[14] + " = FROM_UNIXTIME(" + (account_entry.suspendeduntil > 0 ? std::to_string(account_entry.suspendeduntil) : "null") + ")");
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(account_entry.time_creation));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(account_entry.expansion));
|
||||
update_values.push_back(columns[17] + " = '" + EscapeString(account_entry.ban_reason) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + EscapeString(account_entry.suspend_reason) + "'");
|
||||
update_values.push_back(columns[19] + " = '" + EscapeString(account_entry.crc_eqgame) + "'");
|
||||
update_values.push_back(columns[20] + " = '" + EscapeString(account_entry.crc_skillcaps) + "'");
|
||||
update_values.push_back(columns[21] + " = '" + EscapeString(account_entry.crc_basedata) + "'");
|
||||
update_values.push_back(columns[17] + " = '" + Strings::Escape(account_entry.ban_reason) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + Strings::Escape(account_entry.suspend_reason) + "'");
|
||||
update_values.push_back(columns[19] + " = '" + Strings::Escape(account_entry.crc_eqgame) + "'");
|
||||
update_values.push_back(columns[20] + " = '" + Strings::Escape(account_entry.crc_skillcaps) + "'");
|
||||
update_values.push_back(columns[21] + " = '" + Strings::Escape(account_entry.crc_basedata) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_entry.id
|
||||
)
|
||||
@ -296,33 +296,33 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.sharedplat));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.password) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.password) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.status));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ls_id) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ls_id) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.lsaccount_id));
|
||||
insert_values.push_back(std::to_string(account_entry.gmspeed));
|
||||
insert_values.push_back(std::to_string(account_entry.revoked));
|
||||
insert_values.push_back(std::to_string(account_entry.karma));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.hideme));
|
||||
insert_values.push_back(std::to_string(account_entry.rulesflag));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (account_entry.suspendeduntil > 0 ? std::to_string(account_entry.suspendeduntil) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(account_entry.time_creation));
|
||||
insert_values.push_back(std::to_string(account_entry.expansion));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_basedata) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_basedata) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -347,29 +347,29 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.sharedplat));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.password) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.password) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.status));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ls_id) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ls_id) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.lsaccount_id));
|
||||
insert_values.push_back(std::to_string(account_entry.gmspeed));
|
||||
insert_values.push_back(std::to_string(account_entry.revoked));
|
||||
insert_values.push_back(std::to_string(account_entry.karma));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.hideme));
|
||||
insert_values.push_back(std::to_string(account_entry.rulesflag));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (account_entry.suspendeduntil > 0 ? std::to_string(account_entry.suspendeduntil) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(account_entry.time_creation));
|
||||
insert_values.push_back(std::to_string(account_entry.expansion));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_basedata) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_basedata) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -378,7 +378,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_REWARDS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountRewardsRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_rewards_entry.account_id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(account_rewards_entry.reward_id));
|
||||
insert_values.push_back(std::to_string(account_rewards_entry.amount));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_DETAILS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureDetailsRepository {
|
||||
@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -201,7 +201,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_details_entry.id
|
||||
)
|
||||
@ -231,7 +231,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -265,7 +265,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_details_entry.time_zoned));
|
||||
insert_values.push_back(std::to_string(adventure_details_entry.time_completed));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_MEMBERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureMembersRepository {
|
||||
@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_members_entry.charid
|
||||
)
|
||||
@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_members_entry.id));
|
||||
insert_values.push_back(std::to_string(adventure_members_entry.charid));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_STATS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureStatsRepository {
|
||||
@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_stats_entry.player_id
|
||||
)
|
||||
@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -282,7 +282,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_stats_entry.ruj_losses));
|
||||
insert_values.push_back(std::to_string(adventure_stats_entry.tak_losses));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_TEMPLATE_ENTRY_FLAVOR_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureTemplateEntryFlavorRepository {
|
||||
@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -154,13 +154,13 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(adventure_template_entry_flavor_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(adventure_template_entry_flavor_entry.text) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(adventure_template_entry_flavor_entry.text) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_template_entry_flavor_entry.id
|
||||
)
|
||||
@ -177,13 +177,13 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_flavor_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry_flavor_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry_flavor_entry.text) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -208,9 +208,9 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_flavor_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry_flavor_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry_flavor_entry.text) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_TEMPLATE_ENTRY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureTemplateEntryRepository {
|
||||
@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_template_entry_entry.id
|
||||
)
|
||||
@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_entry.id));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_entry.template_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_TEMPLATE_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureTemplateRepository {
|
||||
@ -139,12 +139,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -309,7 +309,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(adventure_template_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(adventure_template_entry.zone) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(adventure_template_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(adventure_template_entry.zone_version));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(adventure_template_entry.is_hard));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(adventure_template_entry.is_raid));
|
||||
@ -322,7 +322,7 @@ public:
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(adventure_template_entry.assa_y));
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(adventure_template_entry.assa_z));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(adventure_template_entry.assa_h));
|
||||
update_values.push_back(columns[14] + " = '" + EscapeString(adventure_template_entry.text) + "'");
|
||||
update_values.push_back(columns[14] + " = '" + Strings::Escape(adventure_template_entry.text) + "'");
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(adventure_template_entry.duration));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(adventure_template_entry.zone_in_time));
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(adventure_template_entry.win_points));
|
||||
@ -346,7 +346,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_template_entry.id
|
||||
)
|
||||
@ -363,7 +363,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_version));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_hard));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_raid));
|
||||
@ -376,7 +376,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_y));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_z));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_h));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.duration));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_in_time));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.win_points));
|
||||
@ -400,7 +400,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -425,7 +425,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_version));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_hard));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_raid));
|
||||
@ -438,7 +438,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_y));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_z));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_h));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.duration));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_in_time));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.win_points));
|
||||
@ -458,7 +458,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.graveyard_z));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.graveyard_radius));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -467,7 +467,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ALTERNATE_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAlternateCurrencyRepository {
|
||||
@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
alternate_currency_entry.id
|
||||
)
|
||||
@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(alternate_currency_entry.id));
|
||||
insert_values.push_back(std::to_string(alternate_currency_entry.item_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AURAS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAurasRepository {
|
||||
@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -200,7 +200,7 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(auras_entry.type));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(auras_entry.npc_type));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(auras_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(auras_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(auras_entry.spell_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(auras_entry.distance));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(auras_entry.aura_type));
|
||||
@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
auras_entry.type
|
||||
)
|
||||
@ -232,7 +232,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(auras_entry.type));
|
||||
insert_values.push_back(std::to_string(auras_entry.npc_type));
|
||||
insert_values.push_back("'" + EscapeString(auras_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(auras_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(auras_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(auras_entry.distance));
|
||||
insert_values.push_back(std::to_string(auras_entry.aura_type));
|
||||
@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -272,7 +272,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(auras_entry.type));
|
||||
insert_values.push_back(std::to_string(auras_entry.npc_type));
|
||||
insert_values.push_back("'" + EscapeString(auras_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(auras_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(auras_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(auras_entry.distance));
|
||||
insert_values.push_back(std::to_string(auras_entry.aura_type));
|
||||
@ -282,7 +282,7 @@ public:
|
||||
insert_values.push_back(std::to_string(auras_entry.icon));
|
||||
insert_values.push_back(std::to_string(auras_entry.cast_time));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BASE_DATA_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBaseDataRepository {
|
||||
@ -70,12 +70,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -208,7 +208,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
base_data_entry.level
|
||||
)
|
||||
@ -239,7 +239,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -274,7 +274,7 @@ public:
|
||||
insert_values.push_back(std::to_string(base_data_entry.mana_fac));
|
||||
insert_values.push_back(std::to_string(base_data_entry.end_fac));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -283,7 +283,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BLOCKED_SPELLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBlockedSpellsRepository {
|
||||
@ -76,12 +76,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -212,14 +212,14 @@ public:
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(blocked_spells_entry.x_diff));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(blocked_spells_entry.y_diff));
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(blocked_spells_entry.z_diff));
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(blocked_spells_entry.message) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(blocked_spells_entry.description) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(blocked_spells_entry.message) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(blocked_spells_entry.description) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
blocked_spells_entry.id
|
||||
)
|
||||
@ -245,14 +245,14 @@ public:
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.x_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.y_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.z_diff));
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.description) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -286,10 +286,10 @@ public:
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.x_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.y_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.z_diff));
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.description) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -298,7 +298,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BOOKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBooksRepository {
|
||||
@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -163,15 +163,15 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(books_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(books_entry.txtfile) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(books_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(books_entry.txtfile) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(books_entry.language));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
books_entry.id
|
||||
)
|
||||
@ -188,15 +188,15 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(books_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(books_entry.txtfile) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.txtfile) + "'");
|
||||
insert_values.push_back(std::to_string(books_entry.language));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -221,11 +221,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(books_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(books_entry.txtfile) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.txtfile) + "'");
|
||||
insert_values.push_back(std::to_string(books_entry.language));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -234,7 +234,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BUG_REPORTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBugReportsRepository {
|
||||
@ -136,12 +136,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -303,43 +303,43 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(bug_reports_entry.zone) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(bug_reports_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(bug_reports_entry.client_version_id));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(bug_reports_entry.client_version_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(bug_reports_entry.client_version_name) + "'");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(bug_reports_entry.account_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(bug_reports_entry.character_id));
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(bug_reports_entry.character_name) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(bug_reports_entry.character_name) + "'");
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(bug_reports_entry.reporter_spoof));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(bug_reports_entry.category_id));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(bug_reports_entry.category_name) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(bug_reports_entry.reporter_name) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(bug_reports_entry.ui_path) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(bug_reports_entry.category_name) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(bug_reports_entry.reporter_name) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(bug_reports_entry.ui_path) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(bug_reports_entry.pos_x));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(bug_reports_entry.pos_y));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(bug_reports_entry.pos_z));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(bug_reports_entry.heading));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(bug_reports_entry.time_played));
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(bug_reports_entry.target_id));
|
||||
update_values.push_back(columns[18] + " = '" + EscapeString(bug_reports_entry.target_name) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + Strings::Escape(bug_reports_entry.target_name) + "'");
|
||||
update_values.push_back(columns[19] + " = " + std::to_string(bug_reports_entry.optional_info_mask));
|
||||
update_values.push_back(columns[20] + " = " + std::to_string(bug_reports_entry._can_duplicate));
|
||||
update_values.push_back(columns[21] + " = " + std::to_string(bug_reports_entry._crash_bug));
|
||||
update_values.push_back(columns[22] + " = " + std::to_string(bug_reports_entry._target_info));
|
||||
update_values.push_back(columns[23] + " = " + std::to_string(bug_reports_entry._character_flags));
|
||||
update_values.push_back(columns[24] + " = " + std::to_string(bug_reports_entry._unknown_value));
|
||||
update_values.push_back(columns[25] + " = '" + EscapeString(bug_reports_entry.bug_report) + "'");
|
||||
update_values.push_back(columns[26] + " = '" + EscapeString(bug_reports_entry.system_info) + "'");
|
||||
update_values.push_back(columns[25] + " = '" + Strings::Escape(bug_reports_entry.bug_report) + "'");
|
||||
update_values.push_back(columns[26] + " = '" + Strings::Escape(bug_reports_entry.system_info) + "'");
|
||||
update_values.push_back(columns[27] + " = FROM_UNIXTIME(" + (bug_reports_entry.report_datetime > 0 ? std::to_string(bug_reports_entry.report_datetime) : "null") + ")");
|
||||
update_values.push_back(columns[28] + " = " + std::to_string(bug_reports_entry.bug_status));
|
||||
update_values.push_back(columns[29] + " = FROM_UNIXTIME(" + (bug_reports_entry.last_review > 0 ? std::to_string(bug_reports_entry.last_review) : "null") + ")");
|
||||
update_values.push_back(columns[30] + " = '" + EscapeString(bug_reports_entry.last_reviewer) + "'");
|
||||
update_values.push_back(columns[31] + " = '" + EscapeString(bug_reports_entry.reviewer_notes) + "'");
|
||||
update_values.push_back(columns[30] + " = '" + Strings::Escape(bug_reports_entry.last_reviewer) + "'");
|
||||
update_values.push_back(columns[31] + " = '" + Strings::Escape(bug_reports_entry.reviewer_notes) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
bug_reports_entry.id
|
||||
)
|
||||
@ -356,43 +356,43 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.client_version_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.account_id));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.reporter_spoof));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.category_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_x));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_y));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_z));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.heading));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.time_played));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.target_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.optional_info_mask));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._can_duplicate));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._crash_bug));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._target_info));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._character_flags));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._unknown_value));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.report_datetime > 0 ? std::to_string(bug_reports_entry.report_datetime) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.bug_status));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.last_review > 0 ? std::to_string(bug_reports_entry.last_review) : "null") + ")");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reviewer_notes) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reviewer_notes) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -417,39 +417,39 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.client_version_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.account_id));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.reporter_spoof));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.category_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_x));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_y));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_z));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.heading));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.time_played));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.target_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.optional_info_mask));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._can_duplicate));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._crash_bug));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._target_info));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._character_flags));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._unknown_value));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.report_datetime > 0 ? std::to_string(bug_reports_entry.report_datetime) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.bug_status));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.last_review > 0 ? std::to_string(bug_reports_entry.last_review) : "null") + ")");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reviewer_notes) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reviewer_notes) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -458,7 +458,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BUGS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBugsRepository {
|
||||
@ -79,12 +79,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -208,24 +208,24 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(bugs_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(bugs_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(bugs_entry.ui) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(bugs_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(bugs_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(bugs_entry.ui) + "'");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(bugs_entry.x));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(bugs_entry.y));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(bugs_entry.z));
|
||||
update_values.push_back(columns[7] + " = '" + EscapeString(bugs_entry.type) + "'");
|
||||
update_values.push_back(columns[7] + " = '" + Strings::Escape(bugs_entry.type) + "'");
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(bugs_entry.flag));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(bugs_entry.target) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(bugs_entry.bug) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(bugs_entry.date) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(bugs_entry.target) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(bugs_entry.bug) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(bugs_entry.date) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(bugs_entry.status));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
bugs_entry.id
|
||||
)
|
||||
@ -242,24 +242,24 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bugs_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.ui) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.ui) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.x));
|
||||
insert_values.push_back(std::to_string(bugs_entry.y));
|
||||
insert_values.push_back(std::to_string(bugs_entry.z));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.type) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.type) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.flag));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.date) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.date) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.status));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -284,20 +284,20 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bugs_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.ui) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.ui) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.x));
|
||||
insert_values.push_back(std::to_string(bugs_entry.y));
|
||||
insert_values.push_back(std::to_string(bugs_entry.z));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.type) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.type) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.flag));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.date) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.date) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.status));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -306,7 +306,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BUYER_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBuyerRepository {
|
||||
@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -176,7 +176,7 @@ public:
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(buyer_entry.charid));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(buyer_entry.buyslot));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(buyer_entry.itemid));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(buyer_entry.itemname) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(buyer_entry.itemname) + "'");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(buyer_entry.quantity));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(buyer_entry.price));
|
||||
|
||||
@ -184,7 +184,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
buyer_entry.charid
|
||||
)
|
||||
@ -203,7 +203,7 @@ public:
|
||||
insert_values.push_back(std::to_string(buyer_entry.charid));
|
||||
insert_values.push_back(std::to_string(buyer_entry.buyslot));
|
||||
insert_values.push_back(std::to_string(buyer_entry.itemid));
|
||||
insert_values.push_back("'" + EscapeString(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back(std::to_string(buyer_entry.quantity));
|
||||
insert_values.push_back(std::to_string(buyer_entry.price));
|
||||
|
||||
@ -211,7 +211,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -238,11 +238,11 @@ public:
|
||||
insert_values.push_back(std::to_string(buyer_entry.charid));
|
||||
insert_values.push_back(std::to_string(buyer_entry.buyslot));
|
||||
insert_values.push_back(std::to_string(buyer_entry.itemid));
|
||||
insert_values.push_back("'" + EscapeString(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back(std::to_string(buyer_entry.quantity));
|
||||
insert_values.push_back(std::to_string(buyer_entry.price));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHAR_CREATE_COMBINATIONS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharCreateCombinationsRepository {
|
||||
@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -184,7 +184,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
char_create_combinations_entry.race
|
||||
)
|
||||
@ -211,7 +211,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -242,7 +242,7 @@ public:
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.start_zone));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.expansions_req));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHAR_CREATE_POINT_ALLOCATIONS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharCreatePointAllocationsRepository {
|
||||
@ -85,12 +85,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -238,7 +238,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
char_create_point_allocations_entry.id
|
||||
)
|
||||
@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -314,7 +314,7 @@ public:
|
||||
insert_values.push_back(std::to_string(char_create_point_allocations_entry.alloc_wis));
|
||||
insert_values.push_back(std::to_string(char_create_point_allocations_entry.alloc_cha));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -323,7 +323,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHAR_RECIPE_LIST_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharRecipeListRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
char_recipe_list_entry.char_id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(char_recipe_list_entry.recipe_id));
|
||||
insert_values.push_back(std::to_string(char_recipe_list_entry.madecount));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ACTIVITIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterActivitiesRepository {
|
||||
@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -178,7 +178,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_activities_entry.charid
|
||||
)
|
||||
@ -204,7 +204,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -234,7 +234,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_activities_entry.donecount));
|
||||
insert_values.push_back(std::to_string(character_activities_entry.completed));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -243,7 +243,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ALT_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterAltCurrencyRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_alt_currency_entry.char_id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_alt_currency_entry.currency_id));
|
||||
insert_values.push_back(std::to_string(character_alt_currency_entry.amount));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ALTERNATE_ABILITIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterAlternateAbilitiesRepository {
|
||||
@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_alternate_abilities_entry.id
|
||||
)
|
||||
@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_alternate_abilities_entry.aa_value));
|
||||
insert_values.push_back(std::to_string(character_alternate_abilities_entry.charges));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_AURAS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterAurasRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_auras_entry.id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_auras_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_auras_entry.spell_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_BANDOLIER_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterBandolierRepository {
|
||||
@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -178,13 +178,13 @@ public:
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_bandolier_entry.bandolier_slot));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_bandolier_entry.item_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_bandolier_entry.icon));
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(character_bandolier_entry.bandolier_name) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(character_bandolier_entry.bandolier_name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_bandolier_entry.id
|
||||
)
|
||||
@ -205,13 +205,13 @@ public:
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.bandolier_slot));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.item_id));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.icon));
|
||||
insert_values.push_back("'" + EscapeString(character_bandolier_entry.bandolier_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_bandolier_entry.bandolier_name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -240,9 +240,9 @@ public:
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.bandolier_slot));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.item_id));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.icon));
|
||||
insert_values.push_back("'" + EscapeString(character_bandolier_entry.bandolier_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_bandolier_entry.bandolier_name) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_BIND_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterBindRepository {
|
||||
@ -64,12 +64,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -195,7 +195,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_bind_entry.id
|
||||
)
|
||||
@ -224,7 +224,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -257,7 +257,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_bind_entry.z));
|
||||
insert_values.push_back(std::to_string(character_bind_entry.heading));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -266,7 +266,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_BUFFS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterBuffsRepository {
|
||||
@ -91,12 +91,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -232,7 +232,7 @@ public:
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_buffs_entry.slot_id));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_buffs_entry.spell_id));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_buffs_entry.caster_level));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(character_buffs_entry.caster_name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(character_buffs_entry.caster_name) + "'");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_buffs_entry.ticsremaining));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_buffs_entry.counters));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_buffs_entry.numhits));
|
||||
@ -250,7 +250,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_buffs_entry.character_id
|
||||
)
|
||||
@ -270,7 +270,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.numhits));
|
||||
@ -288,7 +288,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -316,7 +316,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.numhits));
|
||||
@ -330,7 +330,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.ExtraDIChance));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.instrument_mod));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -339,7 +339,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_CORPSE_ITEMS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterCorpseItemsRepository {
|
||||
@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_corpse_items_entry.corpse_id
|
||||
)
|
||||
@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -282,7 +282,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_corpse_items_entry.aug_6));
|
||||
insert_values.push_back(std::to_string(character_corpse_items_entry.attuned));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_CORPSES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterCorpsesRepository {
|
||||
@ -181,12 +181,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -379,7 +379,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_corpses_entry.charid));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_corpses_entry.charname) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_corpses_entry.charname) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_corpses_entry.zone_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_corpses_entry.instance_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_corpses_entry.x));
|
||||
@ -429,7 +429,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_corpses_entry.id
|
||||
)
|
||||
@ -447,7 +447,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.charid));
|
||||
insert_values.push_back("'" + EscapeString(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.x));
|
||||
@ -497,7 +497,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -523,7 +523,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.charid));
|
||||
insert_values.push_back("'" + EscapeString(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.x));
|
||||
@ -569,7 +569,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.wc_8));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.wc_9));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -578,7 +578,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterCurrencyRepository {
|
||||
@ -91,12 +91,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -250,7 +250,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_currency_entry.id
|
||||
)
|
||||
@ -288,7 +288,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -330,7 +330,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_currency_entry.ebon_crystals));
|
||||
insert_values.push_back(std::to_string(character_currency_entry.career_ebon_crystals));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -339,7 +339,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_DATA_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterDataRepository {
|
||||
@ -346,12 +346,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -654,10 +654,10 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_data_entry.account_id));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_data_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(character_data_entry.last_name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(character_data_entry.title) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(character_data_entry.suffix) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_data_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(character_data_entry.last_name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(character_data_entry.title) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(character_data_entry.suffix) + "'");
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_data_entry.zone_id));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_data_entry.zone_instance));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(character_data_entry.y));
|
||||
@ -744,7 +744,7 @@ public:
|
||||
update_values.push_back(columns[89] + " = " + std::to_string(character_data_entry.autosplit_enabled));
|
||||
update_values.push_back(columns[90] + " = " + std::to_string(character_data_entry.lfp));
|
||||
update_values.push_back(columns[91] + " = " + std::to_string(character_data_entry.lfg));
|
||||
update_values.push_back(columns[92] + " = '" + EscapeString(character_data_entry.mailkey) + "'");
|
||||
update_values.push_back(columns[92] + " = '" + Strings::Escape(character_data_entry.mailkey) + "'");
|
||||
update_values.push_back(columns[93] + " = " + std::to_string(character_data_entry.xtargets));
|
||||
update_values.push_back(columns[94] + " = " + std::to_string(character_data_entry.firstlogon));
|
||||
update_values.push_back(columns[95] + " = " + std::to_string(character_data_entry.e_aa_effects));
|
||||
@ -759,7 +759,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_data_entry.id
|
||||
)
|
||||
@ -777,10 +777,10 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_data_entry.id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.account_id));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_instance));
|
||||
insert_values.push_back(std::to_string(character_data_entry.y));
|
||||
@ -867,7 +867,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.autosplit_enabled));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfp));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfg));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.xtargets));
|
||||
insert_values.push_back(std::to_string(character_data_entry.firstlogon));
|
||||
insert_values.push_back(std::to_string(character_data_entry.e_aa_effects));
|
||||
@ -882,7 +882,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -908,10 +908,10 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_data_entry.id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.account_id));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_instance));
|
||||
insert_values.push_back(std::to_string(character_data_entry.y));
|
||||
@ -998,7 +998,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.autosplit_enabled));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfp));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfg));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.xtargets));
|
||||
insert_values.push_back(std::to_string(character_data_entry.firstlogon));
|
||||
insert_values.push_back(std::to_string(character_data_entry.e_aa_effects));
|
||||
@ -1009,7 +1009,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.e_last_invsnapshot));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_data_entry.deleted_at > 0 ? std::to_string(character_data_entry.deleted_at) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -1018,7 +1018,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_DISCIPLINES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterDisciplinesRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_disciplines_entry.id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_disciplines_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_disciplines_entry.disc_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_EXP_MODIFIERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterExpModifiersRepository {
|
||||
@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_exp_modifiers_entry.character_id
|
||||
)
|
||||
@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_exp_modifiers_entry.aa_modifier));
|
||||
insert_values.push_back(std::to_string(character_exp_modifiers_entry.exp_modifier));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_EXPEDITION_LOCKOUTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterExpeditionLockoutsRepository {
|
||||
@ -61,12 +61,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -179,17 +179,17 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_expedition_lockouts_entry.character_id));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(character_expedition_lockouts_entry.event_name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(character_expedition_lockouts_entry.event_name) + "'");
|
||||
update_values.push_back(columns[4] + " = FROM_UNIXTIME(" + (character_expedition_lockouts_entry.expire_time > 0 ? std::to_string(character_expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_expedition_lockouts_entry.duration));
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_expedition_lockouts_entry.id
|
||||
)
|
||||
@ -207,17 +207,17 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.id));
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_expedition_lockouts_entry.expire_time > 0 ? std::to_string(character_expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.duration));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -243,13 +243,13 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.id));
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_expedition_lockouts_entry.expire_time > 0 ? std::to_string(character_expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.duration));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -258,7 +258,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_INSPECT_MESSAGES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterInspectMessagesRepository {
|
||||
@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -154,13 +154,13 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(character_inspect_messages_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(character_inspect_messages_entry.inspect_message) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(character_inspect_messages_entry.inspect_message) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_inspect_messages_entry.id
|
||||
)
|
||||
@ -177,13 +177,13 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(character_inspect_messages_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(character_inspect_messages_entry.inspect_message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_inspect_messages_entry.inspect_message) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -208,9 +208,9 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(character_inspect_messages_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(character_inspect_messages_entry.inspect_message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_inspect_messages_entry.inspect_message) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterInstanceSafereturnsRepository {
|
||||
@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -201,7 +201,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_instance_safereturns_entry.id
|
||||
)
|
||||
@ -231,7 +231,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -265,7 +265,7 @@ public:
|
||||
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) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ITEM_RECAST_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterItemRecastRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_item_recast_entry.id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_item_recast_entry.recast_type));
|
||||
insert_values.push_back(std::to_string(character_item_recast_entry.timestamp));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_LANGUAGES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterLanguagesRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -165,7 +165,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_languages_entry.id
|
||||
)
|
||||
@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -217,7 +217,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_languages_entry.lang_id));
|
||||
insert_values.push_back(std::to_string(character_languages_entry.value));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_LEADERSHIP_ABILITIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterLeadershipAbilitiesRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_leadership_abilities_entry.id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_leadership_abilities_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_leadership_abilities_entry.rank));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_MATERIAL_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterMaterialRepository {
|
||||
@ -61,12 +61,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_material_entry.id
|
||||
)
|
||||
@ -217,7 +217,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -249,7 +249,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_material_entry.use_tint));
|
||||
insert_values.push_back(std::to_string(character_material_entry.color));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -258,7 +258,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_MEMMED_SPELLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterMemmedSpellsRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_memmed_spells_entry.id
|
||||
)
|
||||
@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_memmed_spells_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_memmed_spells_entry.spell_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_PET_BUFFS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPetBuffsRepository {
|
||||
@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -203,7 +203,7 @@ public:
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_pet_buffs_entry.slot));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_pet_buffs_entry.spell_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_pet_buffs_entry.caster_level));
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(character_pet_buffs_entry.castername) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(character_pet_buffs_entry.castername) + "'");
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_pet_buffs_entry.ticsremaining));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_pet_buffs_entry.counters));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(character_pet_buffs_entry.numhits));
|
||||
@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_pet_buffs_entry.char_id
|
||||
)
|
||||
@ -235,7 +235,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.numhits));
|
||||
@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -275,14 +275,14 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.numhits));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.rune));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.instrument_mod));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_PET_INFO_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPetInfoRepository {
|
||||
@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -190,7 +190,7 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(character_pet_info_entry.char_id));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_pet_info_entry.pet));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_pet_info_entry.petname) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_pet_info_entry.petname) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_pet_info_entry.petpower));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_pet_info_entry.spell_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_pet_info_entry.hp));
|
||||
@ -202,7 +202,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_pet_info_entry.char_id
|
||||
)
|
||||
@ -220,7 +220,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.char_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.pet));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.petpower));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.hp));
|
||||
@ -232,7 +232,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -258,7 +258,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.char_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.pet));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.petpower));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.hp));
|
||||
@ -266,7 +266,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.size));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.taunting));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -275,7 +275,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_PET_INVENTORY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPetInventoryRepository {
|
||||
@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_pet_inventory_entry.char_id
|
||||
)
|
||||
@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_inventory_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_pet_inventory_entry.item_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_POTIONBELT_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPotionbeltRepository {
|
||||
@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_potionbelt_entry.id
|
||||
)
|
||||
@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_potionbelt_entry.item_id));
|
||||
insert_values.push_back(std::to_string(character_potionbelt_entry.icon));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_SKILLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterSkillsRepository {
|
||||
@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@ -165,7 +165,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_skills_entry.id
|
||||
)
|
||||
@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@ -217,7 +217,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_skills_entry.skill_id));
|
||||
insert_values.push_back(std::to_string(character_skills_entry.value));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user