mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Core/Scripts: Make ObjectMgr::LoadScriptNames safe to call multiple times
This commit is contained in:
@@ -1165,9 +1165,7 @@ void ScriptMgr::Initialize()
|
||||
sScriptMgr->SwapScriptContext(true);
|
||||
|
||||
// Print unused script names.
|
||||
std::unordered_set<std::string> unusedScriptNames(
|
||||
sObjectMgr->GetAllScriptNames().begin(),
|
||||
sObjectMgr->GetAllScriptNames().end());
|
||||
std::unordered_set<std::string> unusedScriptNames = sObjectMgr->GetAllScriptNames();
|
||||
|
||||
// Remove the used scripts from the given container.
|
||||
sScriptRegistryCompositum->RemoveUsedScriptsFromContainer(unusedScriptNames);
|
||||
|
||||
Reference in New Issue
Block a user