Merge branch 'main' of https://github.com/sp-tarkov/server-csharp
This commit is contained in:
@@ -169,7 +169,7 @@ public class RepeatableQuestController(
|
||||
var repeatableQuestDetails = pmcData.RepeatableQuests.FirstOrDefault(
|
||||
(repeatable) => repeatable.Name == repeatableConfig.Name
|
||||
);
|
||||
if (repeatableQuestDetails is not null)
|
||||
if (repeatableQuestDetails is null)
|
||||
{
|
||||
// Not in profile, generate
|
||||
var hasAccess = _profileHelper.HasAccessToRepeatableFreeRefreshSystem(pmcData);
|
||||
@@ -382,7 +382,7 @@ public class RepeatableQuestController(
|
||||
}
|
||||
|
||||
var locationBase = _databaseService.GetLocation(location.ToLower())?.Base;
|
||||
if (locationBase is not null)
|
||||
if (locationBase is null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1483,11 +1483,11 @@ public class BotEquipmentModGenerator(
|
||||
ExhaustableArray<string> exhaustableModPool = null;
|
||||
var modSlot = "cartridges";
|
||||
var camoraFirstSlot = "camora_000";
|
||||
if (itemModPool[modSlot] is not null)
|
||||
if (itemModPool.TryGetValue(modSlot, out var value))
|
||||
{
|
||||
exhaustableModPool = CreateExhaustableArray(itemModPool[modSlot]);
|
||||
exhaustableModPool = CreateExhaustableArray(value);
|
||||
}
|
||||
else if (itemModPool[camoraFirstSlot] is not null)
|
||||
else if (itemModPool.ContainsKey(camoraFirstSlot))
|
||||
{
|
||||
modSlot = camoraFirstSlot;
|
||||
exhaustableModPool = CreateExhaustableArray(MergeCamoraPools(itemModPool));
|
||||
@@ -1500,7 +1500,7 @@ public class BotEquipmentModGenerator(
|
||||
}
|
||||
|
||||
string modTpl = null;
|
||||
bool found = false;
|
||||
var found = false;
|
||||
while (exhaustableModPool.HasValues())
|
||||
{
|
||||
modTpl = exhaustableModPool.GetRandomValue();
|
||||
@@ -1533,14 +1533,10 @@ public class BotEquipmentModGenerator(
|
||||
/// <returns>String array of shells for multiple camora sources</returns>
|
||||
public List<string> MergeCamoraPools(Dictionary<string, List<string>> camorasWithShells)
|
||||
{
|
||||
var uniqueShells = new HashSet<string>();
|
||||
foreach (var shell in camorasWithShells
|
||||
.SelectMany(shellKvP => shellKvP.Value))
|
||||
{
|
||||
uniqueShells.Add(shell);
|
||||
}
|
||||
|
||||
return uniqueShells.ToList();
|
||||
return camorasWithShells
|
||||
.SelectMany(shellKvP => shellKvP.Value)
|
||||
.Distinct()
|
||||
.ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Camora/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Gifter/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=peacefull/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ragfair/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
Reference in New Issue
Block a user