mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
* [Rules] Add World:MaximumQuestErrors Rule # Notes - Allows operators to display more than 30 errors with #questerrors if they want. * Update quest_interface.h
34 lines
795 B
C++
Executable File
34 lines
795 B
C++
Executable File
#include "../client.h"
|
|
#include "../quest_parser_collection.h"
|
|
|
|
void command_questerrors(Client *c, const Seperator *sep)
|
|
{
|
|
std::list<std::string> quest_errors;
|
|
parse->GetErrors(quest_errors);
|
|
|
|
if (quest_errors.size()) {
|
|
c->Message(Chat::White, "Quest errors currently are as follows:");
|
|
|
|
int error_index = 0;
|
|
for (auto quest_error : quest_errors) {
|
|
if (error_index >= RuleI(World, MaximumQuestErrors)) {
|
|
c->Message(
|
|
Chat::White,
|
|
fmt::format(
|
|
"Maximum of {} error{} shown.",
|
|
RuleI(World, MaximumQuestErrors),
|
|
RuleI(World, MaximumQuestErrors) != 1 ? "s" : ""
|
|
).c_str()
|
|
);
|
|
break;
|
|
}
|
|
|
|
c->Message(Chat::White, quest_error.c_str());
|
|
error_index++;
|
|
}
|
|
} else {
|
|
c->Message(Chat::White, "There are no Quest errors currently.");
|
|
}
|
|
}
|
|
|