Skip to content

Commit

Permalink
Fixed loot distribution dependency on the database
Browse files Browse the repository at this point in the history
  • Loading branch information
Metious committed Nov 15, 2023
1 parent f4ec600 commit 400ad82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Nautilus/Handlers/LootDistributionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public static void AddLootDistributionData(string classId, LootDistributionData.
/// <param name="biomeDistribution">The <see cref="LootDistributionData.BiomeData"/> dictating how the prefab should spawn in the world.</param>
public static void AddLootDistributionData(string classId, params LootDistributionData.BiomeData[] biomeDistribution)
{
CraftData.PreparePrefabIDCache();

if (!PrefabDatabase.TryGetPrefabFilename(classId, out var filename))
{
InternalLogger.Error($"Could not find prefab file path for class ID '{classId}'. Cancelling loot distribution addition.");
Expand All @@ -112,6 +114,8 @@ public static void AddLootDistributionData(string classId, params LootDistributi
/// <param name="biomeDistribution">The <see cref="LootDistributionData.BiomeData"/> dictating how the prefab should spawn in the world.</param>
public static void AddLootDistributionData(string classId, WorldEntityInfo info, params LootDistributionData.BiomeData[] biomeDistribution)
{
CraftData.PreparePrefabIDCache();

if (!PrefabDatabase.TryGetPrefabFilename(classId, out var filename))
{
InternalLogger.Error($"Could not find prefab file path for class ID '{classId}'. Cancelling loot distribution addition.");
Expand Down

0 comments on commit 400ad82

Please sign in to comment.