mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Commands: Fix ".help" command to show commands in alphabetical order
(cherry picked from commit 841ce54a0d)
This commit is contained in:
@@ -1045,6 +1045,12 @@ std::vector<ChatCommand> ScriptMgr::GetChatCommands()
|
||||
table.insert(table.end(), cmds.begin(), cmds.end());
|
||||
}
|
||||
|
||||
// Sort commands in alphabetical order
|
||||
std::sort(table.begin(), table.end(), [](const ChatCommand& a, const ChatCommand&b)
|
||||
{
|
||||
return strcmp(a.Name, b.Name) < 0;
|
||||
});
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user