fix null guards

This commit is contained in:
CWX
2025-01-16 13:13:13 +00:00
parent 80c4f75d01
commit 0826091fef
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -224,8 +224,9 @@ public class BotWeaponGenerator
);
}
var tempList = _cloner.Clone(weaponWithModsArray.Where((item) => item.SlotId == _modMagazineSlotId));
// Fill existing magazines to full and sync ammo type
foreach (var magazine in weaponWithModsArray.Where((item) => item.SlotId == _modMagazineSlotId))
foreach (var magazine in tempList)
{
FillExistingMagazines(weaponWithModsArray, magazine, ammoTpl);
}