Scripts/Commands: Fix ".help" command to show commands in alphabetical order
This commit is contained in:
1 parent
f22b1938db
commit
841ce54a0d
1 file changed
+6
@@ -1042,6 +1042,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