[Bots] Command add fix for spelltypeids/spelltypenames (#5074)
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled

This commit is contained in:
nytmyr
2026-04-29 01:59:19 -05:00
committed by GitHub
parent c6ddf300a4
commit 85c3255568
3 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -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))))
);
}