diff --git a/ElunaLoader.cpp b/ElunaLoader.cpp index 53713c6f5f..0442142cb4 100644 --- a/ElunaLoader.cpp +++ b/ElunaLoader.cpp @@ -74,8 +74,6 @@ void ElunaLoader::LoadScripts() ELUNA_LOG_ERROR("[Eluna]: Error tokenizing Eluna.OnlyOnMaps, invalid config value '%s'", mapIdStr.c_str()); } } - - preloadMaps = eConfigMgr->GetBoolDefault("Eluna.PreloadOnlyOnMaps", false); } int ElunaLoader::LoadBytecodeChunk(lua_State* /*L*/, uint8* bytes, size_t len, BytecodeBuffer* buffer) @@ -244,16 +242,3 @@ bool ElunaLoader::ShouldMapLoadEluna(uint32 id) return (std::find(requiredMaps.begin(), requiredMaps.end(), id) != requiredMaps.end()); } - -void ElunaLoader::PreloadElunaMaps() -{ - // Don't preload maps if not enabled or eluna has a state for every map. - if (!preloadMaps || !requiredMaps.size()) - return; - - for (uint32 mapId : requiredMaps) - { - // Creates the parent map for every entry in requiredMaps, will break if any emulator unloads parent maps. - sMapMgr->CreateBaseMap(mapId); - } -} diff --git a/ElunaLoader.h b/ElunaLoader.h index 703378e18a..23b8d4c327 100644 --- a/ElunaLoader.h +++ b/ElunaLoader.h @@ -37,7 +37,6 @@ class ElunaLoader bool ShouldMapLoadEluna(uint32 mapId); bool CompileScript(lua_State* L, LuaScript& script); static int LoadBytecodeChunk(lua_State* L, uint8* bytes, size_t len, BytecodeBuffer* buffer); - void PreloadElunaMaps(); // Lua script folder path std::string lua_folderpath; @@ -49,7 +48,6 @@ class ElunaLoader ScriptList lua_extensions; std::vector combined_scripts; std::list requiredMaps; - bool preloadMaps; }; #define sElunaLoader ElunaLoader::instance()