mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +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:
@@ -33,7 +33,7 @@ void command_advnpcspawn(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string spawn_command = str_tolower(sep->arg[1]);
|
||||
std::string spawn_command = Strings::ToLower(sep->arg[1]);
|
||||
bool is_add_entry = spawn_command.find("addentry") != std::string::npos;
|
||||
bool is_add_spawn = spawn_command.find("addspawn") != std::string::npos;
|
||||
bool is_clear_box = spawn_command.find("clearbox") != std::string::npos;
|
||||
|
||||
@@ -17,7 +17,7 @@ void command_ai(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "You must target an NPC to use this command.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
auto target = c->GetTarget()->CastToNPC();
|
||||
|
||||
bool is_consider = !strcasecmp(sep->arg[1], "consider");
|
||||
@@ -42,7 +42,7 @@ void command_ai(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_consider) {
|
||||
if (is_consider) {
|
||||
if (arguments == 2) {
|
||||
auto mob_name = sep->arg[2];
|
||||
auto mob_to_consider = entity_list.GetMob(mob_name);
|
||||
@@ -153,7 +153,7 @@ void command_ai(Client *c, const Seperator *sep)
|
||||
delay ?
|
||||
fmt::format(
|
||||
"a delay of {} ({})",
|
||||
ConvertMillisecondsToTime(delay),
|
||||
Strings::MillisecondsToTime(delay),
|
||||
delay
|
||||
):
|
||||
"no delay"
|
||||
@@ -162,7 +162,7 @@ void command_ai(Client *c, const Seperator *sep)
|
||||
minimum_delay ?
|
||||
fmt::format(
|
||||
"a minimum delay of {} ({})",
|
||||
ConvertMillisecondsToTime(minimum_delay),
|
||||
Strings::MillisecondsToTime(minimum_delay),
|
||||
minimum_delay
|
||||
):
|
||||
"no minimum delay"
|
||||
@@ -209,7 +209,7 @@ void command_ai(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"a delay of {} ({})",
|
||||
delay,
|
||||
ConvertMillisecondsToTime(delay)
|
||||
Strings::MillisecondsToTime(delay)
|
||||
):
|
||||
"no delay"
|
||||
),
|
||||
@@ -218,7 +218,7 @@ void command_ai(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"a minimum delay of {} ({})",
|
||||
minimum_delay,
|
||||
ConvertMillisecondsToTime(delay)
|
||||
Strings::MillisecondsToTime(delay)
|
||||
):
|
||||
"no minimum delay"
|
||||
)
|
||||
|
||||
@@ -37,7 +37,7 @@ void command_ban(Client *c, const Seperator *sep)
|
||||
|
||||
auto query = fmt::format(
|
||||
"UPDATE account SET status = -2, ban_reason = '{}' WHERE id = {}",
|
||||
EscapeString(reason),
|
||||
Strings::Escape(reason),
|
||||
account_id
|
||||
);
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
@@ -23,7 +23,7 @@ void command_camerashake(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Sending camera shake to world with a duration of {} ({}) and an intensity of {}.",
|
||||
ConvertMillisecondsToTime(duration),
|
||||
Strings::MillisecondsToTime(duration),
|
||||
duration,
|
||||
intensity
|
||||
).c_str()
|
||||
|
||||
@@ -21,7 +21,7 @@ void command_databuckets(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
if (sep->arg[2]) {
|
||||
key_filter = str_tolower(sep->arg[2]);
|
||||
key_filter = Strings::ToLower(sep->arg[2]);
|
||||
}
|
||||
std::string query = "SELECT `id`, `key`, `value`, `expires` FROM data_buckets";
|
||||
if (!key_filter.empty()) { query += StringFormat(" WHERE `key` LIKE '%%%s%%'", key_filter.c_str()); }
|
||||
@@ -68,7 +68,7 @@ void command_databuckets(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
"%s : %s",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(del_saylink, false, "Delete").c_str(),
|
||||
Saylink::Create(del_saylink, false, "Delete").c_str(),
|
||||
key.c_str(),
|
||||
" Value: ",
|
||||
value.c_str());
|
||||
|
||||
@@ -48,8 +48,8 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"#door model <modelname> | Changes door model for selected door or select from [{}] or [{}]",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door showmodelszone", false, "local zone"),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door showmodelsglobal", false, "global")
|
||||
Saylink::Create("#door showmodelszone", false, "local zone"),
|
||||
Saylink::Create("#door showmodelsglobal", false, "global")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
@@ -61,7 +61,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} | Shows available models in the current zone that you are in",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door showmodelszone", false, "#door showmodelszone")
|
||||
Saylink::Create("#door showmodelszone", false, "#door showmodelszone")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -69,7 +69,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} | Shows available models globally by first listing all global model files",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door showmodelsglobal", false, "#door showmodelsglobal")
|
||||
Saylink::Create("#door showmodelsglobal", false, "#door showmodelsglobal")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -78,14 +78,14 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} - Brings up editing interface for selected door",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door edit", false, "#door edit")
|
||||
Saylink::Create("#door edit", false, "#door edit")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} - lists doors in zone",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#list doors", false, "#list doors")
|
||||
Saylink::Create("#list doors", false, "#list doors")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -104,8 +104,8 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
door->GetDoorName(),
|
||||
door->GetOpenType(),
|
||||
door->GetInvertState(),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door setinvertstate 0", false, "0"),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door setinvertstate 1", false, "1")
|
||||
Saylink::Create("#door setinvertstate 0", false, "0"),
|
||||
Saylink::Create("#door setinvertstate 1", false, "1")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -135,7 +135,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (const auto &move_option : move_options) {
|
||||
if (move_option == move_x_action) {
|
||||
move_x_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} .25", move_option),
|
||||
false,
|
||||
".25"
|
||||
@@ -145,7 +145,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = 0; move_index <= 15; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
move_x_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -156,7 +156,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = -15; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
move_x_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -165,7 +165,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
move_x_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} -.25", move_option),
|
||||
false,
|
||||
".25"
|
||||
@@ -174,7 +174,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
else if (move_option == move_y_action) {
|
||||
move_y_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} .25", move_option),
|
||||
false,
|
||||
".25"
|
||||
@@ -184,7 +184,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = 0; move_index <= 15; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
move_y_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -195,7 +195,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = -15; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
move_y_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -204,7 +204,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
move_y_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} -.25", move_option),
|
||||
false,
|
||||
".25"
|
||||
@@ -213,7 +213,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
else if (move_option == move_z_action) {
|
||||
move_z_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} .25", move_option),
|
||||
false,
|
||||
".25"
|
||||
@@ -223,7 +223,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = 0; move_index <= 15; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
move_z_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -234,7 +234,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = -15; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
move_z_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -243,7 +243,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
move_z_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} -.25", move_option),
|
||||
false,
|
||||
".25"
|
||||
@@ -254,7 +254,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = 0; move_index <= 50; move_index += 5) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
move_h_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -265,7 +265,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = -50; move_index <= 0; move_index += 5) {
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
move_h_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -277,7 +277,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = 0; move_index <= 100; move_index += 10) {
|
||||
int value = (move_index == 0 ? 1 : move_index);
|
||||
set_size_options_positive.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -288,7 +288,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int move_index = -100; move_index <= 0; move_index += 10) {
|
||||
int value = (move_index == 0 ? -1 : move_index);
|
||||
set_size_options_negative.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door edit {} {}", move_option, value),
|
||||
false,
|
||||
fmt::format("{}", std::abs(value))
|
||||
@@ -299,7 +299,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
// we're passing a move action here
|
||||
if (!arg3.empty() && StringIsNumber(arg3)) {
|
||||
if (!arg3.empty() && Strings::IsNumber(arg3)) {
|
||||
float x_move = 0.0f;
|
||||
float y_move = 0.0f;
|
||||
float z_move = 0.0f;
|
||||
@@ -410,17 +410,17 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"Name [{}] [{}] [{}] [{}]",
|
||||
door->GetDoorName(),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#door save",
|
||||
false,
|
||||
"Save"
|
||||
),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#door changemodelqueue",
|
||||
false,
|
||||
"Change Model"
|
||||
),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#door setinclineinc",
|
||||
false,
|
||||
"Incline"
|
||||
@@ -431,40 +431,40 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[{}] - [X] + [{}]",
|
||||
implode(" | ", move_x_options_negative),
|
||||
implode(" | ", move_x_options_positive)
|
||||
Strings::Implode(" | ", move_x_options_negative),
|
||||
Strings::Implode(" | ", move_x_options_positive)
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[{}] - [Y] + [{}]",
|
||||
implode(" | ", move_y_options_negative),
|
||||
implode(" | ", move_y_options_positive)
|
||||
Strings::Implode(" | ", move_y_options_negative),
|
||||
Strings::Implode(" | ", move_y_options_positive)
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[{}] - [Z] + [{}]",
|
||||
implode(" | ", move_z_options_negative),
|
||||
implode(" | ", move_z_options_positive)
|
||||
Strings::Implode(" | ", move_z_options_negative),
|
||||
Strings::Implode(" | ", move_z_options_positive)
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[{}] - [H] + [{}]",
|
||||
implode(" | ", move_h_options_negative),
|
||||
implode(" | ", move_h_options_positive)
|
||||
Strings::Implode(" | ", move_h_options_negative),
|
||||
Strings::Implode(" | ", move_h_options_positive)
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[{}] - [Size] + [{}]",
|
||||
implode(" | ", set_size_options_negative),
|
||||
implode(" | ", set_size_options_positive)
|
||||
Strings::Implode(" | ", set_size_options_negative),
|
||||
Strings::Implode(" | ", set_size_options_positive)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -476,7 +476,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
|
||||
// create
|
||||
if (arg1 == "create") {
|
||||
std::string model = str_toupper(arg2);
|
||||
std::string model = Strings::ToUpper(arg2);
|
||||
uint16 entity_id = entity_list.CreateDoor(
|
||||
model.c_str(),
|
||||
c->GetPosition(),
|
||||
@@ -493,7 +493,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
// set model
|
||||
if (arg1 == "model") {
|
||||
Doors *door = entity_list.GetDoorsByID(c->GetDoorToolEntityId());
|
||||
std::string model = str_toupper(arg2);
|
||||
std::string model = Strings::ToUpper(arg2);
|
||||
if (door) {
|
||||
door->SetDoorName(model.c_str());
|
||||
}
|
||||
@@ -505,14 +505,14 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"#door model <modelname> | Changes door model for selected door or select from [{}] or [{}]",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door showmodelszone", false, "local zone"),
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#door showmodelsglobal", false, "global")
|
||||
Saylink::Create("#door showmodelszone", false, "local zone"),
|
||||
Saylink::Create("#door showmodelsglobal", false, "global")
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
// open type
|
||||
if (arg1 == "opentype" && !arg2.empty() && StringIsNumber(arg2)) {
|
||||
if (arg1 == "opentype" && !arg2.empty() && Strings::IsNumber(arg2)) {
|
||||
Doors *door = entity_list.GetDoorsByID(c->GetDoorToolEntityId());
|
||||
if (door) {
|
||||
door->SetOpenType(std::atoi(arg2.c_str()));
|
||||
@@ -520,7 +520,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
// incline
|
||||
if (arg1 == "setincline" && !arg2.empty() && StringIsNumber(arg2)) {
|
||||
if (arg1 == "setincline" && !arg2.empty() && Strings::IsNumber(arg2)) {
|
||||
Doors *door = entity_list.GetDoorsByID(c->GetDoorToolEntityId());
|
||||
if (door) {
|
||||
door->SetIncline(std::atoi(arg2.c_str()));
|
||||
@@ -528,7 +528,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
// incline
|
||||
if (arg1 == "setinvertstate" && !arg2.empty() && StringIsNumber(arg2)) {
|
||||
if (arg1 == "setinvertstate" && !arg2.empty() && Strings::IsNumber(arg2)) {
|
||||
Doors *door = entity_list.GetDoorsByID(c->GetDoorToolEntityId());
|
||||
if (door) {
|
||||
door->SetInvertState(std::atoi(arg2.c_str()));
|
||||
@@ -545,7 +545,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
// incline incremental
|
||||
if (arg1 == "setinclineinc" && !arg2.empty() && StringIsNumber(arg2)) {
|
||||
if (arg1 == "setinclineinc" && !arg2.empty() && Strings::IsNumber(arg2)) {
|
||||
Doors *door = entity_list.GetDoorsByID(c->GetDoorToolEntityId());
|
||||
if (door) {
|
||||
door->SetIncline(door->GetIncline() + std::atoi(arg2.c_str()));
|
||||
@@ -569,7 +569,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
std::vector<std::string> incline_negative_options;
|
||||
for (auto incline_value : incline_values) {
|
||||
incline_normal_options.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format(
|
||||
"#door setincline {}",
|
||||
incline_value.first
|
||||
@@ -583,7 +583,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int incline_index = 0; incline_index <= 100; incline_index += 10) {
|
||||
int incline_value = (incline_index == 0 ? 1 : incline_index);
|
||||
incline_positive_options.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format(
|
||||
"#door setinclineinc {}",
|
||||
incline_value
|
||||
@@ -597,7 +597,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
for (int incline_index = -100; incline_index <= 1; incline_index += 10) {
|
||||
int incline_value = (incline_index == 0 ? -1 : incline_index);
|
||||
incline_negative_options.emplace_back(
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format(
|
||||
"#door setinclineinc {}",
|
||||
incline_value
|
||||
@@ -612,7 +612,7 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[Incline] [{}]",
|
||||
implode(" | ", incline_normal_options)
|
||||
Strings::Implode(" | ", incline_normal_options)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -620,8 +620,8 @@ void DoorManipulation::CommandHandler(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[Incline Increments] [{}] - | + [{}]",
|
||||
implode(" | ", incline_negative_options),
|
||||
implode(" | ", incline_positive_options)
|
||||
Strings::Implode(" | ", incline_negative_options),
|
||||
Strings::Implode(" | ", incline_positive_options)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
@@ -700,7 +700,7 @@ void DoorManipulation::DisplayObjectResultToClient(
|
||||
say_links.emplace_back(
|
||||
fmt::format(
|
||||
"[{}] ",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door model {}", g.object_name),
|
||||
false,
|
||||
g.object_name
|
||||
@@ -733,7 +733,7 @@ void DoorManipulation::DisplayObjectResultToClient(
|
||||
}
|
||||
|
||||
if (!buffered_links.empty()) {
|
||||
c->Message(Chat::White, implode(" ", buffered_links).c_str());
|
||||
c->Message(Chat::White, Strings::Implode(" ", buffered_links).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -748,7 +748,7 @@ void DoorManipulation::DisplayModelsFromFileResults(
|
||||
say_links.emplace_back(
|
||||
fmt::format(
|
||||
"[{}] ",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
fmt::format("#door showmodelsfromfile {}", g.file_from),
|
||||
false,
|
||||
g.file_from
|
||||
@@ -781,6 +781,6 @@ void DoorManipulation::DisplayModelsFromFileResults(
|
||||
}
|
||||
|
||||
if (!buffered_links.empty()) {
|
||||
c->Message(Chat::White, implode(" ", buffered_links).c_str());
|
||||
c->Message(Chat::White, Strings::Implode(" ", buffered_links).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ void command_dye(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} {}",
|
||||
"Slots are as follows:",
|
||||
implode(", ", slot_messages)
|
||||
Strings::Implode(", ", slot_messages)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -42,10 +42,10 @@ void command_dz(Client *c, const Seperator *sep)
|
||||
continue;
|
||||
}
|
||||
|
||||
auto leader_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto leader_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#goto {}", expedition->GetLeaderName()), false, expedition->GetLeaderName());
|
||||
auto zone_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto zone_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#zoneinstance {}", dz->GetInstanceID()), false, "zone"
|
||||
);
|
||||
@@ -123,7 +123,7 @@ void command_dz(Client *c, const Seperator *sep)
|
||||
|
||||
for (const auto &dz : dynamic_zones) {
|
||||
auto seconds = dz->GetSecondsRemaining();
|
||||
auto zone_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto zone_saylink = Saylink::Create(
|
||||
fmt::format("#zoneinstance {}", dz->GetInstanceID()), false, "zone"
|
||||
);
|
||||
|
||||
@@ -159,7 +159,7 @@ void command_dz(Client *c, const Seperator *sep)
|
||||
bool is_expired = now > expire_time;
|
||||
|
||||
if (!is_expired || strcasecmp(sep->arg[2], "all") == 0) {
|
||||
auto zone_saylink = is_expired ? "zone" : EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto zone_saylink = is_expired ? "zone" : Saylink::Create(
|
||||
fmt::format("#zoneinstance {}", dz.instance), false, "zone"
|
||||
);
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ void command_editmassrespawn(Client *c, const Seperator *sep)
|
||||
|
||||
c->Message(
|
||||
Chat::Yellow, "To apply these changes, click <%s> or type [%s]",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Apply").c_str(),
|
||||
Saylink::Create(saylink, false, "Apply").c_str(),
|
||||
saylink.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ void command_faction(Client *c, const Seperator *sep)
|
||||
|
||||
std::string faction_filter;
|
||||
if (sep->arg[2]) {
|
||||
faction_filter = str_tolower(sep->arg[2]);
|
||||
faction_filter = Strings::ToLower(sep->arg[2]);
|
||||
}
|
||||
|
||||
if (!strcasecmp(sep->arg[1], "review")) {
|
||||
@@ -56,7 +56,7 @@ void command_faction(Client *c, const Seperator *sep)
|
||||
auto faction_id = std::stoul(row[0]);
|
||||
std::string faction_name = row[1];
|
||||
std::string faction_value = row[2];
|
||||
std::string reset_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
std::string reset_link = Saylink::Create(
|
||||
fmt::format("#faction reset {}", faction_id),
|
||||
false,
|
||||
"Reset"
|
||||
|
||||
@@ -4,7 +4,7 @@ void command_feature(Client *c, const Seperator *sep)
|
||||
{
|
||||
int arguments = sep->argnum;
|
||||
if (arguments < 2 || !sep->IsNumber(2)) {
|
||||
auto feature_save_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto feature_save_link = Saylink::Create(
|
||||
"#npcedit featuresave",
|
||||
false,
|
||||
"#npcedit featuresave"
|
||||
@@ -67,7 +67,7 @@ void command_feature(Client *c, const Seperator *sep)
|
||||
!is_tattoo &&
|
||||
!is_texture
|
||||
) {
|
||||
auto feature_save_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto feature_save_link = Saylink::Create(
|
||||
"#npcedit featuresave",
|
||||
false,
|
||||
"#npcedit featuresave"
|
||||
|
||||
@@ -39,11 +39,11 @@ void command_findclass(Client *c, const Seperator *sep)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
auto search_criteria = str_tolower(sep->argplus[1]);
|
||||
auto search_criteria = Strings::ToLower(sep->argplus[1]);
|
||||
int found_count = 0;
|
||||
for (uint16 class_id = WARRIOR; class_id <= MERCENARY_MASTER; class_id++) {
|
||||
std::string class_name = GetClassIDName(class_id);
|
||||
auto class_name_lower = str_tolower(class_name);
|
||||
auto class_name_lower = Strings::ToLower(class_name);
|
||||
if (
|
||||
search_criteria.length() &&
|
||||
class_name_lower.find(search_criteria) == std::string::npos
|
||||
|
||||
@@ -33,12 +33,12 @@ void command_findfaction(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::string search_criteria = str_tolower(sep->argplus[1]);
|
||||
std::string search_criteria = Strings::ToLower(sep->argplus[1]);
|
||||
int found_count = 0;
|
||||
int max_faction_id = content_db.GetMaxFaction();
|
||||
for (int faction_id = 0; faction_id < max_faction_id; faction_id++) {
|
||||
std::string faction_name = content_db.GetFactionName(faction_id);
|
||||
std::string faction_name_lower = str_tolower(faction_name);
|
||||
std::string faction_name_lower = Strings::ToLower(faction_name);
|
||||
if (faction_name.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -41,13 +41,13 @@ void command_findrace(Client *c, const Seperator *sep)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
auto search_criteria = str_tolower(sep->argplus[1]);
|
||||
auto search_criteria = Strings::ToLower(sep->argplus[1]);
|
||||
int found_count = 0;
|
||||
for (uint16 race_id = RACE_HUMAN_1; race_id <= RACE_PEGASUS_732; race_id++) {
|
||||
std::string race_name = GetRaceIDName(race_id);
|
||||
auto race_name_lower = str_tolower(race_name);
|
||||
auto race_name_lower = Strings::ToLower(race_name);
|
||||
if (
|
||||
search_criteria.length() &&
|
||||
search_criteria.length() &&
|
||||
race_name_lower.find(search_criteria) == std::string::npos
|
||||
) {
|
||||
continue;
|
||||
|
||||
@@ -38,11 +38,11 @@ void command_findskill(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::string search_criteria = str_tolower(sep->argplus[1]);
|
||||
std::string search_criteria = Strings::ToLower(sep->argplus[1]);
|
||||
if (!search_criteria.empty()) {
|
||||
int found_count = 0;
|
||||
for (auto skill : skills) {
|
||||
std::string skill_name_lower = str_tolower(skill.second);
|
||||
std::string skill_name_lower = Strings::ToLower(skill.second);
|
||||
if (skill_name_lower.find(search_criteria) == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@ void command_findspell(Client *c, const Seperator *sep)
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::string search_criteria = str_tolower(sep->argplus[1]);
|
||||
std::string search_criteria = Strings::ToLower(sep->argplus[1]);
|
||||
int found_count = 0;
|
||||
for (int spell_id = 0; spell_id < SPDAT_RECORDS; spell_id++) {
|
||||
auto current_spell = spells[spell_id];
|
||||
if (current_spell.name[0] != 0) {
|
||||
std::string spell_name = current_spell.name;
|
||||
std::string spell_name_lower = str_tolower(spell_name);
|
||||
std::string spell_name_lower = Strings::ToLower(spell_name);
|
||||
if (search_criteria.length() > 0 && spell_name_lower.find(search_criteria) == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -32,12 +32,12 @@ void command_findtask(Client *c, const Seperator *sep)
|
||||
);
|
||||
}
|
||||
else {
|
||||
std::string search_criteria = str_tolower(sep->argplus[1]);
|
||||
std::string search_criteria = Strings::ToLower(sep->argplus[1]);
|
||||
if (!search_criteria.empty()) {
|
||||
int found_count = 0;
|
||||
for (uint32 task_id = 1; task_id <= MAXTASKS; task_id++) {
|
||||
auto task_name = task_manager->GetTaskName(task_id);
|
||||
std::string task_name_lower = str_tolower(task_name);
|
||||
std::string task_name_lower = Strings::ToLower(task_name);
|
||||
if (task_name_lower.find(search_criteria) == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -27,8 +27,8 @@ void command_findzone(Client *c, const Seperator *sep)
|
||||
if (id == 0) {
|
||||
query = fmt::format(
|
||||
"SELECT zoneidnumber, short_name, long_name, version FROM zone WHERE long_name LIKE '%{}%' OR `short_name` LIKE '%{}%'",
|
||||
EscapeString(sep->arg[1]),
|
||||
EscapeString(sep->arg[1])
|
||||
Strings::Escape(sep->arg[1]),
|
||||
Strings::Escape(sep->arg[1])
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -60,8 +60,8 @@ void command_findzone(Client *c, const Seperator *sep)
|
||||
break;
|
||||
}
|
||||
|
||||
std::string command_zone = EQ::SayLinkEngine::GenerateQuestSaylink("#zone " + short_name, false, "zone");
|
||||
std::string command_gmzone = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
std::string command_zone = Saylink::Create("#zone " + short_name, false, "zone");
|
||||
std::string command_gmzone = Saylink::Create(
|
||||
fmt::format("#gmzone {} {}", short_name, version),
|
||||
false,
|
||||
"gmzone"
|
||||
|
||||
@@ -4,7 +4,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
{
|
||||
int arguments = sep->argnum;
|
||||
if (!arguments) {
|
||||
auto flags_link = EQ::SayLinkEngine::GenerateQuestSaylink("#flags", false, "#flags");
|
||||
auto flags_link = Saylink::Create("#flags", false, "#flags");
|
||||
c->Message(
|
||||
Chat::White,
|
||||
"Usage: #flagedit lock [Zone ID|Zone Short Name] [Flag Name] - Set the specified flag name on the zone, locking the zone"
|
||||
@@ -48,7 +48,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
!is_take &&
|
||||
!is_unlock
|
||||
) {
|
||||
auto flags_link = EQ::SayLinkEngine::GenerateQuestSaylink("#flags", false, "#flags");
|
||||
auto flags_link = Saylink::Create("#flags", false, "#flags");
|
||||
c->Message(
|
||||
Chat::White,
|
||||
"Usage: #flagedit lock [Zone ID|Zone Short Name] [Flag Name] - Set the specified flag name on the zone, locking the zone"
|
||||
@@ -85,7 +85,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
std::stoul(sep->arg[2]) :
|
||||
ZoneID(sep->arg[2])
|
||||
);
|
||||
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
|
||||
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
|
||||
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
|
||||
if (zone_id && !is_unknown_zone) {
|
||||
std::string zone_long_name = ZoneLongName(zone_id);
|
||||
@@ -120,7 +120,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
std::string popup_text = "<table>";
|
||||
|
||||
|
||||
popup_text += "<tr><td>Zone</td><td>Flag Required</td></tr>";
|
||||
|
||||
for (auto row : results) {
|
||||
@@ -154,7 +154,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
std::stoul(sep->arg[2]) :
|
||||
ZoneID(sep->arg[2])
|
||||
);
|
||||
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
|
||||
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
|
||||
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
|
||||
if (zone_id && !is_unknown_zone) {
|
||||
if (arguments < 3) {
|
||||
@@ -164,8 +164,8 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string flag_name = EscapeString(sep->argplus[3]);
|
||||
|
||||
std::string flag_name = Strings::Escape(sep->argplus[3]);
|
||||
std::string zone_long_name = ZoneLongName(zone_id);
|
||||
|
||||
auto query = fmt::format(
|
||||
@@ -209,7 +209,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
std::stoul(sep->arg[2]) :
|
||||
ZoneID(sep->arg[2])
|
||||
);
|
||||
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
|
||||
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
|
||||
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
|
||||
if (zone_id && !is_unknown_zone) {
|
||||
std::string zone_long_name = ZoneLongName(zone_id);
|
||||
@@ -237,7 +237,7 @@ void command_flagedit(Client *c, const Seperator *sep)
|
||||
std::stoul(sep->arg[2]) :
|
||||
ZoneID(sep->arg[2])
|
||||
);
|
||||
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
|
||||
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
|
||||
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
|
||||
if (zone_id && !is_unknown_zone) {
|
||||
std::string zone_long_name = ZoneLongName(zone_id);
|
||||
|
||||
@@ -25,8 +25,8 @@ void command_gearup(Client *c, const Seperator *sep)
|
||||
|
||||
if (auto res = cli.Get(url.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 = database.QueryDatabase(s);
|
||||
if (!results.ErrorMessage().empty()) {
|
||||
c->Message(
|
||||
@@ -161,7 +161,7 @@ void command_gearup(Client *c, const Seperator *sep)
|
||||
std::string message;
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
int expansion = atoi(row[0]);
|
||||
message += "[" + EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
message += "[" + Saylink::Create(
|
||||
fmt::format("#gearup {}", expansion),
|
||||
false,
|
||||
Expansion::ExpansionName[expansion]
|
||||
|
||||
@@ -8,7 +8,7 @@ void command_givemoney(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Client *target = c;
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
target = c->GetTarget()->CastToClient();
|
||||
@@ -30,12 +30,12 @@ void command_givemoney(Client *c, const Seperator *sep)
|
||||
platinum,
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Added {} to {}.",
|
||||
ConvertMoneyToString(
|
||||
Strings::Money(
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
|
||||
@@ -9,7 +9,7 @@ void command_gmzone(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string zone_short_name = str_tolower(
|
||||
std::string zone_short_name = Strings::ToLower(
|
||||
sep->IsNumber(1) ?
|
||||
ZoneName(std::stoul(sep->arg[1]), true) :
|
||||
sep->arg[1]
|
||||
@@ -44,13 +44,13 @@ void command_gmzone(Client *c, const Seperator *sep)
|
||||
std::stoul(sep->arg[2]) :
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
std::string instance_identifier = (
|
||||
sep->arg[3] ?
|
||||
sep->arg[3] :
|
||||
"gmzone"
|
||||
);
|
||||
|
||||
|
||||
auto bucket_key = fmt::format(
|
||||
"{}-{}-{}-instance",
|
||||
zone_short_name,
|
||||
|
||||
@@ -100,7 +100,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
uint32 zone_id = database.ZoneIDFromInstanceID(instance_id);
|
||||
uint32 version = database.VersionFromInstanceID(instance_id);
|
||||
uint32 current_id = database.GetInstanceID(zone_id, character_id, version);
|
||||
if (!current_id) {
|
||||
if (!current_id) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
(
|
||||
@@ -109,7 +109,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
"Added {} to Instance ID {}.",
|
||||
c->GetTargetDescription(target),
|
||||
instance_id
|
||||
) :
|
||||
) :
|
||||
fmt::format(
|
||||
"Failed to add {} to Instance ID {}.",
|
||||
c->GetTargetDescription(target),
|
||||
@@ -182,7 +182,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
ZoneLongName(zone_id),
|
||||
zone_id,
|
||||
(
|
||||
version ?
|
||||
version ?
|
||||
fmt::format(
|
||||
" Version: {}",
|
||||
version
|
||||
@@ -197,7 +197,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"Instance {} Created | Duration: {} ({})",
|
||||
instance_id,
|
||||
ConvertSecondsToTime(duration),
|
||||
Strings::SecondsToTime(duration),
|
||||
duration
|
||||
).c_str()
|
||||
);
|
||||
@@ -295,7 +295,7 @@ void command_instance(Client *c, const Seperator *sep)
|
||||
"Removed {} from Instance ID {}.",
|
||||
c->GetTargetDescription(target),
|
||||
instance_id
|
||||
) :
|
||||
) :
|
||||
fmt::format(
|
||||
"Failed to remove {} from Instance ID {}.",
|
||||
c->GetTargetDescription(target),
|
||||
|
||||
@@ -19,7 +19,7 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
std::string item_id = std::to_string(item->ID);
|
||||
std::string saylink_commands =
|
||||
"[" +
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#si " + item_id,
|
||||
false,
|
||||
"X"
|
||||
@@ -30,7 +30,7 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
std::string stack_size = std::to_string(item->StackSize);
|
||||
saylink_commands +=
|
||||
"[" +
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#si " + item_id + " " + stack_size,
|
||||
false,
|
||||
stack_size
|
||||
@@ -77,7 +77,7 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
std::string item_id = std::to_string(item->ID);
|
||||
std::string saylink_commands =
|
||||
"[" +
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#si " + item_id,
|
||||
false,
|
||||
"X"
|
||||
@@ -87,7 +87,7 @@ void command_itemsearch(Client *c, const Seperator *sep)
|
||||
std::string stack_size = std::to_string(item->StackSize);
|
||||
saylink_commands +=
|
||||
"[" +
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#si " + item_id + " " + stack_size,
|
||||
false,
|
||||
stack_size
|
||||
|
||||
@@ -4,7 +4,7 @@ void command_killallnpcs(Client *c, const Seperator *sep)
|
||||
{
|
||||
std::string search_string;
|
||||
if (sep->arg[1]) {
|
||||
search_string = str_tolower(sep->arg[1]);
|
||||
search_string = Strings::ToLower(sep->arg[1]);
|
||||
}
|
||||
|
||||
int killed_count = 0;
|
||||
@@ -15,7 +15,7 @@ void command_killallnpcs(Client *c, const Seperator *sep)
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string entity_name = str_tolower(entity->GetName());
|
||||
std::string entity_name = Strings::ToLower(entity->GetName());
|
||||
if ((!search_string.empty() && entity_name.find(search_string) == std::string::npos) ||
|
||||
!entity->IsAttackAllowed(c)) {
|
||||
continue;
|
||||
|
||||
@@ -69,7 +69,7 @@ void command_list(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
0,
|
||||
"| %s | ID %5d | %s | x %.0f | y %0.f | z %.0f",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(),
|
||||
Saylink::Create(saylink, false, "Goto").c_str(),
|
||||
entity->GetID(),
|
||||
entity->GetName(),
|
||||
entity->GetX(),
|
||||
@@ -110,7 +110,7 @@ void command_list(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
0,
|
||||
"| %s | ID %5d | %s | x %.0f | y %0.f | z %.0f",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(),
|
||||
Saylink::Create(saylink, false, "Goto").c_str(),
|
||||
entity->GetID(),
|
||||
entity->GetName(),
|
||||
entity->GetX(),
|
||||
@@ -151,7 +151,7 @@ void command_list(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
0,
|
||||
"| %s | ID %5d | %s | x %.0f | y %0.f | z %.0f",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(),
|
||||
Saylink::Create(saylink, false, "Goto").c_str(),
|
||||
entity->GetID(),
|
||||
entity->GetName(),
|
||||
entity->GetX(),
|
||||
@@ -192,7 +192,7 @@ void command_list(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
0,
|
||||
"| %s | Entity ID %5d | Door ID %i | %s | x %.0f | y %0.f | z %.0f",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(),
|
||||
Saylink::Create(saylink, false, "Goto").c_str(),
|
||||
entity->GetID(),
|
||||
entity->GetDoorID(),
|
||||
entity->GetDoorName(),
|
||||
@@ -234,7 +234,7 @@ void command_list(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
0,
|
||||
"| %s | Entity ID %5d | Object DBID %i | %s | x %.0f | y %0.f | z %.0f",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Goto").c_str(),
|
||||
Saylink::Create(saylink, false, "Goto").c_str(),
|
||||
entity->GetID(),
|
||||
entity->GetDBID(),
|
||||
entity->GetModelName(),
|
||||
|
||||
@@ -115,7 +115,7 @@ void command_logs(Client *c, const Seperator *sep)
|
||||
next_category_id
|
||||
);
|
||||
|
||||
auto next_list_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto next_list_link = Saylink::Create(
|
||||
next_list_string,
|
||||
false,
|
||||
next_list_string
|
||||
|
||||
@@ -7,7 +7,7 @@ void command_movechar(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "Usage: #movechar [Character ID|Character Name] [Zone ID|Zone Short Name]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
std::string character_name = (
|
||||
sep->IsNumber(1) ?
|
||||
database.GetCharNameByID(std::stoul(sep->arg[1])) :
|
||||
@@ -27,7 +27,7 @@ void command_movechar(Client *c, const Seperator *sep)
|
||||
|
||||
auto account_id = database.GetAccountIDByChar(character_name.c_str());
|
||||
|
||||
std::string zone_short_name = str_tolower(
|
||||
std::string zone_short_name = Strings::ToLower(
|
||||
sep->IsNumber(2) ?
|
||||
ZoneName(std::stoul(sep->arg[2]), true) :
|
||||
sep->arg[2]
|
||||
|
||||
@@ -17,7 +17,7 @@ void command_mysql(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "Usage: #mysql [Help|Query] [SQL Query]");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (is_help) {
|
||||
c->Message(Chat::White, "Usage: #mysql query \"Query goes here quoted\"");
|
||||
c->Message(Chat::White, "Note: To use 'LIKE \"%%something%%\" replace the %% with a #");
|
||||
@@ -32,14 +32,14 @@ void command_mysql(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
std::string query = sep->arg[2];
|
||||
find_replace(query, "#", "%");
|
||||
Strings::FindReplace(query, "#", "%");
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success()) {
|
||||
return;
|
||||
}
|
||||
|
||||
query = sep->arg[2];
|
||||
find_replace(query, "#", "%%");
|
||||
query = sep->arg[2];
|
||||
Strings::FindReplace(query, "#", "%%");
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
|
||||
@@ -178,7 +178,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
uint32 npc_id = c->GetTarget()->CastToNPC()->GetNPCTypeID();
|
||||
auto npc_id_string = fmt::format(
|
||||
"NPC ID {}",
|
||||
commify(std::to_string(npc_id))
|
||||
Strings::Commify(std::to_string(npc_id))
|
||||
);
|
||||
|
||||
if (!strcasecmp(sep->arg[1], "name")) {
|
||||
@@ -318,7 +318,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Health.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -339,7 +339,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Mana.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -466,7 +466,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now regenerates {} Health per Tick.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -487,7 +487,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now regenerates {} HP per Second.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -508,7 +508,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now regenerates {} Mana per Tick.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -529,7 +529,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Loottable ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -550,7 +550,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Merchant ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -601,7 +601,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Spell List ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -622,7 +622,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Spells Effects ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -651,7 +651,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
faction_name,
|
||||
faction_id
|
||||
) :
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
@@ -673,7 +673,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Adventure Template ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -694,7 +694,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Trap Template ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -716,8 +716,8 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now hits from {} to {} damage.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2]),
|
||||
commify(sep->arg[3])
|
||||
Strings::Commify(sep->arg[2]),
|
||||
Strings::Commify(sep->arg[3])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -794,7 +794,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has an Aggro Radius of {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -815,7 +815,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has an Assist Radius of {}",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -873,7 +873,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Armor Tint ID {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -921,7 +921,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} is now using Ammo ID File {}.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -943,8 +943,8 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} will have Model {} set to their Primary and Model {} set to their Secondary on repop.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2]),
|
||||
sep->IsNumber(3) ? commify(sep->arg[3]) : 0
|
||||
Strings::Commify(sep->arg[2]),
|
||||
sep->IsNumber(3) ? Strings::Commify(sep->arg[3]) : 0
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1414,7 +1414,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Strength.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1435,7 +1435,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Stamina.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1456,7 +1456,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Agility.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1477,7 +1477,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Dexterity.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1498,7 +1498,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Intelligence.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1519,7 +1519,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Wisdom.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1540,7 +1540,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Charisma.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1630,7 +1630,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Attack.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1651,7 +1651,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Accuracy.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1672,7 +1672,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Avoidance.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1693,7 +1693,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Slow Mitigation.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1756,7 +1756,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has a Scaling Rate of {}%%.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1777,7 +1777,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has a Spell Scaling Rate of {}%%.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -1801,7 +1801,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has a Heal Scaling Rate of {}%%.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2044,7 +2044,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Armor Class while Charmed.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2065,7 +2065,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now does {} Minimum Damage while Charmed.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2086,7 +2086,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now does {} Maximum Damage while Charmed.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2126,7 +2126,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Accuracy Rating while Charmed.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2147,7 +2147,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Avoidance Rating while Charmed.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2168,7 +2168,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has {} Attack while Charmed.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2226,7 +2226,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
c->Message(
|
||||
Chat::White,
|
||||
"Usage: #npcedit rarespawn [Flag] - Sets an NPC's Rare Spawn Flag [0 = Not a Rare Spawn, 1 = Rare Spawn]"
|
||||
);
|
||||
);
|
||||
}
|
||||
return;
|
||||
} else if (!strcasecmp(sep->arg[1], "stuck_behavior")) {
|
||||
@@ -2335,7 +2335,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has an Experience Modifier of {}%%.",
|
||||
npc_id_string,
|
||||
commify(sep->arg[2])
|
||||
Strings::Commify(sep->arg[2])
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2373,7 +2373,7 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
) :
|
||||
std::to_string(animation_id)
|
||||
),
|
||||
commify(std::to_string(c->GetTarget()->CastToNPC()->GetSpawnGroupId()))
|
||||
Strings::Commify(std::to_string(c->GetTarget()->CastToNPC()->GetSpawnGroupId()))
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
@@ -2397,9 +2397,9 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"{} now has a Respawn Timer of {} ({}) on Spawn Group ID {}.",
|
||||
npc_id_string,
|
||||
ConvertSecondsToTime(respawn_time),
|
||||
Strings::SecondsToTime(respawn_time),
|
||||
respawn_time,
|
||||
commify(std::to_string(c->GetTarget()->CastToNPC()->GetSpawnGroupId()))
|
||||
Strings::Commify(std::to_string(c->GetTarget()->CastToNPC()->GetSpawnGroupId()))
|
||||
).c_str()
|
||||
);
|
||||
auto query = fmt::format(
|
||||
|
||||
@@ -72,7 +72,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Possible columns [{}]",
|
||||
implode(options_glue, possible_column_options)
|
||||
Strings::Implode(options_glue, possible_column_options)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
@@ -91,7 +91,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Possible columns [{}]",
|
||||
implode(options_glue, possible_column_options)
|
||||
Strings::Implode(options_glue, possible_column_options)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
@@ -139,7 +139,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
||||
for (auto row : results) {
|
||||
std::string npc_id = row[0];
|
||||
std::string npc_name = row[1];
|
||||
std::string search_column_value = str_tolower(row[2]);
|
||||
std::string search_column_value = Strings::ToLower(row[2]);
|
||||
std::string change_column_current_value = row[3];
|
||||
|
||||
if (exact_match) {
|
||||
@@ -183,7 +183,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
||||
);
|
||||
|
||||
if (strcasecmp(sep->arg[5], "apply") == 0) {
|
||||
std::string npc_ids_string = implode(",", npc_ids);
|
||||
std::string npc_ids_string = Strings::Implode(",", npc_ids);
|
||||
if (npc_ids_string.empty()) {
|
||||
c->Message(Chat::Red, "Error: Ran into an unknown error compiling NPC IDs");
|
||||
return;
|
||||
@@ -223,7 +223,7 @@ void command_npceditmass(Client *c, const Seperator *sep)
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Would you like to {} these changes?",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "apply")
|
||||
Saylink::Create(saylink, false, "apply")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "You must target an NPC or a Corpse to use this command.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int arguments = sep->argnum;
|
||||
if (!arguments) {
|
||||
c->Message(Chat::White, "Usage: #npcloot add [Item ID] [Charges] [Equip] [Augment 1 ID] [Augment 2 ID] [Augment 3 ID] [Augment 4 ID] [Augment 5 ID] [Augment 6 ID] - Adds the specified item to an NPC's loot");
|
||||
@@ -132,12 +132,12 @@ void command_npcloot(Client *c, const Seperator *sep)
|
||||
gold ||
|
||||
platinum
|
||||
) ?
|
||||
ConvertMoneyToString(
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
copper
|
||||
) :
|
||||
Strings::Money(
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
copper
|
||||
) :
|
||||
"no money"
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ void command_nudge(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Note: Partial or mixed arguments allowed, example {}.",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
Saylink::Create(
|
||||
"#nudge x=5.0",
|
||||
false,
|
||||
"#nudge x=5.0"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_nukebuffs(Client *c, const Seperator *sep)
|
||||
{
|
||||
{
|
||||
Mob* target = c;
|
||||
if (c->GetTarget()) {
|
||||
target = c->GetTarget();
|
||||
}
|
||||
|
||||
std::string buff_identifier = str_tolower(sep->arg[1]);
|
||||
std::string buff_identifier = Strings::ToLower(sep->arg[1]);
|
||||
std::string buff_type;
|
||||
bool is_beneficial = buff_identifier.find("beneficial") != std::string::npos;
|
||||
bool is_detrimental = buff_identifier.find("detrimental") != std::string::npos;
|
||||
|
||||
@@ -16,7 +16,7 @@ void command_peqzone(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"You must wait {} before using this command again.",
|
||||
ConvertSecondsToTime(time_left)
|
||||
Strings::SecondsToTime(time_left)
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
|
||||
@@ -29,7 +29,7 @@ void command_qglobal(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "Usage: #qglobal on - Enables target NPC's ability to view quest globals");
|
||||
c->Message(Chat::White, "Usage: #qglobal off - Disables target NPC's ability to view quest globals");
|
||||
c->Message(Chat::White, "Usage: #qglobal view - View target NPC's ability to view quest globals");
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_off) {
|
||||
@@ -50,7 +50,7 @@ void command_qglobal(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
auto repop_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto repop_link = Saylink::Create(
|
||||
"#repop",
|
||||
false,
|
||||
"repop"
|
||||
@@ -83,7 +83,7 @@ void command_qglobal(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
auto repop_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto repop_link = Saylink::Create(
|
||||
"#repop",
|
||||
false,
|
||||
"repop"
|
||||
|
||||
@@ -22,7 +22,7 @@ void command_raidloot(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string raid_loot_type = str_tolower(sep->arg[1]);
|
||||
std::string raid_loot_type = Strings::ToLower(sep->arg[1]);
|
||||
bool is_all = raid_loot_type.find("all") != std::string::npos;
|
||||
bool is_group_leader = raid_loot_type.find("groupleader") != std::string::npos;
|
||||
bool is_raid_leader = raid_loot_type.find("raidleader") != std::string::npos;
|
||||
|
||||
@@ -91,7 +91,7 @@ void command_roambox(Client *c, const Seperator *sep)
|
||||
box_size,
|
||||
c->GetTargetDescription(target),
|
||||
spawn_group_id,
|
||||
ConvertMillisecondsToTime(delay),
|
||||
Strings::MillisecondsToTime(delay),
|
||||
delay
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -127,7 +127,7 @@ void command_scale(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::Yellow, "Found (%i) NPC's that match this search...", found_count);
|
||||
c->Message(
|
||||
Chat::Yellow, "To apply these changes, click <%s> or type %s",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(saylink, false, "Apply").c_str(),
|
||||
Saylink::Create(saylink, false, "Apply").c_str(),
|
||||
saylink.c_str()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ void command_serverinfo(Client *c, const Seperator *sep)
|
||||
popup_text.append(
|
||||
fmt::format(
|
||||
"<tr><td>Uptime</td><td>{}</td></tr>",
|
||||
ConvertSecondsToTime(uptime)
|
||||
Strings::SecondsToTime(uptime)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ void command_setaapts(Client *c, const Seperator *sep)
|
||||
target = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
std::string aa_type = str_tolower(sep->arg[1]);
|
||||
std::string aa_type = Strings::ToLower(sep->arg[1]);
|
||||
std::string group_raid_string;
|
||||
uint32 aa_points = static_cast<uint32>(std::min(std::stoull(sep->arg[2]), (unsigned long long) 2000000000));
|
||||
bool is_aa = aa_type.find("aa") != std::string::npos;
|
||||
|
||||
@@ -16,7 +16,7 @@ void command_setaaxp(Client *c, const Seperator *sep)
|
||||
target = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
std::string aa_type = str_tolower(sep->arg[1]);
|
||||
std::string aa_type = Strings::ToLower(sep->arg[1]);
|
||||
std::string group_raid_string;
|
||||
uint32 aa_experience = static_cast<uint32>(std::min(
|
||||
std::stoull(sep->arg[2]),
|
||||
|
||||
@@ -13,7 +13,7 @@ void command_setcrystals(Client *c, const Seperator *sep)
|
||||
target = c->GetTarget()->CastToClient();
|
||||
}
|
||||
|
||||
std::string crystal_type = str_tolower(sep->arg[1]);
|
||||
std::string crystal_type = Strings::ToLower(sep->arg[1]);
|
||||
uint32 crystal_amount = static_cast<uint32>(std::min(
|
||||
std::stoull(sep->arg[2]),
|
||||
(unsigned long long) 2000000000
|
||||
|
||||
@@ -55,7 +55,7 @@ void command_showskills(Client *c, const Seperator *sep)
|
||||
popup_title.c_str(),
|
||||
popup_text.c_str()
|
||||
);
|
||||
|
||||
|
||||
|
||||
c->Message(
|
||||
Chat::White,
|
||||
@@ -76,7 +76,7 @@ void command_showskills(Client *c, const Seperator *sep)
|
||||
next_skill_id
|
||||
);
|
||||
|
||||
auto next_list_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto next_list_link = Saylink::Create(
|
||||
next_list_string,
|
||||
false,
|
||||
next_list_string
|
||||
@@ -87,7 +87,7 @@ void command_showskills(Client *c, const Seperator *sep)
|
||||
next_skill_id
|
||||
);
|
||||
|
||||
auto next_list_all_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto next_list_all_link = Saylink::Create(
|
||||
next_list_all_string,
|
||||
false,
|
||||
next_list_all_string
|
||||
|
||||
@@ -63,11 +63,11 @@ void command_spawneditmass(Client *c, const Seperator *sep)
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Spawn2 ID: {} NPC ID: {} Name: {} Respawn Time: {} ({})",
|
||||
commify(spawn2_id),
|
||||
commify(npc_id),
|
||||
Strings::Commify(spawn2_id),
|
||||
Strings::Commify(npc_id),
|
||||
npc_name,
|
||||
ConvertSecondsToTime(std::stoi(respawn_time)),
|
||||
commify(respawn_time)
|
||||
Strings::SecondsToTime(std::stoi(respawn_time)),
|
||||
Strings::Commify(respawn_time)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -94,7 +94,7 @@ void command_spawneditmass(Client *c, const Seperator *sep)
|
||||
search_criteria
|
||||
).c_str()
|
||||
);
|
||||
|
||||
|
||||
if (!is_apply) {
|
||||
auto edit_link = fmt::format(
|
||||
"#spawneditmass {} {} {} apply",
|
||||
@@ -107,14 +107,14 @@ void command_spawneditmass(Client *c, const Seperator *sep)
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"To apply these changes, click {} or type \"{}\".",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink(edit_link, false, "apply"),
|
||||
Saylink::Create(edit_link, false, "apply"),
|
||||
edit_link
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
|
||||
if (edit_option == "respawn_time" && is_apply) {
|
||||
auto spawn2_ids_string = implode(", ", spawn2_ids);
|
||||
auto spawn2_ids_string = Strings::Implode(", ", spawn2_ids);
|
||||
if (spawn2_ids_string.empty()) {
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
@@ -144,5 +144,5 @@ void command_spawneditmass(Client *c, const Seperator *sep)
|
||||
spawn2_ids.size() != 1 ? "s" : ""
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void command_spawnstatus(Client *c, const Seperator *sep)
|
||||
filter_type = "Enabled";
|
||||
}
|
||||
|
||||
uint32 spawn_id = 0;
|
||||
uint32 spawn_id = 0;
|
||||
if (is_search) {
|
||||
spawn_id = std::stoul(sep->arg[1]);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ void command_spawnstatus(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"Spawn {} | Respawn: {} ({} Second{})",
|
||||
spawn_number,
|
||||
ConvertSecondsToTime(seconds_remaining),
|
||||
Strings::SecondsToTime(seconds_remaining),
|
||||
seconds_remaining,
|
||||
seconds_remaining != 1 ? "s" : ""
|
||||
).c_str()
|
||||
@@ -112,7 +112,7 @@ void command_spawnstatus(Client *c, const Seperator *sep)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (is_all) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
|
||||
@@ -31,7 +31,7 @@ void command_stun(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"You stunned {} for {}.",
|
||||
c->GetTargetDescription(target),
|
||||
ConvertMillisecondsToTime(duration)
|
||||
Strings::MillisecondsToTime(duration)
|
||||
) :
|
||||
fmt::format(
|
||||
"You unstunned {}.",
|
||||
|
||||
@@ -58,7 +58,7 @@ void command_suspend(Client *c, const Seperator *sep)
|
||||
std::string query = StringFormat(
|
||||
"UPDATE `account` SET `suspendeduntil` = DATE_ADD(NOW(), INTERVAL %i DAY), "
|
||||
"suspend_reason = '%s' WHERE `id` = %i",
|
||||
duration, EscapeString(message).c_str(), accountID
|
||||
duration, Strings::Escape(message).c_str(), accountID
|
||||
);
|
||||
auto results = database.QueryDatabase(query);
|
||||
|
||||
|
||||
+18
-18
@@ -18,7 +18,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] List active tasks for a client",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task show", false, "show")
|
||||
Saylink::Create("#task show", false, "show")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(Chat::White, "--- update <task_id> <activity_id> [count] | Updates task");
|
||||
@@ -28,42 +28,42 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload all Task information from the database",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reloadall", false, "reloadall")
|
||||
Saylink::Create("#task reloadall", false, "reloadall")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] <task_id> Reload Task and Activity information for a single task",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload task", false, "reload task")
|
||||
Saylink::Create("#task reload task", false, "reload task")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload goal/reward list information",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload lists", false, "reload lists")
|
||||
Saylink::Create("#task reload lists", false, "reload lists")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload proximity information",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload prox", false, "reload prox")
|
||||
Saylink::Create("#task reload prox", false, "reload prox")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload task set information",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload sets", false, "reload sets")
|
||||
Saylink::Create("#task reload sets", false, "reload sets")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Purges targeted characters task timers",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task purgetimers", false, "purgetimers")
|
||||
Saylink::Create("#task purgetimers", false, "purgetimers")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -74,7 +74,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Purges all active Shared Tasks in memory and database ",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task sharedpurge", false, "sharedpurge")
|
||||
Saylink::Create("#task sharedpurge", false, "sharedpurge")
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
@@ -112,7 +112,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] List active tasks for a client",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task show", false, "show")
|
||||
Saylink::Create("#task show", false, "show")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(Chat::White, "--- update <task_id> <activity_id> [count] | Updates task");
|
||||
@@ -122,42 +122,42 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload all Task information from the database",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reloadall", false, "reloadall")
|
||||
Saylink::Create("#task reloadall", false, "reloadall")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] <task_id> Reload Task and Activity information for a single task",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload task", false, "reload task")
|
||||
Saylink::Create("#task reload task", false, "reload task")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload goal/reward list information",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload lists", false, "reload lists")
|
||||
Saylink::Create("#task reload lists", false, "reload lists")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload proximity information",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload prox", false, "reload prox")
|
||||
Saylink::Create("#task reload prox", false, "reload prox")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Reload task set information",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task reload sets", false, "reload sets")
|
||||
Saylink::Create("#task reload sets", false, "reload sets")
|
||||
).c_str()
|
||||
);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Purges targeted characters task timers",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task purgetimers", false, "purgetimers")
|
||||
Saylink::Create("#task purgetimers", false, "purgetimers")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -168,7 +168,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"--- [{}] Purges all active Shared Tasks in memory and database ",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task sharedpurge", false, "sharedpurge")
|
||||
Saylink::Create("#task sharedpurge", false, "sharedpurge")
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
@@ -260,7 +260,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"[WARNING] This will purge all active Shared Tasks [{}]?",
|
||||
EQ::SayLinkEngine::GenerateQuestSaylink("#task sharedpurge confirm", false, "confirm")
|
||||
Saylink::Create("#task sharedpurge confirm", false, "confirm")
|
||||
).c_str()
|
||||
);
|
||||
|
||||
@@ -278,7 +278,7 @@ void command_task(Client *c, const Seperator *sep)
|
||||
|
||||
if (
|
||||
CompletedTasksRepository::DeleteWhere(
|
||||
database,
|
||||
database,
|
||||
fmt::format(
|
||||
"charid = {} AND taskid = {}",
|
||||
target->CharacterID(),
|
||||
|
||||
@@ -25,7 +25,7 @@ void command_timers(Client *c, const Seperator *sep)
|
||||
popup_text += fmt::format(
|
||||
"<tr><td>{}</td><td>{}</td></tr>",
|
||||
timer.first,
|
||||
ConvertSecondsToTime(remaining_time)
|
||||
Strings::SecondsToTime(remaining_time)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ void command_title(Client *c, const Seperator *sep)
|
||||
c->Message(Chat::White, "Usage: #title [Title] (use \"-1\" to remove title)");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
bool is_remove = !strcasecmp(sep->argplus[1], "-1");
|
||||
std::string title = is_remove ? "" : sep->argplus[1];
|
||||
|
||||
|
||||
auto target = c;
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
target = c->GetTarget()->CastToClient();
|
||||
@@ -23,7 +23,7 @@ void command_title(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if (!title.empty()) {
|
||||
find_replace(title, "_", " ");
|
||||
Strings::FindReplace(title, "_", " ");
|
||||
}
|
||||
|
||||
if (is_remove) {
|
||||
|
||||
@@ -11,10 +11,10 @@ void command_titlesuffix(Client *c, const Seperator *sep)
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
bool is_remove = !strcasecmp(sep->argplus[1], "-1");
|
||||
std::string suffix = is_remove ? "" : sep->argplus[1];
|
||||
|
||||
|
||||
auto target = c;
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
target = c->GetTarget()->CastToClient();
|
||||
@@ -26,7 +26,7 @@ void command_titlesuffix(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if (!suffix.empty()) {
|
||||
find_replace(suffix, "_", " ");
|
||||
Strings::FindReplace(suffix, "_", " ");
|
||||
}
|
||||
|
||||
if (is_remove) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "../client.h"
|
||||
|
||||
void command_viewcurrencies(Client *c, const Seperator *sep)
|
||||
{
|
||||
{
|
||||
Client *target = c;
|
||||
if (c->GetTarget() && c->GetTarget()->IsClient()) {
|
||||
target = c->GetTarget()->CastToClient();
|
||||
@@ -13,19 +13,19 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
||||
target->GetMoney(3, 2) +
|
||||
target->GetMoney(3, 3)
|
||||
);
|
||||
|
||||
|
||||
auto gold = (
|
||||
target->GetMoney(2, 0) +
|
||||
target->GetMoney(2, 1) +
|
||||
target->GetMoney(2, 2)
|
||||
);
|
||||
|
||||
|
||||
auto silver = (
|
||||
target->GetMoney(1, 0) +
|
||||
target->GetMoney(1, 1) +
|
||||
target->GetMoney(1, 2)
|
||||
);
|
||||
|
||||
|
||||
auto copper = (
|
||||
target->GetMoney(0, 0) +
|
||||
target->GetMoney(0, 1) +
|
||||
@@ -43,7 +43,7 @@ void command_viewcurrencies(Client *c, const Seperator *sep)
|
||||
fmt::format(
|
||||
"Money for {} | {}",
|
||||
c->GetTargetDescription(target, TargetDescriptionType::UCSelf),
|
||||
ConvertMoneyToString(
|
||||
Strings::Money(
|
||||
platinum,
|
||||
gold,
|
||||
silver,
|
||||
|
||||
@@ -30,7 +30,7 @@ void command_viewzoneloot(Client *c, const Seperator *sep)
|
||||
std::string npc_name = current_npc->GetCleanName();
|
||||
uint32 instance_id = zone->GetInstanceID();
|
||||
uint32 zone_id = zone->GetZoneID();
|
||||
std::string command_link = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
std::string command_link = Saylink::Create(
|
||||
fmt::format(
|
||||
"#{} {} {} {} {}",
|
||||
(instance_id != 0 ? "zoneinstance" : "zone"),
|
||||
|
||||
+16
-16
@@ -55,7 +55,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
std::string search_string;
|
||||
|
||||
if (sep->arg[1]) {
|
||||
search_string = str_tolower(sep->arg[1]);
|
||||
search_string = Strings::ToLower(sep->arg[1]);
|
||||
}
|
||||
|
||||
int found_count = 0;
|
||||
@@ -82,13 +82,13 @@ void command_who(Client *c, const Seperator *sep)
|
||||
|
||||
if (search_string.length()) {
|
||||
bool found_search_term = (
|
||||
str_tolower(player_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(zone_short_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(displayed_race_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(base_class_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(guild_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(account_name).find(search_string) != std::string::npos ||
|
||||
str_tolower(account_ip).find(search_string) != std::string::npos
|
||||
Strings::ToLower(player_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(zone_short_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(displayed_race_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(base_class_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(guild_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(account_name).find(search_string) != std::string::npos ||
|
||||
Strings::ToLower(account_ip).find(search_string) != std::string::npos
|
||||
);
|
||||
|
||||
if (!found_search_term) {
|
||||
@@ -98,7 +98,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
|
||||
std::string displayed_guild_name;
|
||||
if (guild_name.length()) {
|
||||
displayed_guild_name = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
displayed_guild_name = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who \"{}\"",
|
||||
guild_name
|
||||
@@ -111,7 +111,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
);
|
||||
}
|
||||
|
||||
auto goto_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto goto_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#goto {}",
|
||||
player_name
|
||||
@@ -120,7 +120,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
"Goto"
|
||||
);
|
||||
|
||||
auto summon_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto summon_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#summon {}",
|
||||
player_name
|
||||
@@ -134,7 +134,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
static_cast<uint8>(player_level)
|
||||
);
|
||||
|
||||
auto class_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto class_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
base_class_name
|
||||
@@ -143,7 +143,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
display_class_name
|
||||
);
|
||||
|
||||
auto race_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto race_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who %s",
|
||||
displayed_race_name
|
||||
@@ -152,7 +152,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
displayed_race_name
|
||||
);
|
||||
|
||||
auto zone_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto zone_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
zone_short_name
|
||||
@@ -161,7 +161,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
zone_long_name
|
||||
);
|
||||
|
||||
auto account_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto account_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
account_name
|
||||
@@ -170,7 +170,7 @@ void command_who(Client *c, const Seperator *sep)
|
||||
account_name
|
||||
);
|
||||
|
||||
auto account_ip_saylink = EQ::SayLinkEngine::GenerateQuestSaylink(
|
||||
auto account_ip_saylink = Saylink::Create(
|
||||
fmt::format(
|
||||
"#who {}",
|
||||
account_ip
|
||||
|
||||
@@ -10,7 +10,7 @@ void command_zone(Client *c, const Seperator *sep)
|
||||
|
||||
std::string zone_identifier = sep->arg[1];
|
||||
|
||||
if (StringIsNumber(zone_identifier) && zone_identifier == "0") {
|
||||
if (Strings::IsNumber(zone_identifier) && zone_identifier == "0") {
|
||||
c->Message(Chat::White, "Sending you to the safe coordinates of this zone.");
|
||||
|
||||
c->MovePC(
|
||||
|
||||
@@ -21,7 +21,7 @@ void command_zonelock(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string lock_type = str_tolower(sep->arg[1]);
|
||||
std::string lock_type = Strings::ToLower(sep->arg[1]);
|
||||
bool is_list = lock_type.find("list") != std::string::npos;
|
||||
bool is_lock = lock_type.find("lock") != std::string::npos;
|
||||
bool is_unlock = lock_type.find("unlock") != std::string::npos;
|
||||
@@ -54,7 +54,7 @@ void command_zonelock(Client *c, const Seperator *sep)
|
||||
static_cast<uint16>(std::stoul(sep->arg[2])) :
|
||||
static_cast<uint16>(ZoneID(sep->arg[2]))
|
||||
);
|
||||
std::string zone_short_name = str_tolower(ZoneName(zone_id, true));
|
||||
std::string zone_short_name = Strings::ToLower(ZoneName(zone_id, true));
|
||||
bool is_unknown_zone = zone_short_name.find("unknown") != std::string::npos;
|
||||
if (zone_id && !is_unknown_zone) {
|
||||
lock_zone->op = is_lock ? ServerLockType::Lock : ServerLockType::Unlock;
|
||||
|
||||
Reference in New Issue
Block a user