Move SendCommandHelpWindow to SendBotCommandHelpWindow and simplify

This commit is contained in:
nytmyr
2025-01-22 15:11:13 -06:00
parent 2301b91e77
commit e9d809301c
39 changed files with 620 additions and 1428 deletions
+11 -31
View File
@@ -3,24 +3,23 @@
void bot_command_spell_delays(Client* c, const Seperator* sep)
{
if (helper_command_alias_fail(c, "bot_command_spell_delays", sep->arg[0], "spelldelays")) {
c->Message(Chat::White, "note: Controls how long a bot will wait between casts of different spell types.");
return;
}
if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description =
{
"Controls how long a bot will wait between casts of different spell types"
};
BotCommandHelpParams p;
std::vector<std::string> notes =
p.description = { "Controls how long a bot will wait between casts of different spell types." };
p.notes =
{
"- All pet types are based off the pet's owner's setting",
"- Any remaining types use the owner's setting when a pet is the target",
"- All Heals, Cures, Buffs (DS and resists included) are based off the target's setting, not the caster",
"- e.g., BotA is healing BotB using BotB's settings",
};
std::vector<std::string> example_format =
p.example_format =
{
fmt::format(
"{} [Type Shortname] [value] [actionable]"
@@ -31,7 +30,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
p.examples_one =
{
"To set all Necromancers to an 8s DoT delay:",
fmt::format(
@@ -45,7 +44,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::DOT
)
};
std::vector<std::string> examples_two =
p.examples_two =
{
"To set all Warriors to receive Fast Heals every 2.5s:",
fmt::format(
@@ -59,7 +58,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals
)
};
std::vector<std::string> examples_three =
p.examples_three =
{
"To check the current Nuke delay on all bots:",
fmt::format(
@@ -73,28 +72,9 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::Nuke
)
};
p.actionables = { "target, byname, ownergroup, ownerraid targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables =
{
"target, byname, ownergroup, ownerraid targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned"
};
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());