Skip to content

Commit

Permalink
Only run insurance on PMC profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Jul 8, 2024
1 parent aaedfda commit f93e403
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,21 @@ public static async Task<LocalPlayer> Create(int playerId, Vector3 position, Qua
questController.Run();

// Used to communicate what insurance each profile has between clients
if (session.InsuranceCompany?.InsuredItems?.Count > 0)
if (profile.Side is not EPlayerSide.Savage)
{
List<InsuredItemClass> itemsToInsure = [];
foreach (ItemClass item in session.InsuranceCompany.InsuredItems)
if (session.InsuranceCompany?.InsuredItems?.Count > 0)
{
itemsToInsure.Add(new()
List<InsuredItemClass> itemsToInsure = [];
foreach (ItemClass item in session.InsuranceCompany.InsuredItems)
{
itemId = item.Id,
tid = item.TemplateId
});
}
profile.InsuredItems = [.. itemsToInsure];
itemsToInsure.Add(new()
{
itemId = item.Id,
tid = item.TemplateId
});
}
profile.InsuredItems = [.. itemsToInsure];
}
}

GClass3233 achievementsController = new(profile, inventoryController, session, true);
Expand Down

0 comments on commit f93e403

Please sign in to comment.