fixed error with group sizes in randomizer

This commit is contained in:
Sarah Faey 2022-12-12 22:36:53 +01:00
parent 5125a35703
commit d7e9c722db

View file

@ -110,7 +110,7 @@ namespace Lieb.Data
signUp.RaidRole = randomRole; signUp.RaidRole = randomRole;
} }
int noGroups = (raid.SignUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count() / 5) +1; int noGroups = (int)Math.Ceiling((double)(raid.SignUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count() / 5));
HashSet<GuildWars2Account> signedUpAccounts = raid.SignUps.Where(s => s.GuildWars2Account != null && s.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.UseInRandomRaid).Count() > 0 HashSet<GuildWars2Account> signedUpAccounts = raid.SignUps.Where(s => s.GuildWars2Account != null && s.GuildWars2Account.EquippedBuilds.Where(b => b.GuildWars2Build.UseInRandomRaid).Count() > 0
&& s.SignUpType == SignUpType.SignedUp) && s.SignUpType == SignUpType.SignedUp)