небольшой фикс
This commit is contained in:
parent
3c775f32fb
commit
fec3e7d1ef
@ -86,7 +86,8 @@ namespace ShipyardFileImplement.Implements
|
||||
}
|
||||
public bool SellShips(IShipModel model, int count)
|
||||
{
|
||||
if (source.Shops.Select(x => x.Ships.FirstOrDefault(y => y.Key == model.Id).Value.Item2).Sum()<count)
|
||||
int availableQuantity = source.Shops.Select(x => x.Ships.FirstOrDefault(y => y.Key == model.Id).Value.Item2).Sum();
|
||||
if (availableQuantity < count)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user