mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2026-01-16 07:10:37 +01:00
feat(Core/Chat): new argument parsing and unify chat hyperlink parsing (#6243)
This commit is contained in:
@@ -1056,22 +1056,16 @@ OutdoorPvP* ScriptMgr::CreateOutdoorPvP(OutdoorPvPData const* data)
|
||||
return tmpscript->GetOutdoorPvP();
|
||||
}
|
||||
|
||||
std::vector<ChatCommand> ScriptMgr::GetChatCommands()
|
||||
Acore::ChatCommands::ChatCommandTable ScriptMgr::GetChatCommands()
|
||||
{
|
||||
std::vector<ChatCommand> table;
|
||||
Acore::ChatCommands::ChatCommandTable table;
|
||||
|
||||
FOR_SCRIPTS_RET(CommandScript, itr, end, table)
|
||||
FOR_SCRIPTS(CommandScript, itr, end)
|
||||
{
|
||||
std::vector<ChatCommand> cmds = itr->second->GetCommands();
|
||||
table.insert(table.end(), cmds.begin(), cmds.end());
|
||||
Acore::ChatCommands::ChatCommandTable cmds = itr->second->GetCommands();
|
||||
std::move(cmds.begin(), cmds.end(), std::back_inserter(table));
|
||||
}
|
||||
|
||||
// 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