From e781ede5b25cd4cf30a5d40b777451dc93120818 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Thu, 12 Mar 2026 09:45:03 -0700 Subject: [PATCH] feat: implement /chathelp command with channel-specific help text --- src/ui/game_screen.cpp | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index bd539149..f6a1fa76 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -3854,6 +3854,39 @@ void GameScreen::sendChatMessage(game::GameHandler& gameHandler) { return; } + // /chathelp command — list chat-channel slash commands + if (cmdLower == "chathelp") { + static const char* kChatHelp[] = { + "--- Chat Channel Commands ---", + "/s [msg] Say to nearby players", + "/y [msg] Yell to a wider area", + "/w [msg] Whisper to player", + "/r [msg] Reply to last whisper", + "/p [msg] Party chat", + "/g [msg] Guild chat", + "/o [msg] Guild officer chat", + "/raid [msg] Raid chat", + "/rw [msg] Raid warning", + "/bg [msg] Battleground chat", + "/1 [msg] General channel", + "/2 [msg] Trade channel (also /wts /wtb)", + "/ [msg] Channel by number", + "/join Join a channel", + "/leave Leave a channel", + "/afk [msg] Set AFK status", + "/dnd [msg] Set Do Not Disturb", + }; + for (const char* line : kChatHelp) { + game::MessageChatData helpMsg; + helpMsg.type = game::ChatType::SYSTEM; + helpMsg.language = game::ChatLanguage::UNIVERSAL; + helpMsg.message = line; + gameHandler.addLocalChatMessage(helpMsg); + } + chatInputBuffer[0] = '\0'; + return; + } + // /help command — list available slash commands if (cmdLower == "help" || cmdLower == "?") { static const char* kHelpLines[] = {