mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 06:28:22 +00:00
Move SendCommandHelpWindow to SendBotCommandHelpWindow and simplify
This commit is contained in:
@@ -7,17 +7,14 @@ void command_spell_delays(Client* c, const Seperator* sep)
|
||||
const bool is_help = !strcasecmp(sep->arg[1], "help");
|
||||
|
||||
if (is_help) {
|
||||
std::vector<std::string> description =
|
||||
{
|
||||
"Controls how often bots can cast certain spell types on you"
|
||||
};
|
||||
BotCommandHelpParams p;
|
||||
|
||||
std::vector<std::string> notes =
|
||||
p.description = { "Controls how often bots can cast certain spell types on you" };
|
||||
p.notes =
|
||||
{
|
||||
"- All pet types are control your how your pet will be affected"
|
||||
};
|
||||
|
||||
std::vector<std::string> example_format =
|
||||
p.example_format =
|
||||
{
|
||||
fmt::format(
|
||||
"{} [Type Shortname] [value]"
|
||||
@@ -28,7 +25,7 @@ void command_spell_delays(Client* c, const Seperator* sep)
|
||||
, sep->arg[0]
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_one =
|
||||
p.examples_one =
|
||||
{
|
||||
"To set Very Fast Heals to be received every 1 second:",
|
||||
fmt::format(
|
||||
@@ -42,7 +39,7 @@ void command_spell_delays(Client* c, const Seperator* sep)
|
||||
BotSpellTypes::VeryFastHeals
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_two =
|
||||
p.examples_two =
|
||||
{
|
||||
"To check your current Regular Heal delay:",
|
||||
fmt::format(
|
||||
@@ -56,26 +53,8 @@ void command_spell_delays(Client* c, const Seperator* sep)
|
||||
BotSpellTypes::RegularHeal
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_three = { };
|
||||
|
||||
std::vector<std::string> actionables = { };
|
||||
|
||||
std::vector<std::string> options = { };
|
||||
std::vector<std::string> options_one = { };
|
||||
std::vector<std::string> options_two = { };
|
||||
std::vector<std::string> options_three = { };
|
||||
|
||||
std::string popup_text = c->SendCommandHelpWindow(
|
||||
c,
|
||||
description,
|
||||
notes,
|
||||
example_format,
|
||||
examples_one, examples_two, examples_three,
|
||||
actionables,
|
||||
options,
|
||||
options_one, options_two, options_three
|
||||
);
|
||||
|
||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
|
||||
@@ -11,17 +11,14 @@ void command_spell_holds(Client *c, const Seperator *sep)
|
||||
const bool is_help = !strcasecmp(sep->arg[1], "help");
|
||||
|
||||
if (is_help) {
|
||||
std::vector<std::string> description =
|
||||
{
|
||||
"Toggles whether or not bots can cast certain spell types on you"
|
||||
};
|
||||
BotCommandHelpParams p;
|
||||
|
||||
std::vector<std::string> notes =
|
||||
p.description = { "Toggles whether or not bots can cast certain spell types on you" };
|
||||
p.notes =
|
||||
{
|
||||
"- All pet types are control your how your pet will be affected"
|
||||
};
|
||||
|
||||
std::vector<std::string> example_format =
|
||||
p.example_format =
|
||||
{
|
||||
fmt::format(
|
||||
"{} [Type Shortname] [value]"
|
||||
@@ -32,7 +29,7 @@ void command_spell_holds(Client *c, const Seperator *sep)
|
||||
, sep->arg[0]
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_one =
|
||||
p.examples_one =
|
||||
{
|
||||
"To set DoTs to be held:",
|
||||
fmt::format(
|
||||
@@ -46,7 +43,7 @@ void command_spell_holds(Client *c, const Seperator *sep)
|
||||
BotSpellTypes::DOT
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_two =
|
||||
p.examples_two =
|
||||
{
|
||||
"To check your current DoT settings:",
|
||||
fmt::format(
|
||||
@@ -60,26 +57,8 @@ void command_spell_holds(Client *c, const Seperator *sep)
|
||||
BotSpellTypes::DOT
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_three = { };
|
||||
|
||||
std::vector<std::string> actionables = { };
|
||||
|
||||
std::vector<std::string> options = { };
|
||||
std::vector<std::string> options_one = { };
|
||||
std::vector<std::string> options_two = { };
|
||||
std::vector<std::string> options_three = { };
|
||||
|
||||
std::string popup_text = c->SendCommandHelpWindow(
|
||||
c,
|
||||
description,
|
||||
notes,
|
||||
example_format,
|
||||
examples_one, examples_two, examples_three,
|
||||
actionables,
|
||||
options,
|
||||
options_one, options_two, options_three
|
||||
);
|
||||
|
||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
|
||||
@@ -7,17 +7,14 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
|
||||
const bool is_help = !strcasecmp(sep->arg[1], "help");
|
||||
|
||||
if (is_help) {
|
||||
std::vector<std::string> description =
|
||||
{
|
||||
"Threshold of your own health when bots will start casting the chosen spell type"
|
||||
};
|
||||
BotCommandHelpParams p;
|
||||
|
||||
std::vector<std::string> notes =
|
||||
p.description = { "Threshold of your own health when bots will start casting the chosen spell type" };
|
||||
p.notes =
|
||||
{
|
||||
"- All pet types are control your how your pet will be affected"
|
||||
};
|
||||
|
||||
std::vector<std::string> example_format =
|
||||
p.example_format =
|
||||
{
|
||||
fmt::format(
|
||||
"{} [Type Shortname] [value]"
|
||||
@@ -28,7 +25,7 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
|
||||
, sep->arg[0]
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_one =
|
||||
p.examples_one =
|
||||
{
|
||||
"To set Complete Heals to start at 90% health:",
|
||||
fmt::format(
|
||||
@@ -42,7 +39,7 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
|
||||
BotSpellTypes::CompleteHeal
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_two =
|
||||
p.examples_two =
|
||||
{
|
||||
"To check your current HoT Heal settings:",
|
||||
fmt::format(
|
||||
@@ -56,26 +53,8 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
|
||||
BotSpellTypes::HoTHeals
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_three = { };
|
||||
|
||||
std::vector<std::string> actionables = { };
|
||||
|
||||
std::vector<std::string> options = { };
|
||||
std::vector<std::string> options_one = { };
|
||||
std::vector<std::string> options_two = { };
|
||||
std::vector<std::string> options_three = { };
|
||||
|
||||
std::string popup_text = c->SendCommandHelpWindow(
|
||||
c,
|
||||
description,
|
||||
notes,
|
||||
example_format,
|
||||
examples_one, examples_two, examples_three,
|
||||
actionables,
|
||||
options,
|
||||
options_one, options_two, options_three
|
||||
);
|
||||
|
||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
|
||||
@@ -7,17 +7,14 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
|
||||
const bool is_help = !strcasecmp(sep->arg[1], "help");
|
||||
|
||||
if (is_help) {
|
||||
std::vector<std::string> description =
|
||||
{
|
||||
"Threshold of your own health when bots will stop casting the chosen spell type"
|
||||
};
|
||||
BotCommandHelpParams p;
|
||||
|
||||
std::vector<std::string> notes =
|
||||
p.description = { "Threshold of your own health when bots will stop casting the chosen spell type" };
|
||||
p.notes =
|
||||
{
|
||||
"- All pet types are control your how your pet will be affected"
|
||||
};
|
||||
|
||||
std::vector<std::string> example_format =
|
||||
p.example_format =
|
||||
{
|
||||
fmt::format(
|
||||
"{} [Type Shortname] [value]"
|
||||
@@ -28,7 +25,7 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
|
||||
, sep->arg[0]
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_one =
|
||||
p.examples_one =
|
||||
{
|
||||
"To set Fast Heals to be stopped at 65% health:",
|
||||
fmt::format(
|
||||
@@ -42,7 +39,7 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
|
||||
BotSpellTypes::FastHeals
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_two =
|
||||
p.examples_two =
|
||||
{
|
||||
"To check your current Cure settings:",
|
||||
fmt::format(
|
||||
@@ -56,26 +53,8 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
|
||||
BotSpellTypes::Cure
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_three = { };
|
||||
|
||||
std::vector<std::string> actionables = { };
|
||||
|
||||
std::vector<std::string> options = { };
|
||||
std::vector<std::string> options_one = { };
|
||||
std::vector<std::string> options_two = { };
|
||||
std::vector<std::string> options_three = { };
|
||||
|
||||
std::string popup_text = c->SendCommandHelpWindow(
|
||||
c,
|
||||
description,
|
||||
notes,
|
||||
example_format,
|
||||
examples_one, examples_two, examples_three,
|
||||
actionables,
|
||||
options,
|
||||
options_one, options_two, options_three
|
||||
);
|
||||
|
||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
|
||||
Reference in New Issue
Block a user