diff --git a/Libraries/SPTarkov.Server.Core/Helpers/ProfileHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/ProfileHelper.cs index 31056b43..491896d4 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/ProfileHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/ProfileHelper.cs @@ -714,4 +714,24 @@ public class ProfileHelper( ? matchingProfileTemplate.Bear : matchingProfileTemplate.Usec; } + + /// + /// Look up a key inside the `CustomFlags` property from a profile template + /// + /// Edition of profile desired, e.g. "Standard" + /// key stored in CustomFlags dictionary + /// + public bool GetProfileTemplateFlagValue(string accountEdition, string flagKey) + { + var profileTemplates = databaseService.GetProfileTemplates(); + + // Get matching profile 'type' e.g. 'standard' + if (!profileTemplates.TryGetValue(accountEdition, out var matchingProfileTemplate)) + { + logger.Error($"Unable to find profile template for account edition: {accountEdition}"); + return false; + } + + return matchingProfileTemplate.CustomFlags.GetValueOrDefault(flagKey, false); + } }