mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-30 11:12:27 +00:00
[Bots] Command add fix for spelltypeids/spelltypenames (#5074)
This commit is contained in:
parent
c6ddf300a4
commit
85c3255568
@ -775,7 +775,7 @@ void helper_send_usage_required_bots(Client *bot_owner, uint16 spell_type)
|
||||
bot_owner->Message(Chat::Green, "%s", description.c_str());
|
||||
}
|
||||
|
||||
void SendSpellTypeWindow(Client* c, const Seperator* sep) {
|
||||
void SendSpellTypeWindow(Client* c, const Seperator* sep, bool short_names) {
|
||||
std::string arg0 = sep->arg[0];
|
||||
std::string arg1 = sep->arg[1];
|
||||
|
||||
@ -828,7 +828,7 @@ void SendSpellTypeWindow(Client* c, const Seperator* sep) {
|
||||
std::string popup_text = DialogueWindow::TableRow(
|
||||
DialogueWindow::TableCell(DialogueWindow::ColorMessage(goldenrod, spell_type_field))
|
||||
+
|
||||
DialogueWindow::TableCell((!arg0.compare("^spelltypeids") ? DialogueWindow::ColorMessage(goldenrod, id_field) : DialogueWindow::ColorMessage(goldenrod, shortname_field)))
|
||||
DialogueWindow::TableCell((!short_names ? DialogueWindow::ColorMessage(goldenrod, id_field) : DialogueWindow::ColorMessage(goldenrod, shortname_field)))
|
||||
);
|
||||
|
||||
popup_text += DialogueWindow::TableRow(
|
||||
@ -845,7 +845,7 @@ void SendSpellTypeWindow(Client* c, const Seperator* sep) {
|
||||
popup_text += DialogueWindow::TableRow(
|
||||
DialogueWindow::TableCell(DialogueWindow::ColorMessage(forest_green, Bot::GetSpellTypeNameByID(i)))
|
||||
+
|
||||
DialogueWindow::TableCell((!arg0.compare("^spelltypeids") ? DialogueWindow::ColorMessage(slate_blue, std::to_string(i)) : DialogueWindow::ColorMessage(slate_blue, Bot::GetSpellTypeShortNameByID(i))))
|
||||
DialogueWindow::TableCell((!short_names ? DialogueWindow::ColorMessage(slate_blue, std::to_string(i)) : DialogueWindow::ColorMessage(slate_blue, Bot::GetSpellTypeShortNameByID(i))))
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1182,4 +1182,4 @@ bool helper_is_help_or_usage(const char* arg);
|
||||
bool helper_no_available_bots(Client *bot_owner, Bot *my_bot = nullptr);
|
||||
void helper_send_available_subcommands(Client *bot_owner, const char* command_simile, std::vector<const char*> subcommand_list);
|
||||
void helper_send_usage_required_bots(Client *bot_owner, uint16 spell_type);
|
||||
void SendSpellTypeWindow(Client* c, const Seperator* sep);
|
||||
void SendSpellTypeWindow(Client* c, const Seperator* sep, bool short_names = false);
|
||||
|
||||
@ -24,5 +24,5 @@ void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
||||
|
||||
void bot_command_spelltype_names(Client* c, const Seperator* sep)
|
||||
{
|
||||
SendSpellTypeWindow(c, sep);
|
||||
SendSpellTypeWindow(c, sep, true);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user