Skip to content

Commit

Permalink
Load all scripts in tagged directories when in compatibility mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Jan 16, 2024
1 parent c243a4b commit 4695875
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions LuaEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,15 @@ void Eluna::RunScripts()

for (auto it = sElunaLoader->combined_scripts.begin(); it != sElunaLoader->combined_scripts.end(); ++it)
{
// check that the script file is either global or meant to be loaded for this map
if (it->mapId != -1 && it->mapId != boundMapId)
// if the Eluna state is in compatibility mode, it should load all scripts, including those tagged with a specific map ID
if (!GetCompatibilityMode())
{
ELUNA_LOG_DEBUG("[Eluna]: `%s` is tagged %i and will not load for map: %i", it->filename.c_str(), it->mapId, boundMapId);
continue;
// check that the script file is either global or meant to be loaded for this map
if (it->mapId != -1 && it->mapId != boundMapId)
{
ELUNA_LOG_DEBUG("[Eluna]: `%s` is tagged %i and will not load for map: %i", it->filename.c_str(), it->mapId, boundMapId);
continue;
}
}

// Check that no duplicate names exist
Expand Down

0 comments on commit 4695875

Please sign in to comment.