Skip to content

Commit

Permalink
removed the forloop
Browse files Browse the repository at this point in the history
  • Loading branch information
andreakarasho committed Aug 18, 2024
1 parent a791421 commit 43a4ac6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/ClassicUO.Assets/MultiMapLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,14 @@ public override Task Load()
{
_file = new UOFile(path, true);
}
var facetFiles = Directory.GetFiles(FileManager.BasePath, "*.mul", SearchOption.TopDirectoryOnly)
_facets = Directory.GetFiles(FileManager.BasePath, "*.mul", SearchOption.TopDirectoryOnly)
.Select(s => Regex.Match(s, "facet0.*\\.mul", RegexOptions.IgnoreCase))
.Where(s => s.Success)
.Select(s => Path.Combine(FileManager.BasePath, s.Value))
.OrderBy(s => s)
.Select(s => new UOFileMul(s))
.ToArray();
_facets = new UOFileMul[facetFiles.Length];
for (int i = 0; i < facetFiles.Length; i++)
{
_facets[i] = new UOFileMul(facetFiles[i]);
}
}
);
}
Expand Down

0 comments on commit 43a4ac6

Please sign in to comment.