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
+5 -29
View File
@@ -4,16 +4,14 @@ void bot_command_actionable(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_actionable", sep->arg[0], "actionable")) { if (helper_command_alias_fail(c, "bot_command_actionable", sep->arg[0], "actionable")) {
c->Message(Chat::White, "note: Lists actionable command arguments and use descriptions"); c->Message(Chat::White, "note: Lists actionable command arguments and use descriptions");
return; return;
} }
std::vector<std::string> description = BotCommandHelpParams p;
{
"Lists actionable command arguments and use descriptions."
};
std::vector<std::string> notes = p.description = { "Lists actionable command arguments and use descriptions." };
{ p.notes = {
"[target] - uses the command on the target. Some commands will default to target if no actionable is selected.", "[target] - uses the command on the target. Some commands will default to target if no actionable is selected.",
"[byname] [name] - selects a bot by name their name.", "[byname] [name] - selects a bot by name their name.",
"[ownergroup] - selects all bots in the owner's group.", "[ownergroup] - selects all bots in the owner's group.",
@@ -32,29 +30,7 @@ void bot_command_actionable(Client* c, const Seperator* sep)
"You may only select your own bots." "You may only select your own bots."
}; };
std::vector<std::string> example_format = { }; std::string popup_text = c->SendBotCommandHelpWindow(p);
std::vector<std::string> examples_one = { };
std::vector<std::string> examples_two = { };
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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+17 -48
View File
@@ -3,64 +3,33 @@
void bot_command_behind_mob(Client* c, const Seperator* sep) void bot_command_behind_mob(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_behind_mob", sep->arg[0], "behindmob")) { if (helper_command_alias_fail(c, "bot_command_behind_mob", sep->arg[0], "behindmob")) {
c->Message(Chat::White, "note: Toggles whether or not bots will stay behind the mob during combat.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"-Toggles whether or not bots will stay behind the mob during combat." p.description = { "Toggles whether or not bots will stay behind the mob during combat." };
p.example_format = {
fmt::format("{} [value] [actionable]", sep->arg[0])
}; };
p.examples_one = {
std::vector<std::string> notes = { };
std::vector<std::string> example_format =
{
fmt::format(
"{} [value] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{
"To set Monks to stay behind the mob:", "To set Monks to stay behind the mob:",
fmt::format( fmt::format("{} 1 byclass 7", sep->arg[0])
"{} 1 byclass 7",
sep->arg[0]
)
}; };
std::vector<std::string> examples_two = { }; p.examples_two = {
std::vector<std::string> examples_three = "To force all bots to stay behind mobs:",
{ fmt::format("{} 1 spawned", sep->arg[0])
"To check the behind mob status for all bots:",
fmt::format(
"{} current spawned",
sep->arg[0]
)
}; };
p.examples_three = {
std::vector<std::string> actionables = "To check the behind mob status of all bots:",
{ fmt::format("{} current spawned", sep->arg[0])
"target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned"
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> options = { }; std::string popup_text = c->SendBotCommandHelpWindow(p);
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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+36 -89
View File
@@ -8,72 +8,35 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
return; return;
} }
if (helper_command_alias_fail(c, "bot_command_blocked_buffs", sep->arg[0], "blockedbuffs")) {
c->Message(Chat::White, "note: Allows you to set, view and wipe blocked buffs for the selected bots.");
return;
}
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Allows you to set, view and wipe blocked buffs for the selected bots"
};
std::vector<std::string> notes = p.description = { "Allows you to set, view and wipe blocked buffs for the selected bots." };
{ p.notes = { "- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list." };
"- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list." p.example_format = {
fmt::format("{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]", sep->arg[0])
}; };
p.examples_one = {
std::vector<std::string> example_format =
{
fmt::format(
"{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{
"To add Courage(Spell ID #202) to the targeted bot's blocked list:", "To add Courage(Spell ID #202) to the targeted bot's blocked list:",
fmt::format( fmt::format("{} add 202", sep->arg[0])
"{} add 202",
sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke)
)
}; };
std::vector<std::string> examples_two = p.examples_two = {
{
"To view the targeted bot's blocked buff list:", "To view the targeted bot's blocked buff list:",
fmt::format( fmt::format("{} list", sep->arg[0])
"{} list",
sep->arg[0]
)
}; };
std::vector<std::string> examples_three = p.examples_three = {
{
"To wipe all Warriors bots' blocked buff list:", "To wipe all Warriors bots' blocked buff list:",
fmt::format( fmt::format( "{} wipe byclass {}", sep->arg[0], Class::Warrior)
"{} wipe byclass {}",
sep->arg[0],
Class::Warrior
)
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
@@ -265,26 +228,29 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_command_alias_fail(c, "bot_command_blocked_pet_buffs", sep->arg[0], "blockedpetbuffs")) {
std::vector<std::string> description = c->Message(Chat::White, "note: Allows you to set, view and wipe blocked pet buffs for the selected bots.");
{
"Allows you to set, view and wipe blocked pet buffs for the selected bots"
};
std::vector<std::string> notes = return;
}
if (helper_is_help_or_usage(sep->arg[1])) {
BotCommandHelpParams p;
p.description = { "Allows you to set, view and wipe blocked pet buffs for the selected bots." };
p.notes =
{ {
"- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list.", "- You can 'set' spells to be blocked, 'remove' spells from the blocked list, 'list' the current blocked spells or 'wipe' the entire list.",
"- This controls whether or not any pet the selected bot(s) own will prevent certain buffs from being cast." "- This controls whether or not any pet the selected bot(s) own will prevent certain beneficial buffs from landing on them."
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]" "{} [add [ID] | remove [ID] | list | wipe] [actionable, default: target]"
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To add Courage (Spell ID #202) to the targeted bot's blocked list:", "To add Courage (Spell ID #202) to the targeted bot's blocked list:",
fmt::format( fmt::format(
@@ -293,7 +259,7 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke) c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke)
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To view the targeted bot's blocked buff list:", "To view the targeted bot's blocked buff list:",
fmt::format( fmt::format(
@@ -301,7 +267,7 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To wipe all Warriors bots' blocked buff list:", "To wipe all Warriors bots' blocked buff list:",
fmt::format( fmt::format(
@@ -310,28 +276,9 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
Class::Warrior Class::Warrior
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+31 -99
View File
@@ -472,52 +472,32 @@ void bot_command_delete(Client *c, const Seperator *sep)
void bot_command_follow_distance(Client *c, const Seperator *sep) void bot_command_follow_distance(Client *c, const Seperator *sep)
{ {
if (helper_command_alias_fail(c, "bot_command_follow_distance", sep->arg[0], "botfollowdistance")) { if (helper_command_alias_fail(c, "bot_command_follow_distance", sep->arg[0], "botfollowdistance")) {
c->Message(Chat::White, "note: Sets or resets the follow distance of the selected bots.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Sets or resets the follow distance of the selected bots."
};
std::vector<std::string> notes = p.description = { "Sets or resets the follow distance of the selected bots." };
p.notes =
{ {
fmt::format( fmt::format("[Default]: {}", RuleI(Bots, MaxFollowDistance)),
"[Default]: {}", fmt::format("- You must use a value between 1 and {}.", RuleI(Bots, MaxFollowDistance))
RuleI(Bots, MaxFollowDistance)
),
fmt::format(
"- You must use a value between 1 and {}.",
RuleI(Bots, MaxFollowDistance)
)
}; };
p.example_format = {
std::vector<std::string> example_format = fmt::format("{} [reset]/[set [value]] [actionable]", sep->arg[0])
{
fmt::format(
"{} [reset]/[set [value]] [actionable]"
, sep->arg[0]
)
}; };
std::vector<std::string> examples_one = p.examples_one = {
{
"To set all bots to follow at a distance of 25:", "To set all bots to follow at a distance of 25:",
fmt::format( fmt::format("{} set 25 spawned", sep->arg[0])
"{} set 25 spawned",
sep->arg[0]
)
}; };
std::vector<std::string> examples_two = p.examples_two = {
{
"To check the curret following distance of all bots:", "To check the curret following distance of all bots:",
fmt::format( fmt::format("{} current spawned", sep->arg[0])
"{} current spawned",
sep->arg[0]
)
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To reset the following distance of all Wizards:", "To reset the following distance of all Wizards:",
fmt::format( fmt::format(
@@ -526,28 +506,9 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
Class::Wizard Class::Wizard
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
@@ -1187,17 +1148,16 @@ void bot_command_spawn(Client *c, const Seperator *sep)
void bot_command_stance(Client *c, const Seperator *sep) void bot_command_stance(Client *c, const Seperator *sep)
{ {
if (helper_command_alias_fail(c, "bot_command_stance", sep->arg[0], "botstance")) { if (helper_command_alias_fail(c, "bot_command_stance", sep->arg[0], "botstance")) {
c->Message(Chat::White, "note: Change a bot's stance to control the way it behaves.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Change a bot's stance to control the way it behaves."
};
std::vector<std::string> notes = p.description = { "Change a bot's stance to control the way it behaves." };
{ p.notes = {
"- <b>Changing a stance will reset all settings to match that stance type.</b>", "- <b>Changing a stance will reset all settings to match that stance type.</b>",
"- Any changes made will only save to that stance for future use.", "- Any changes made will only save to that stance for future use.",
fmt::format( fmt::format(
@@ -1262,65 +1222,37 @@ void bot_command_stance(Client *c, const Seperator *sep)
) )
}; };
std::vector<std::string> example_format = p.example_format = {
{ fmt::format( "{} [current | value: {}-{}]",
fmt::format(
"{} [current | value: {}-{}]",
sep->arg[0], sep->arg[0],
Stance::Passive, Stance::Passive,
Stance::AEBurn Stance::AEBurn
) )
}; };
std::vector<std::string> examples_one = p.examples_one = {
{
"To set all bots to BurnAE:", "To set all bots to BurnAE:",
fmt::format( fmt::format("{} {} spawned {}",
"{} {} spawned {}",
sep->arg[0], sep->arg[0],
Stance::Aggressive, Stance::Aggressive,
Class::ShadowKnight Class::ShadowKnight
) )
}; };
std::vector<std::string> examples_two = p.examples_two = {
{
"To set all Shadowknights to Aggressive:", "To set all Shadowknights to Aggressive:",
fmt::format( fmt::format("{} {} byclass {}",
"{} {} byclass {}",
sep->arg[0], sep->arg[0],
Stance::Aggressive, Stance::Aggressive,
Class::ShadowKnight Class::ShadowKnight
) )
}; };
std::vector<std::string> examples_three = p.examples_three = {
{
"To check the current stances of all bots:", "To check the current stances of all bots:",
fmt::format( fmt::format("{} current spawned", sep->arg[0])
"{} current spawned",
sep->arg[0]
)
}; };
std::vector<std::string> actionables = p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
{
"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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
-1
View File
@@ -19,7 +19,6 @@ void bot_command_bot_settings(Client* c, const Seperator* sep)
"sithppercent", "sithppercent",
"sitincombat", "sitincombat",
"sitmanapercent", "sitmanapercent",
"sithppercent",
"spellaggrocheck", "spellaggrocheck",
"spelldelays", "spelldelays",
"spellengagedpriority", "spellengagedpriority",
+23 -39
View File
@@ -2,13 +2,17 @@
void bot_command_cast(Client* c, const Seperator* sep) void bot_command_cast(Client* c, const Seperator* sep)
{ {
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_command_alias_fail(c, "bot_command_cast", sep->arg[0], "cast")) {
std::vector<std::string> description = c->Message(Chat::White, "note: Commands bots to force cast a specific spell type, ignoring all settings (holds, delays, thresholds, etc).");
{
"Commands bots to force cast a specific spell type, ignoring all settings (holds, delays, thresholds, etc)"
};
std::vector<std::string> notes = return;
}
if (helper_is_help_or_usage(sep->arg[1])) {
BotCommandHelpParams p;
p.description = { "Commands bots to force cast a specific spell type, ignoring all settings (holds, delays, thresholds, etc)." };
p.notes =
{ {
"- This will interrupt any spell currently being cast by bots told to use the command", "- This will interrupt any spell currently being cast by bots told to use the command",
"- Bots will still check to see if they have the spell in their spell list, whether the target is immune, spell is allowed and all other sanity checks for spells", "- Bots will still check to see if they have the spell in their spell list, whether the target is immune, spell is allowed and all other sanity checks for spells",
@@ -19,19 +23,12 @@ void bot_command_cast(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format("{} [Type Shortname] [actionable, default: spawned]", sep->arg[0]),
"{} [Type Shortname] [actionable, default: spawned]" fmt::format("{} [Type ID] [actionable, default: spawned]", sep->arg[0])
, sep->arg[0]
),
fmt::format(
"{} [Type ID] [actionable, default: spawned]"
, sep->arg[0]
)
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To tell everyone to Nuke the target:", "To tell everyone to Nuke the target:",
fmt::format( fmt::format(
@@ -45,7 +42,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
BotSpellTypes::Nuke BotSpellTypes::Nuke
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To tell Skbot to Harm Touch the target:", "To tell Skbot to Harm Touch the target:",
fmt::format( fmt::format(
@@ -57,7 +54,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To tell all bots to try to cast spell #93 (Burst of Flame)", "To tell all bots to try to cast spell #93 (Burst of Flame)",
fmt::format( fmt::format(
@@ -65,28 +62,10 @@ void bot_command_cast(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
@@ -609,8 +588,13 @@ void bot_command_cast(Client* c, const Seperator* sep)
type = "Forced"; type = "Forced";
} }
else { else {
if (sub_type == UINT16_MAX) {
type = c->GetSpellTypeNameByID(spell_type); type = c->GetSpellTypeNameByID(spell_type);
} }
else {
type = c->GetSubTypeNameByID(sub_type);
}
}
if (!is_success) { if (!is_success) {
c->Message( c->Message(
+16 -37
View File
@@ -3,28 +3,30 @@
void bot_command_copy_settings(Client* c, const Seperator* sep) void bot_command_copy_settings(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_copy_settings", sep->arg[0], "copysettings")) { if (helper_command_alias_fail(c, "bot_command_copy_settings", sep->arg[0], "copysettings")) {
c->Message(Chat::White, "note: Copies settings from one bot to another.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Copies settings from one bot to another bot"
};
std::vector<std::string> notes = p.description =
{
"Copies settings from one bot to another."
};
p.notes =
{ {
"- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only" "- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only"
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [from] [to] [option]" "{} [from] [to] [option]"
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To copy all settings from BotA to BotB:", "To copy all settings from BotA to BotB:",
fmt::format( fmt::format(
@@ -32,7 +34,7 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To copy only Nuke spelltypesettings from BotA to BotB:", "To copy only Nuke spelltypesettings from BotA to BotB:",
fmt::format( fmt::format(
@@ -46,17 +48,8 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke) c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke)
), ),
}; };
std::vector<std::string> examples_three = { }; p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
p.options = { "[all], [misc], [spellsettings], [spelltypesettings], [spellholds], [spelldelays], [spellminthresholds], [spellmaxthresholds], [spellminmanapct], [spellmaxmanapct], [spellminhppct], [spellmaxhppct], [spellidlepriority], [spellengagedpriority], [spellpursuepriority], [spellaggrochecks], [spelltargetcounts], [sithppercent], [sitmanapercent], [blockedbuffs], [blockedpetbuffs]" };
std::vector<std::string> actionables =
{
"target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned"
};
std::vector<std::string> options =
{
"[all], [misc], [spellsettings], [spelltypesettings], [spellholds], [spelldelays], [spellminthresholds], [spellmaxthresholds], [spellminmanapct], [spellmaxmanapct], [spellminhppct], [spellmaxhppct], [spellidlepriority], [spellengagedpriority], [spellpursuepriority], [spellaggrochecks], [spelltargetcounts], [sithppercent], [sitmanapercent], [blockedbuffs], [blockedpetbuffs]"
};
std::vector<std::string> options_one = std::vector<std::string> options_one =
{ {
"[spellsettings] will copy ^spellsettings options", "[spellsettings] will copy ^spellsettings options",
@@ -66,25 +59,11 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
std::vector<std::string> options_two = std::vector<std::string> options_two =
{ {
"[misc] copies all miscellaneous options such as:", "[misc] copies all miscellaneous options such as:",
"- ^showhelm, ^followd, ^stopmeleelevel, ^enforcespellsettings, ^bottoggleranged, ^petsettype, ^behindmob, ^distanceranged, ^illusionblock, ^sitincombat, ^sithppercent, ^sitmanapercent, ^blockedbuffs, ^blockedpetbuffs", "- ^showhelm, ^followd, ^stopmeleelevel, ^enforcespellsettings, ^bottoggleranged, ^petsettype, ^behindmob, ^distanceranged, ^illusionblock, ^sitincombat, ^sithppercent, ^sitmanapercent, ^blockedbuffs, ^blockedpetbuffs"
};
std::vector<std::string> options_three =
{
"The remaining options copy that specific type"
}; };
std::vector<std::string> options_three = { "The remaining options copy that specific type" };
std::string popup_text = c->SendCommandHelpWindow( std::string popup_text = c->SendBotCommandHelpWindow(p);
c,
description,
notes,
example_format,
examples_one, examples_two, examples_three,
actionables,
options,
options_one, options_two, options_three
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+15 -45
View File
@@ -3,28 +3,21 @@
void bot_command_default_settings(Client* c, const Seperator* sep) void bot_command_default_settings(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_default_settings", sep->arg[0], "defaultsettings")) { if (helper_command_alias_fail(c, "bot_command_default_settings", sep->arg[0], "defaultsettings")) {
c->Message(Chat::White, "note: Restores a bot's setting(s) to defaults.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Restores a bot's setting(s) to defaults"
};
std::vector<std::string> notes = p.description = { "Restores a bot's setting(s) to defaults" };
p.notes = { "- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only"};
p.example_format =
{ {
"- You can put a spell type ID or shortname after any option except [all], [misc] and [spellsettings] to restore that specifc spell type only" fmt::format("{} [option] [actionable]", sep->arg[0])
}; };
p.examples_one =
std::vector<std::string> example_format =
{
fmt::format(
"{} [option] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To restore delays for Clerics:", "To restore delays for Clerics:",
fmt::format( fmt::format(
@@ -32,7 +25,7 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To restore only Snare delays for BotA:", "To restore only Snare delays for BotA:",
fmt::format( fmt::format(
@@ -46,48 +39,25 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_three = { }; p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
p.options = { "all, misc, spellsettings, spelltypesettings, holds, delays, minthresholds, maxthresholds minmanapct, maxmanapct, minhppct, maxhppct, idlepriority, engagedpriority, pursuepriority, aggrocheck, targetcounts" };
std::vector<std::string> actionables = p.options_one =
{
"target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned"
};
std::vector<std::string> options =
{
"all, misc, spellsettings, spelltypesettings, holds, delays, minthresholds, maxthresholds minmanapct, maxmanapct, minhppct, maxhppct, idlepriority, engagedpriority, pursuepriority, aggrocheck, targetcounts"
};
std::vector<std::string> options_one =
{ {
"[spellsettings] will restore ^spellsettings options", "[spellsettings] will restore ^spellsettings options",
"[spelltypesettings] restores all spell type settings", "[spelltypesettings] restores all spell type settings",
"[all] restores all settings" "[all] restores all settings"
}; };
std::vector<std::string> options_two = p.options_two =
{ {
"[misc] restores all miscellaneous options such as:", "[misc] restores all miscellaneous options such as:",
"- ^showhelm, ^followd, ^stopmeleelevel", "- ^showhelm, ^followd, ^stopmeleelevel",
"- ^enforcespellsettings, ^bottoggleranged, ^petsettype", "- ^enforcespellsettings, ^bottoggleranged, ^petsettype",
"- ^behindmob, ^distanceranged, ^illusionblock", "- ^behindmob, ^distanceranged, ^illusionblock",
"- ^sitincombat, ^sithppercent and ^sitmanapercent", "- ^sitincombat, ^sithppercent and ^sitmanapercent",
};
std::vector<std::string> options_three =
{
"The remaining options restore that specific type"
}; };
p.options_three = { "The remaining options restore that specific type" };
std::string popup_text = c->SendCommandHelpWindow( std::string popup_text = c->SendBotCommandHelpWindow(p);
c,
description,
notes,
example_format,
examples_one, examples_two, examples_three,
actionables,
options,
options_one, options_two, options_three
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+16 -38
View File
@@ -2,26 +2,23 @@
void bot_command_depart(Client* c, const Seperator* sep) void bot_command_depart(Client* c, const Seperator* sep)
{ {
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_command_alias_fail(c, "bot_command_depart", sep->arg[0], "depart")) {
std::vector<std::string> description = c->Message(Chat::White, "note: Tells bots to list their port locations or port to a specific location.");
{
"Tells bots to list their port locations or port to a specific location"
};
std::vector<std::string> notes = return;
}
if (helper_is_help_or_usage(sep->arg[1])) {
BotCommandHelpParams p;
p.description = { "Tells bots to list their port locations or port to a specific location." };
p.notes =
{ {
"- This will interrupt any spell currently being cast by bots told to use the command.", "- This will interrupt any spell currently being cast by bots told to use the command.",
"- Bots will still check to see if they have the spell in their spell list, whether the target is immune, spell is allowed and all other sanity checks for spells" "- Bots will still check to see if they have the spell in their spell list, whether the target is immune, spell is allowed and all other sanity checks for spells"
}; };
p.example_format = { fmt::format("{} [list | zone shortname] [optional: single | group | ae] [actionable, default: spawned]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [list | zone shortname] [optional: single | group | ae] [actionable, default: spawned]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To tell everyone to list their portable locations:", "To tell everyone to list their portable locations:",
fmt::format( fmt::format(
@@ -29,7 +26,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To tell all bots to port to Nexus:", "To tell all bots to port to Nexus:",
fmt::format( fmt::format(
@@ -37,7 +34,7 @@ void bot_command_depart(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To tell Druidbot to single target port to Butcher:", "To tell Druidbot to single target port to Butcher:",
fmt::format( fmt::format(
@@ -45,28 +42,9 @@ void bot_command_depart(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+15 -35
View File
@@ -3,25 +3,24 @@
void bot_command_discipline(Client* c, const Seperator* sep) void bot_command_discipline(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_discipline", sep->arg[0], "discipline")) { if (helper_command_alias_fail(c, "bot_command_discipline", sep->arg[0], "discipline")) {
c->Message(Chat::White, "note: Tells applicable bots to use the specified disciplines.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Tells applicable bots to use the specified disciplines"
};
std::vector<std::string> notes = { }; p.description =
std::vector<std::string> example_format =
{ {
fmt::format( "Tells applicable bots to use the specified disciplines."
"{} [aggressive | defensive | spell ID] [actionable, default: spawned]"
, sep->arg[0]
)
}; };
std::vector<std::string> examples_one = p.notes = { "Aside from Lay On Hands and Harm Touch, you will need to know the spell ID of the discipline to tell a bot to attempt to use it." };
p.example_format =
{
fmt::format("{} [aggressive | defensive | spell ID] [actionable, default: spawned]", sep->arg[0])
};
p.examples_one =
{ {
"To tell all bots to use an aggressive discipline:", "To tell all bots to use an aggressive discipline:",
fmt::format( fmt::format(
@@ -29,7 +28,7 @@ void bot_command_discipline(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To tell Warrior bots to use a defensive discipline:", "To tell Warrior bots to use a defensive discipline:",
fmt::format( fmt::format(
@@ -38,7 +37,7 @@ void bot_command_discipline(Client* c, const Seperator* sep)
Class::Warrior Class::Warrior
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To tell all bots to use their Fearless discipline:", "To tell all bots to use their Fearless discipline:",
fmt::format( fmt::format(
@@ -46,28 +45,9 @@ void bot_command_discipline(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+55 -1
View File
@@ -3,16 +3,70 @@
void bot_command_distance_ranged(Client* c, const Seperator* sep) void bot_command_distance_ranged(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_distance_ranged", sep->arg[0], "distanceranged")) { if (helper_command_alias_fail(c, "bot_command_distance_ranged", sep->arg[0], "distanceranged")) {
c->Message(Chat::White, "note: Sets the distance bots will attempt to stay away from their target to cast or use ranged items.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
BotCommandHelpParams p;
p.description = { "Sets the distance bots will attempt to stay away from their target to cast or use ranged items." };
p.notes =
{
"- Bots will stay between half the value of the setting and the current value. IE, if set to 60, bots will stay between 30 and 60.",
"- Casters will never go closer than their maximum melee range.",
"- Throwing bots will never get closer than the minimum value for ranged to work, or beyond the range of their items."
};
p.example_format = {
fmt::format("{} [value] [actionable]", sep->arg[0])
};
p.examples_one = {
"To set Wizards to a range of 100:",
fmt::format(
"{} 100 byclass {}",
sep->arg[0],
Class::Wizard
)
};
p.examples_two = {
"To set Rangers to a range of 175:",
fmt::format(
"{} 175 byclass {}",
sep->arg[0],
Class::Ranger
)
};
p.examples_three = {
"To view the current setting of all bots:",
fmt::format(
"{} current spawned",
sep->arg[0]
)
};
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::string popup_text = c->SendBotCommandHelpWindow(p);
popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
if (RuleB(Bots, SendClassRaceOnHelp)) {
c->Message(
Chat::Yellow,
fmt::format(
"Use {} for information about race/class IDs.",
Saylink::Silent("^classracelist")
).c_str()
);
}
return;
c->Message(Chat::White, "usage: %s [current | value: 0 - 300] ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | healrotationtargets | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]); c->Message(Chat::White, "usage: %s [current | value: 0 - 300] ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | healrotationtargets | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]);
c->Message(Chat::White, "note: Use [current] to check the current setting."); c->Message(Chat::White, "note: Use [current] to check the current setting.");
c->Message(Chat::White, "note: Set the value to the minimum distance you want your bot to try to remain from its target."); c->Message(Chat::White, "note: Set the value to the minimum distance you want your bot to try to remain from its target.");
c->Message(Chat::White, "note: If they are too far for a spell, it will be skipped."); c->Message(Chat::White, "note: If they are too far for a spell, it will be skipped.");
c->Message(Chat::White, "note: This is set to (90) units by default."); c->Message(Chat::White, "note: This is set to (90) units by default.");
return;
} }
const int ab_mask = ActionableBots::ABM_Type1; const int ab_mask = ActionableBots::ABM_Type1;
+11 -40
View File
@@ -3,28 +3,18 @@
void bot_command_follow(Client* c, const Seperator* sep) void bot_command_follow(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_follow", sep->arg[0], "follow")) { if (helper_command_alias_fail(c, "bot_command_follow", sep->arg[0], "follow")) {
c->Message(Chat::White, "note: Sets bots of your choosing to follow your target, view their current following state or reset their following state.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Sets bots of your choosing to follow your target, view their current following state or reset their following state."
};
std::vector<std::string> notes = p.description = { "Sets bots of your choosing to follow your target, view their current following state or reset their following state." };
{ p.notes = { "- You can only follow players, bots or mercenaries belonging to your group or raid." };
"- You can only follow players, bots or mercenaries belonging to your group or raid." p.example_format = { fmt::format("{} [optional] [actionable]", sep->arg[0]) };
}; p.examples_one =
std::vector<std::string> example_format =
{
fmt::format(
"{} [optional] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To set all Clerics to follow your target:", "To set all Clerics to follow your target:",
fmt::format( fmt::format(
@@ -33,7 +23,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
Class::Cleric Class::Cleric
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To check the current state of all bots:", "To check the current state of all bots:",
fmt::format( fmt::format(
@@ -41,7 +31,7 @@ void bot_command_follow(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To reset all bots:", "To reset all bots:",
fmt::format( fmt::format(
@@ -49,28 +39,9 @@ void bot_command_follow(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+17 -37
View File
@@ -3,25 +3,17 @@
void bot_command_illusion_block(Client* c, const Seperator* sep) void bot_command_illusion_block(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_illusion_block", sep->arg[0], "illusionblock")) { if (helper_command_alias_fail(c, "bot_command_illusion_block", sep->arg[0], "illusionblock")) {
c->Message(Chat::White, "note: Toggles whether or not bots will block the illusion effects of spells cast by players or bots.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Toggles whether or not bots will block the illusion effects of spells cast by players or bots."
};
std::vector<std::string> notes = { }; p.description = { "Toggles whether or not bots will block the illusion effects of spells cast by players or bots." };
p.example_format = { fmt::format("{} [value] [actionable]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [value] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To set BotA to block illusions:", "To set BotA to block illusions:",
fmt::format( fmt::format(
@@ -29,8 +21,15 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = { }; p.examples_two =
std::vector<std::string> examples_three = {
"To set all bots to block illusions:",
fmt::format(
"{} 1 spawned",
sep->arg[0]
)
};
p.examples_three =
{ {
"To check the illusion block status for all bots:", "To check the illusion block status for all bots:",
fmt::format( fmt::format(
@@ -38,28 +37,9 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+17 -37
View File
@@ -3,25 +3,17 @@
void bot_command_max_melee_range(Client* c, const Seperator* sep) void bot_command_max_melee_range(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_max_melee_range", sep->arg[0], "maxmeleerange")) { if (helper_command_alias_fail(c, "bot_command_max_melee_range", sep->arg[0], "maxmeleerange")) {
c->Message(Chat::White, "note: Toggles whether or not bots will stay at max melee range during combat.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Toggles whether or not bots will stay at max melee range during combat."
};
std::vector<std::string> notes = { }; p.description = { "Toggles whether or not bots will stay at max melee range during combat."};
p.example_format ={ fmt::format("{} [value] [actionable]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [value] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To set BotA to stay at max melee range:", "To set BotA to stay at max melee range:",
fmt::format( fmt::format(
@@ -29,8 +21,15 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = { }; p.examples_two =
std::vector<std::string> examples_three = {
"To set all bots to stay at max melee range:",
fmt::format(
"{} 1 spawned",
sep->arg[0]
)
};
p.examples_three =
{ {
"To check the max melee range status for all bots:", "To check the max melee range status for all bots:",
fmt::format( fmt::format(
@@ -38,28 +37,9 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -37
View File
@@ -97,25 +97,17 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
void bot_command_pet_set_type(Client *c, const Seperator *sep) void bot_command_pet_set_type(Client *c, const Seperator *sep)
{ {
if (helper_command_alias_fail(c, "bot_command_pet_set_type", sep->arg[0], "petsettype")) { if (helper_command_alias_fail(c, "bot_command_pet_set_type", sep->arg[0], "petsettype")) {
c->Message(Chat::White, "note: Allows you to change the type of pet Magician bots will cast.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Allows you to change the type of pet Magician bots will cast"
};
std::vector<std::string> notes = {}; p.description = { "Allows you to change the type of pet Magician bots will cast." };
p.example_format = { fmt::format("{} [current | water | fire | air | earth | monster | epic] [actionable, default: target]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [current | water | fire | air | earth | monster | epic] [actionable, default: target]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To set all spawned bots to use Water pets:", "To set all spawned bots to use Water pets:",
fmt::format( fmt::format(
@@ -123,7 +115,7 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set Magelulz to use Fire pets:", "To set Magelulz to use Fire pets:",
fmt::format( fmt::format(
@@ -131,7 +123,7 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current pet type for all bots:", "To check the current pet type for all bots:",
fmt::format( fmt::format(
@@ -139,28 +131,9 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+13 -30
View File
@@ -2,41 +2,24 @@
void bot_command_set_assistee(Client* c, const Seperator* sep) void bot_command_set_assistee(Client* c, const Seperator* sep)
{ {
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_command_alias_fail(c, "bot_command_set_assistee", sep->arg[0], "setassistee")) {
std::vector<std::string> description = c->Message(Chat::White, "note: Sets your bots to assist your target in addition to yourself.");
{
"Sets your bots to assist your target in addition to yourself"
};
std::vector<std::string> notes = return;
}
if (helper_is_help_or_usage(sep->arg[1])) {
BotCommandHelpParams p;
p.description = { "Sets your bots to assist your target in addition to yourself." };
p.notes =
{ {
"- Your target must be another player in your group or raid.", "- Your target must be another player in your group or raid.",
"- This needs to be set on every zone/camp you do." "- This needs to be set on every zone/camp you do.",
"- If a Raid or Group assist is set and you do not want your bots to auto assist that person, set yourself as the assistee."
}; };
std::vector<std::string> example_format = { }; std::string popup_text = c->SendBotCommandHelpWindow(p);
std::vector<std::string> examples_one = { };
std::vector<std::string> examples_two = { };
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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+17 -37
View File
@@ -3,25 +3,17 @@
void bot_command_sit_hp_percent(Client* c, const Seperator* sep) void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_sit_hp_percent", sep->arg[0], "sithppercent")) { if (helper_command_alias_fail(c, "bot_command_sit_hp_percent", sep->arg[0], "sithppercent")) {
c->Message(Chat::White, "note: HP % threshold when bots will sit in combat if allowed.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"HP % threshold when bots will sit in combat if allowed."
};
std::vector<std::string> notes = { }; p.description = { "HP % threshold when bots will sit in combat if allowed." };
p.example_format = { fmt::format("{} [value] [actionable]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [value] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To set Clerics to sit at 45% HP:", "To set Clerics to sit at 45% HP:",
fmt::format( fmt::format(
@@ -29,8 +21,15 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = { }; p.examples_two =
std::vector<std::string> examples_three = {
"To set all bots to sit at 50% HP:",
fmt::format(
"{} 50 spawned",
sep->arg[0]
)
};
p.examples_three =
{ {
"To check the HP threshold for all bots:", "To check the HP threshold for all bots:",
fmt::format( fmt::format(
@@ -38,28 +37,9 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+17 -37
View File
@@ -3,25 +3,17 @@
void bot_command_sit_in_combat(Client* c, const Seperator* sep) void bot_command_sit_in_combat(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_sit_in_combat", sep->arg[0], "sitincombat")) { if (helper_command_alias_fail(c, "bot_command_sit_in_combat", sep->arg[0], "sitincombat")) {
c->Message(Chat::White, "note: Toggles whether or not bots will sit in combat to heal or med.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Toggles whether or not bots will sit in combat to heal or med."
};
std::vector<std::string> notes = { }; p.description = { "Toggles whether or not bots will sit in combat to heal or med." };
p.example_format = { fmt::format("{} [value] [actionable]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [value] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To set Clerics to sit in combat:", "To set Clerics to sit in combat:",
fmt::format( fmt::format(
@@ -29,8 +21,15 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = { }; p.examples_two =
std::vector<std::string> examples_three = {
"To set all bots to sit/med in combat:",
fmt::format(
"{} 1 spawned",
sep->arg[0]
)
};
p.examples_three =
{ {
"To check the sit in combat state for all bots:", "To check the sit in combat state for all bots:",
fmt::format( fmt::format(
@@ -38,28 +37,9 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+19 -39
View File
@@ -3,63 +3,43 @@
void bot_command_sit_mana_percent(Client* c, const Seperator* sep) void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_sit_mana_percent", sep->arg[0], "sitmanapercent")) { if (helper_command_alias_fail(c, "bot_command_sit_mana_percent", sep->arg[0], "sitmanapercent")) {
c->Message(Chat::White, "note: Mana % threshold when bots will sit in combat if allowed.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Mana % threshold when bots will sit in combat if allowed."
};
std::vector<std::string> notes = { }; p.description = { "Mana % threshold when bots will sit in combat if allowed." };
p.example_format = { fmt::format("{} [value] [actionable]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{ {
fmt::format( "To set Clerics to sit at 45% Mana:",
"{} [value] [actionable]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{
"To set Clerics to sit at 45% mana:",
fmt::format( fmt::format(
"{} 45 byclass 2", "{} 45 byclass 2",
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = { }; p.examples_two =
std::vector<std::string> examples_three =
{ {
"To check the mana threshold for all bots:", "To set all bots to sit at 50% Mana:",
fmt::format(
"{} 50 spawned",
sep->arg[0]
)
};
p.examples_three =
{
"To check the Mana threshold for all bots:",
fmt::format( fmt::format(
"{} current spawned", "{} current spawned",
sep->arg[0] sep->arg[0]
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -30
View File
@@ -3,18 +3,16 @@
void bot_command_spell_aggro_checks(Client* c, const Seperator* sep) void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_aggro_checks", sep->arg[0], "spellaggrochecks")) { if (helper_command_alias_fail(c, "bot_command_spell_aggro_checks", sep->arg[0], "spellaggrochecks")) {
c->Message(Chat::White, "note: Toggles whether or not bots will cast a spell type if they think it will get them aggro.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Toggles whether or not bots will cast a spell type if they think it will get them aggro"
};
std::vector<std::string> notes = { }; p.description = { "Toggles whether or not bots will cast a spell type if they think it will get them aggro." };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -25,7 +23,7 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to check aggro on nukes:", "To set all bots to check aggro on nukes:",
fmt::format( fmt::format(
@@ -39,7 +37,7 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
BotSpellTypes::Nuke BotSpellTypes::Nuke
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set Shadowknights to ignore aggro checks on snares:", "To set Shadowknights to ignore aggro checks on snares:",
fmt::format( fmt::format(
@@ -53,7 +51,7 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current DoT aggro check on all bots:", "To check the current DoT aggro check on all bots:",
fmt::format( fmt::format(
@@ -68,27 +66,9 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
) )
}; };
std::vector<std::string> actionables = p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
{
"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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+11 -31
View File
@@ -3,24 +3,23 @@
void bot_command_spell_delays(Client* c, const Seperator* sep) void bot_command_spell_delays(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_delays", sep->arg[0], "spelldelays")) { 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; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls how long a bot will wait between casts of different spell types"
};
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", "- 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", "- 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", "- 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", "- e.g., BotA is healing BotB using BotB's settings",
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -31,7 +30,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all Necromancers to an 8s DoT delay:", "To set all Necromancers to an 8s DoT delay:",
fmt::format( fmt::format(
@@ -45,7 +44,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::DOT BotSpellTypes::DOT
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set all Warriors to receive Fast Heals every 2.5s:", "To set all Warriors to receive Fast Heals every 2.5s:",
fmt::format( fmt::format(
@@ -59,7 +58,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Nuke delay on all bots:", "To check the current Nuke delay on all bots:",
fmt::format( fmt::format(
@@ -73,28 +72,9 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::Nuke BotSpellTypes::Nuke
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+11 -31
View File
@@ -3,22 +3,21 @@
void bot_command_spell_engaged_priority(Client* c, const Seperator* sep) void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_engaged_priority", sep->arg[0], "spellengagedpriority")) { if (helper_command_alias_fail(c, "bot_command_spell_engaged_priority", sep->arg[0], "spellengagedpriority")) {
c->Message(Chat::White, "note: Sets the order of spell casts when engaged in combat by spell type.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Sets the order of spell casts when engaged in combat by spell type"
};
std::vector<std::string> notes = p.description = { "Sets the order of spell casts when engaged in combat by spell type." };
p.notes =
{ {
"- Setting a spell type to 0 will prevent that type from being cast.", "- Setting a spell type to 0 will prevent that type from being cast.",
"- If 2 or more are set to the same priority they will sort by spell type ID." "- If 2 or more are set to the same priority they will sort by spell type ID."
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -29,7 +28,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all Shaman to cast slows first:", "To set all Shaman to cast slows first:",
fmt::format( fmt::format(
@@ -43,7 +42,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
BotSpellTypes::Slow BotSpellTypes::Slow
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set all bots to not cast snares:", "To set all bots to not cast snares:",
fmt::format( fmt::format(
@@ -57,7 +56,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current engaged priority of dispels on all bots:", "To check the current engaged priority of dispels on all bots:",
fmt::format( fmt::format(
@@ -71,28 +70,9 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
BotSpellTypes::Dispel BotSpellTypes::Dispel
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -34
View File
@@ -3,21 +3,17 @@
void bot_command_spell_holds(Client* c, const Seperator* sep) void bot_command_spell_holds(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_holds", sep->arg[0], "spellholds")) { if (helper_command_alias_fail(c, "bot_command_spell_holds", sep->arg[0], "spellholds")) {
c->Message(Chat::White, "note: Toggles whether or not bots can cast certain spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Toggles whether or not bots can cast certain spell types"
};
std::vector<std::string> notes = p.description = { "Toggles whether or not bots can cast certain spell types." };
{ p.notes = { "- All pet types are based off the pet owner's setting when a pet is the target" };
"- All pet types are based off the pet owner's setting when a pet is the target" p.example_format =
};
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -28,7 +24,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to hold DoTs:", "To set all bots to hold DoTs:",
fmt::format( fmt::format(
@@ -42,7 +38,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
BotSpellTypes::DOT BotSpellTypes::DOT
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To check the current DoT settings on all bots:", "To check the current DoT settings on all bots:",
fmt::format( fmt::format(
@@ -56,29 +52,9 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
BotSpellTypes::DOT BotSpellTypes::DOT
) )
}; };
std::vector<std::string> examples_three = { }; 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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+11 -31
View File
@@ -3,22 +3,21 @@
void bot_command_spell_idle_priority(Client* c, const Seperator* sep) void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_idle_priority", sep->arg[0], "spellidlepriority")) { if (helper_command_alias_fail(c, "bot_command_spell_idle_priority", sep->arg[0], "spellidlepriority")) {
c->Message(Chat::White, "note: Sets the order of spell casts when not in combat by spell type.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Sets the order of spell casts when not in combat by spell type"
};
std::vector<std::string> notes = p.description = { "Sets the order of spell casts when not in combat by spell type." };
p.notes =
{ {
"- Setting a spell type to 0 will prevent that type from being cast.", "- Setting a spell type to 0 will prevent that type from being cast.",
"- If 2 or more are set to the same priority they will sort by spell type ID." "- If 2 or more are set to the same priority they will sort by spell type ID."
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -29,7 +28,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all Clerics to cast fast heals third:", "To set all Clerics to cast fast heals third:",
fmt::format( fmt::format(
@@ -43,7 +42,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set all bots to not cast cures:", "To set all bots to not cast cures:",
fmt::format( fmt::format(
@@ -57,7 +56,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
BotSpellTypes::Cure BotSpellTypes::Cure
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current idle priority of buffs on all bots:", "To check the current idle priority of buffs on all bots:",
fmt::format( fmt::format(
@@ -71,28 +70,9 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
BotSpellTypes::Buff BotSpellTypes::Buff
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+12 -33
View File
@@ -3,18 +3,16 @@
void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep) void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_max_hp_pct", sep->arg[0], "spellmaxhppct")) { if (helper_command_alias_fail(c, "bot_command_spell_max_hp_pct", sep->arg[0], "spellmaxhppct")) {
c->Message(Chat::White, "note: Controls at what health percentage a bot will start casting different spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls at what health percentage a bot will start casting different spell types"
};
std::vector<std::string> notes = { }; p.description = { "Controls at what health percentage a bot will start casting different spell types." };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -25,9 +23,9 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to start snaring when their health is at or below 100% HP:", "To set all bots to allow snaring when their health is at or below 100% HP:",
fmt::format( fmt::format(
"{} {} 100 spawned", "{} {} 100 spawned",
sep->arg[0], sep->arg[0],
@@ -39,9 +37,9 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set BotA to start casting fast heals at 30% HP:", "To set BotA to allow casting of fast heals at 30% HP:",
fmt::format( fmt::format(
"{} {} 30 byname BotA", "{} {} 30 byname BotA",
sep->arg[0], sep->arg[0],
@@ -53,7 +51,7 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Stun max HP percent on all bots:", "To check the current Stun max HP percent on all bots:",
fmt::format( fmt::format(
@@ -67,28 +65,9 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
BotSpellTypes::Stun BotSpellTypes::Stun
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+14 -35
View File
@@ -3,18 +3,16 @@
void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep) void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_max_mana_pct", sep->arg[0], "spellmaxmanapct")) { if (helper_command_alias_fail(c, "bot_command_spell_max_mana_pct", sep->arg[0], "spellmaxmanapct")) {
c->Message(Chat::White, "note: Controls at what mana percentage a bot will stop casting different spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls at what mana percentage a bot will stop casting different spell types"
};
std::vector<std::string> notes = { }; p.description = { "Controls at what mana percentage a bot will stop casting different spell types." };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -25,9 +23,9 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to start snaring when their mana is at or below 100% HP:", "To set all bots to allow snaring when their mana is at or below 100% HP:",
fmt::format( fmt::format(
"{} {} 10 spawned", "{} {} 10 spawned",
sep->arg[0], sep->arg[0],
@@ -39,21 +37,21 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set BotA to start casting fast heals at 30% mana:", "To set BotA to allow casting of fast heals at 90% mana:",
fmt::format( fmt::format(
"{} {} 30 byname BotA", "{} {} 90 byname BotA",
sep->arg[0], sep->arg[0],
c->GetSpellTypeShortNameByID(BotSpellTypes::FastHeals) c->GetSpellTypeShortNameByID(BotSpellTypes::FastHeals)
), ),
fmt::format( fmt::format(
"{} {} 30 byname BotA", "{} {} 90 byname BotA",
sep->arg[0], sep->arg[0],
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Stun max mana percent on all bots:", "To check the current Stun max mana percent on all bots:",
fmt::format( fmt::format(
@@ -67,28 +65,9 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
BotSpellTypes::Stun BotSpellTypes::Stun
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+11 -31
View File
@@ -3,24 +3,23 @@
void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_max_thresholds", sep->arg[0], "spellmaxthresholds")) { if (helper_command_alias_fail(c, "bot_command_spell_max_thresholds", sep->arg[0], "spellmaxthresholds")) {
c->Message(Chat::White, "note: Controls at what target HP % the bot will start casting different spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls at what target HP % the bot will start casting different spell types"
};
std::vector<std::string> notes = p.description = { "Controls at what target HP % the bot will start casting different spell types." };
p.notes =
{ {
"- All pet types are based off the pet's owner's setting", "- 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", "- 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", "- 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", "- e.g., BotA is healing BotB using BotB's settings",
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -31,7 +30,7 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to start snaring at 99%:", "To set all bots to start snaring at 99%:",
fmt::format( fmt::format(
@@ -45,7 +44,7 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set bot Enchbot to start casting Debuffs at 99%:", "To set bot Enchbot to start casting Debuffs at 99%:",
fmt::format( fmt::format(
@@ -59,7 +58,7 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::Debuff BotSpellTypes::Debuff
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Nuke max threshold on all bots:", "To check the current Nuke max threshold on all bots:",
fmt::format( fmt::format(
@@ -73,28 +72,9 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::Nuke BotSpellTypes::Nuke
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -31
View File
@@ -3,18 +3,16 @@
void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep) void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_min_hp_pct", sep->arg[0], "spellminhppct")) { if (helper_command_alias_fail(c, "bot_command_spell_min_hp_pct", sep->arg[0], "spellminhppct")) {
c->Message(Chat::White, "note: Controls at what health percentage a bot will stop casting different spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls at what health percentage a bot will stop casting different spell types"
};
std::vector<std::string> notes = { }; p.description = { "Controls at what health percentage a bot will stop casting different spell types." };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -25,7 +23,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to stop snaring when their health is below 10% HP:", "To set all bots to stop snaring when their health is below 10% HP:",
fmt::format( fmt::format(
@@ -39,7 +37,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set BotA to stop casting fast heals at 30% HP:", "To set BotA to stop casting fast heals at 30% HP:",
fmt::format( fmt::format(
@@ -53,7 +51,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Stun min HP percent on all bots:", "To check the current Stun min HP percent on all bots:",
fmt::format( fmt::format(
@@ -67,28 +65,9 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
BotSpellTypes::Stun BotSpellTypes::Stun
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -31
View File
@@ -3,18 +3,16 @@
void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep) void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_min_mana_pct", sep->arg[0], "spellminmanapct")) { if (helper_command_alias_fail(c, "bot_command_spell_min_mana_pct", sep->arg[0], "spellminmanapct")) {
c->Message(Chat::White, "note: Controls at what mana percentage a bot will stop casting different spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls at what mana percentage a bot will stop casting different spell types"
};
std::vector<std::string> notes = { }; p.description = { "Controls at what mana percentage a bot will stop casting different spell types." };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -25,7 +23,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to stop snaring when their mana is below 10% HP:", "To set all bots to stop snaring when their mana is below 10% HP:",
fmt::format( fmt::format(
@@ -39,7 +37,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
BotSpellTypes::Snare BotSpellTypes::Snare
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set BotA to stop casting fast heals at 30% mana:", "To set BotA to stop casting fast heals at 30% mana:",
fmt::format( fmt::format(
@@ -53,7 +51,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Stun min mana percent on all bots:", "To check the current Stun min mana percent on all bots:",
fmt::format( fmt::format(
@@ -67,28 +65,9 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
BotSpellTypes::Stun BotSpellTypes::Stun
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+11 -33
View File
@@ -3,24 +3,23 @@
void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_min_thresholds", sep->arg[0], "spellminthresholds")) { if (helper_command_alias_fail(c, "bot_command_spell_min_thresholds", sep->arg[0], "spellminthresholds")) {
c->Message(Chat::White, "note: Controls at what target HP % the bot will stop casting different spell types.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls at what target HP % the bot will stop casting different spell types"
};
std::vector<std::string> notes = p.description = { "Controls at what target HP % the bot will stop casting different spell types." };
p.notes =
{ {
"- All pet types are based off the pet's owner's setting", "- 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", "- 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", "- 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", "- e.g., BotA is healing BotB using BotB's settings",
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -31,7 +30,7 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to stop debuffing at 10%:", "To set all bots to stop debuffing at 10%:",
fmt::format( fmt::format(
@@ -45,7 +44,7 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::Debuff BotSpellTypes::Debuff
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set all Druids to stop casting DoTs at 15%:", "To set all Druids to stop casting DoTs at 15%:",
fmt::format( fmt::format(
@@ -59,7 +58,7 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::DOT BotSpellTypes::DOT
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current Fast Heal min threshold on all bots:", "To check the current Fast Heal min threshold on all bots:",
fmt::format( fmt::format(
@@ -73,30 +72,9 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+11 -31
View File
@@ -3,22 +3,21 @@
void bot_command_spell_pursue_priority(Client* c, const Seperator* sep) void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_pursue_priority", sep->arg[0], "spellpursuepriority")) { if (helper_command_alias_fail(c, "bot_command_spell_pursue_priority", sep->arg[0], "spellpursuepriority")) {
c->Message(Chat::White, "note: Sets the order of spell casts when the mob is fleeing in combat by spell type.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Sets the order of spell casts when the mob is fleeing in combat by spell type"
};
std::vector<std::string> notes = p.description = { "Sets the order of spell casts when the mob is fleeing in combat by spell type." };
p.notes =
{ {
"- Setting a spell type to 0 will prevent that type from being cast.", "- Setting a spell type to 0 will prevent that type from being cast.",
"- If 2 or more are set to the same priority they will sort by spell type ID." "- If 2 or more are set to the same priority they will sort by spell type ID."
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -29,7 +28,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to cast nukes first:", "To set all bots to cast nukes first:",
fmt::format( fmt::format(
@@ -43,7 +42,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set all Shaman to not cast cures:", "To set all Shaman to not cast cures:",
fmt::format( fmt::format(
@@ -57,7 +56,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
BotSpellTypes::Cure BotSpellTypes::Cure
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current pursue priority of buffs on all bots:", "To check the current pursue priority of buffs on all bots:",
fmt::format( fmt::format(
@@ -71,28 +70,9 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
BotSpellTypes::Buff BotSpellTypes::Buff
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -31
View File
@@ -3,18 +3,16 @@
void bot_command_spell_target_count(Client* c, const Seperator* sep) void bot_command_spell_target_count(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_spell_target_count", sep->arg[0], "spelltargetcount")) { if (helper_command_alias_fail(c, "bot_command_spell_target_count", sep->arg[0], "spelltargetcount")) {
c->Message(Chat::White, "note: Decides how many eligible targets are required for an AE or group spell to cast by spell type.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Decides how many eligible targets are required for an AE or group spell to cast by spell type"
};
std::vector<std::string> notes = { }; p.description = { "Decides how many eligible targets are required for an AE or group spell to cast by spell type." };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value] [actionable]" "{} [Type Shortname] [value] [actionable]"
@@ -25,7 +23,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set all bots to AEMez with 5 or more targets:", "To set all bots to AEMez with 5 or more targets:",
fmt::format( fmt::format(
@@ -39,7 +37,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
BotSpellTypes::AEMez BotSpellTypes::AEMez
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To set Wizards to require 5 targets for AENukes:", "To set Wizards to require 5 targets for AENukes:",
fmt::format( fmt::format(
@@ -53,7 +51,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
BotSpellTypes::AENukes BotSpellTypes::AENukes
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To check the current AESlow count on all bots:", "To check the current AESlow count on all bots:",
fmt::format( fmt::format(
@@ -67,28 +65,9 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
BotSpellTypes::AESlow BotSpellTypes::AESlow
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+10 -37
View File
@@ -3,25 +3,17 @@
void bot_command_taunt(Client* c, const Seperator* sep) void bot_command_taunt(Client* c, const Seperator* sep)
{ {
if (helper_command_alias_fail(c, "bot_command_taunt", sep->arg[0], "taunt")) { if (helper_command_alias_fail(c, "bot_command_taunt", sep->arg[0], "taunt")) {
c->Message(Chat::White, "note: TAllows you to turn on/off the taunting state of your bots and/or their pets.");
return; return;
} }
if (helper_is_help_or_usage(sep->arg[1])) { if (helper_is_help_or_usage(sep->arg[1])) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Allows you to turn on/off the taunting state of your bots and/or their pets"
};
std::vector<std::string> notes = { }; p.description = { "Allows you to turn on/off the taunting state of your bots and/or their pets." };
p.example_format = { fmt::format("{} [on / off / pet] [optional: pet] [actionable, default: target]", sep->arg[0]) };
std::vector<std::string> example_format = p.examples_one =
{
fmt::format(
"{} [on / off / pet] [optional: pet] [actionable, default: target]"
, sep->arg[0]
)
};
std::vector<std::string> examples_one =
{ {
"To turn off taunt on all bots:", "To turn off taunt on all bots:",
fmt::format( fmt::format(
@@ -29,7 +21,7 @@ void bot_command_taunt(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To turn on taunt on all bots' pets:", "To turn on taunt on all bots' pets:",
fmt::format( fmt::format(
@@ -37,7 +29,7 @@ void bot_command_taunt(Client* c, const Seperator* sep)
sep->arg[0] sep->arg[0]
) )
}; };
std::vector<std::string> examples_three = p.examples_three =
{ {
"To turn on taunt for all ShadowKnights:", "To turn on taunt for all ShadowKnights:",
fmt::format( fmt::format(
@@ -46,28 +38,9 @@ void bot_command_taunt(Client* c, const Seperator* sep)
Class::ShadowKnight Class::ShadowKnight
) )
}; };
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
std::vector<std::string> actionables = std::string popup_text = c->SendBotCommandHelpWindow(p);
{
"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
);
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+28 -53
View File
@@ -13112,20 +13112,10 @@ void Client::ShowZoneShardMenu()
} }
} }
std::string Client::SendCommandHelpWindow( std::string Client::SendBotCommandHelpWindow(const BotCommandHelpParams& params) {
Client* c,
std::vector<std::string> description,
std::vector<std::string> notes,
std::vector<std::string> example_format,
std::vector<std::string> examples_one, std::vector<std::string> examples_two, 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
) {
unsigned string_length = 0; unsigned string_length = 0;
unsigned current_place = 0; unsigned current_place = 0;
uint16 max_length = RuleI(Command, MaxHelpLineLength); //character length of a line before splitting in to multiple lines uint16 max_length = RuleI(Command, MaxHelpLineLength); // Line length before splitting
const std::string& description_color = RuleS(Command, DescriptionColor); const std::string& description_color = RuleS(Command, DescriptionColor);
const std::string& description_header_color = RuleS(Command, DescriptionHeaderColor); const std::string& description_header_color = RuleS(Command, DescriptionHeaderColor);
const std::string& alt_description_color = RuleS(Command, AltDescriptionColor); const std::string& alt_description_color = RuleS(Command, AltDescriptionColor);
@@ -13145,81 +13135,66 @@ std::string Client::SendCommandHelpWindow(
const std::string& actionable_color = RuleS(Command, ActionableColor); const std::string& actionable_color = RuleS(Command, ActionableColor);
const std::string& actionable_header_color = RuleS(Command, ActionableHeaderColor); const std::string& actionable_header_color = RuleS(Command, ActionableHeaderColor);
const std::string& alt_actionable_color = RuleS(Command, AltActionableColor); const std::string& alt_actionable_color = RuleS(Command, AltActionableColor);
const std::string& header_color = RuleS(Command, HeaderColor);
const std::string& secondary_header_color = RuleS(Command, SecondaryHeaderColor);
const std::string& alt_header_color = RuleS(Command, AltHeaderColor);
const std::string& filler_line_color = RuleS(Command, FillerLineColor); const std::string& filler_line_color = RuleS(Command, FillerLineColor);
std::string filler_line = "--------------------------------------------------------------------"; std::string filler_line = "--------------------------------------------------------------------";
std::string filler_dia = DialogueWindow::TableRow(DialogueWindow::TableCell(fmt::format("{}", DialogueWindow::ColorMessage(filler_line_color, filler_line)))); std::string filler_dia = DialogueWindow::TableRow(DialogueWindow::TableCell(fmt::format("{}", DialogueWindow::ColorMessage(filler_line_color, filler_line))));
std::string break_line = DialogueWindow::Break(); std::string break_line = DialogueWindow::Break();
std::string indent = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; std::string popup_text;
std::string bullet = "- ";
std::string popup_text = "";
/* if (!params.description.empty()) {
max_length is how long you want lines to be before splitting them. This will look for the last space before the count and split there so words are not split mid sentence
Any SplitCommandHelpText can have the first string from a vector differ in color from the next strings by setting an alternate color for that type in the rule.
*/
if (!description.empty()) {
popup_text += GetCommandHelpHeader(description_header_color, "[Description]"); popup_text += GetCommandHelpHeader(description_header_color, "[Description]");
popup_text += SplitCommandHelpText(description, description_color, max_length, !alt_description_color.empty(), alt_description_color); popup_text += SplitCommandHelpText(params.description, description_color, max_length, !alt_description_color.empty(), alt_description_color);
} }
if (!notes.empty()) { if (!params.notes.empty()) {
popup_text += break_line; popup_text += break_line + break_line;
popup_text += break_line;
popup_text += GetCommandHelpHeader(note_header_color, "[Notes]"); popup_text += GetCommandHelpHeader(note_header_color, "[Notes]");
popup_text += SplitCommandHelpText(notes, note_color, max_length, !alt_note_color.empty(), alt_note_color); popup_text += SplitCommandHelpText(params.notes, note_color, max_length, !alt_note_color.empty(), alt_note_color);
} }
if (!example_format.empty()) { if (!params.example_format.empty()) {
popup_text += filler_dia; popup_text += filler_dia;
popup_text += GetCommandHelpHeader(example_header_color, "[Examples]"); popup_text += GetCommandHelpHeader(example_header_color, "[Examples]");
popup_text += SplitCommandHelpText(example_format, example_color, max_length, !alt_example_color.empty(), alt_example_color); popup_text += SplitCommandHelpText(params.example_format, example_color, max_length, !alt_example_color.empty(), alt_example_color);
} }
if (!examples_one.empty()) { if (!params.examples_one.empty()) {
popup_text += break_line; popup_text += break_line + break_line;
popup_text += break_line; popup_text += SplitCommandHelpText(params.examples_one, sub_example_color, max_length, !sub_alt_example_color.empty(), sub_alt_example_color);
popup_text += SplitCommandHelpText(examples_one, sub_example_color, max_length, !sub_alt_example_color.empty(), sub_alt_example_color);
} }
if (!examples_two.empty()) { if (!params.examples_two.empty()) {
popup_text += SplitCommandHelpText(examples_two, sub_example_color, max_length, !sub_alt_example_color.empty(), sub_alt_example_color); popup_text += SplitCommandHelpText(params.examples_two, sub_example_color, max_length, !sub_alt_example_color.empty(), sub_alt_example_color);
} }
if (!examples_three.empty()) { if (!params.examples_three.empty()) {
popup_text += SplitCommandHelpText(examples_three, sub_example_color, max_length, !sub_alt_example_color.empty(), sub_alt_example_color); popup_text += SplitCommandHelpText(params.examples_three, sub_example_color, max_length, !sub_alt_example_color.empty(), sub_alt_example_color);
} }
if (!options.empty()) { if (!params.options.empty()) {
popup_text += filler_dia; popup_text += filler_dia;
popup_text += GetCommandHelpHeader(option_header_color, "[Options]"); popup_text += GetCommandHelpHeader(option_header_color, "[Options]");
popup_text += SplitCommandHelpText(options, option_color, max_length, !alt_option_color.empty(), alt_option_color); popup_text += SplitCommandHelpText(params.options, option_color, max_length, !alt_option_color.empty(), alt_option_color);
} }
if (!options_one.empty()) { if (!params.options_one.empty()) {
popup_text += break_line; popup_text += break_line + break_line;
popup_text += break_line; popup_text += SplitCommandHelpText(params.options_one, sub_option_color, max_length, !sub_alt_option_color.empty(), sub_alt_option_color);
popup_text += SplitCommandHelpText(options_one, sub_option_color, max_length, !sub_alt_option_color.empty(), sub_alt_option_color);
} }
if (!options_two.empty()) { if (!params.options_two.empty()) {
popup_text += SplitCommandHelpText(options_two, sub_option_color, max_length, !sub_alt_option_color.empty(), sub_alt_option_color); popup_text += SplitCommandHelpText(params.options_two, sub_option_color, max_length, !sub_alt_option_color.empty(), sub_alt_option_color);
} }
if (!options_three.empty()) { if (!params.options_three.empty()) {
popup_text += SplitCommandHelpText(options_three, secondary_header_color, max_length, !sub_alt_option_color.empty(), sub_alt_option_color); popup_text += SplitCommandHelpText(params.options_three, sub_option_color, max_length, !sub_alt_option_color.empty(), sub_alt_option_color);
} }
if (!actionables.empty()) { if (!params.actionables.empty()) {
popup_text += filler_dia; popup_text += filler_dia;
popup_text += GetCommandHelpHeader(actionable_header_color, "[Actionables]"); popup_text += GetCommandHelpHeader(actionable_header_color, "[Actionables]");
popup_text += SplitCommandHelpText(actionables, actionable_color, max_length, !alt_actionable_color.empty(), alt_actionable_color); popup_text += SplitCommandHelpText(params.actionables, actionable_color, max_length, !alt_actionable_color.empty(), alt_actionable_color);
} }
popup_text = DialogueWindow::Table(popup_text); popup_text = DialogueWindow::Table(popup_text);
+14 -10
View File
@@ -197,6 +197,19 @@ struct RespawnOption
float heading; float heading;
}; };
struct BotCommandHelpParams {
std::vector<std::string> description = {};
std::vector<std::string> notes = {};
std::vector<std::string> example_format = {};
std::vector<std::string> examples_one = {};
std::vector<std::string> examples_two = {};
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 = {};
};
// do not ask what all these mean because I have no idea! // do not ask what all these mean because I have no idea!
// named from the client's CEverQuest::GetInnateDesc, they're missing some // named from the client's CEverQuest::GetInnateDesc, they're missing some
@@ -1259,16 +1272,7 @@ public:
void SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID); void SendOPTranslocateConfirm(Mob *Caster, uint16 SpellID);
// Help Window // Help Window
std::string SendCommandHelpWindow( std::string SendBotCommandHelpWindow(const BotCommandHelpParams& params);
Client* c,
std::vector<std::string> description,
std::vector<std::string> notes,
std::vector<std::string> example_format,
std::vector<std::string> examples_one, std::vector<std::string> examples_two, 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 GetCommandHelpHeader(std::string color, std::string header); std::string GetCommandHelpHeader(std::string color, std::string header);
std::string SplitCommandHelpText(std::vector<std::string> msg, std::string color, uint16 maxLength, bool secondColor = false, std::string secondaryColor = ""); std::string SplitCommandHelpText(std::vector<std::string> msg, std::string color, uint16 maxLength, bool secondColor = false, std::string secondaryColor = "");
void SendSpellTypePrompts(bool commandedTypes = false, bool clientOnlyTypes = false); void SendSpellTypePrompts(bool commandedTypes = false, bool clientOnlyTypes = false);
+7 -28
View File
@@ -7,17 +7,14 @@ void command_spell_delays(Client* c, const Seperator* sep)
const bool is_help = !strcasecmp(sep->arg[1], "help"); const bool is_help = !strcasecmp(sep->arg[1], "help");
if (is_help) { if (is_help) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Controls how often bots can cast certain spell types on you"
};
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" "- All pet types are control your how your pet will be affected"
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value]" "{} [Type Shortname] [value]"
@@ -28,7 +25,7 @@ void command_spell_delays(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set Very Fast Heals to be received every 1 second:", "To set Very Fast Heals to be received every 1 second:",
fmt::format( fmt::format(
@@ -42,7 +39,7 @@ void command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::VeryFastHeals BotSpellTypes::VeryFastHeals
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To check your current Regular Heal delay:", "To check your current Regular Heal delay:",
fmt::format( fmt::format(
@@ -56,26 +53,8 @@ void command_spell_delays(Client* c, const Seperator* sep)
BotSpellTypes::RegularHeal 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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+7 -28
View File
@@ -11,17 +11,14 @@ void command_spell_holds(Client *c, const Seperator *sep)
const bool is_help = !strcasecmp(sep->arg[1], "help"); const bool is_help = !strcasecmp(sep->arg[1], "help");
if (is_help) { if (is_help) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Toggles whether or not bots can cast certain spell types on you"
};
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" "- All pet types are control your how your pet will be affected"
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value]" "{} [Type Shortname] [value]"
@@ -32,7 +29,7 @@ void command_spell_holds(Client *c, const Seperator *sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set DoTs to be held:", "To set DoTs to be held:",
fmt::format( fmt::format(
@@ -46,7 +43,7 @@ void command_spell_holds(Client *c, const Seperator *sep)
BotSpellTypes::DOT BotSpellTypes::DOT
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To check your current DoT settings:", "To check your current DoT settings:",
fmt::format( fmt::format(
@@ -60,26 +57,8 @@ void command_spell_holds(Client *c, const Seperator *sep)
BotSpellTypes::DOT 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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+7 -28
View File
@@ -7,17 +7,14 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
const bool is_help = !strcasecmp(sep->arg[1], "help"); const bool is_help = !strcasecmp(sep->arg[1], "help");
if (is_help) { if (is_help) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Threshold of your own health when bots will start casting the chosen spell type"
};
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" "- All pet types are control your how your pet will be affected"
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value]" "{} [Type Shortname] [value]"
@@ -28,7 +25,7 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set Complete Heals to start at 90% health:", "To set Complete Heals to start at 90% health:",
fmt::format( fmt::format(
@@ -42,7 +39,7 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::CompleteHeal BotSpellTypes::CompleteHeal
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To check your current HoT Heal settings:", "To check your current HoT Heal settings:",
fmt::format( fmt::format(
@@ -56,26 +53,8 @@ void command_spell_max_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::HoTHeals 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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());
+7 -28
View File
@@ -7,17 +7,14 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
const bool is_help = !strcasecmp(sep->arg[1], "help"); const bool is_help = !strcasecmp(sep->arg[1], "help");
if (is_help) { if (is_help) {
std::vector<std::string> description = BotCommandHelpParams p;
{
"Threshold of your own health when bots will stop casting the chosen spell type"
};
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" "- All pet types are control your how your pet will be affected"
}; };
p.example_format =
std::vector<std::string> example_format =
{ {
fmt::format( fmt::format(
"{} [Type Shortname] [value]" "{} [Type Shortname] [value]"
@@ -28,7 +25,7 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
, sep->arg[0] , sep->arg[0]
) )
}; };
std::vector<std::string> examples_one = p.examples_one =
{ {
"To set Fast Heals to be stopped at 65% health:", "To set Fast Heals to be stopped at 65% health:",
fmt::format( fmt::format(
@@ -42,7 +39,7 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::FastHeals BotSpellTypes::FastHeals
) )
}; };
std::vector<std::string> examples_two = p.examples_two =
{ {
"To check your current Cure settings:", "To check your current Cure settings:",
fmt::format( fmt::format(
@@ -56,26 +53,8 @@ void command_spell_min_thresholds(Client* c, const Seperator* sep)
BotSpellTypes::Cure 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); popup_text = DialogueWindow::Table(popup_text);
c->SendPopupToClient(sep->arg[0], popup_text.c_str()); c->SendPopupToClient(sep->arg[0], popup_text.c_str());