From 2e7c6f66407e1f0a02e7d6ebca7aec5c1cf21600 Mon Sep 17 00:00:00 2001 From: "t.ruspekhofer" Date: Mon, 14 Mar 2022 22:48:54 +0100 Subject: [PATCH] added free and overall spots --- Lieb/Data/RaidRandomizerService.cs | 6 +++--- Lieb/Pages/Raids/RaidRoles.razor | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Lieb/Data/RaidRandomizerService.cs b/Lieb/Data/RaidRandomizerService.cs index 9a0db66..08697b2 100644 --- a/Lieb/Data/RaidRandomizerService.cs +++ b/Lieb/Data/RaidRandomizerService.cs @@ -61,7 +61,7 @@ namespace Lieb.Data possibleClasses.Add(build.GuildWars2Build.Class); } PlannedRaidRole role = new PlannedRaidRole(); - role.Spots = 1; + role.Spots = 0; if (possibleClasses.Count > 0) { role.Name = possibleClasses.ToList()[_random.Next(possibleClasses.Count - 1)].ToString(); @@ -85,7 +85,7 @@ namespace Lieb.Data possibleEliteSpecs.Add(build.GuildWars2Build.EliteSpecialization); } PlannedRaidRole role = new PlannedRaidRole(); - role.Spots = 1; + role.Spots = 0; if (possibleEliteSpecs.Count > 0) { role.Name = possibleEliteSpecs.ToList()[_random.Next(possibleEliteSpecs.Count - 1)].ToString(); @@ -113,7 +113,7 @@ namespace Lieb.Data foreach(var userBuild in signedUpUsers) { PlannedRaidRole role = new PlannedRaidRole(); - role.Spots = 1; + role.Spots = 0; role.Name = userBuild.Value.BuildName; raid.Roles.Add(role); RaidSignUp signUp = raid.SignUps.FirstOrDefault(s => s.LiebUserId == userBuild.Key); diff --git a/Lieb/Pages/Raids/RaidRoles.razor b/Lieb/Pages/Raids/RaidRoles.razor index 52a0778..d0502cd 100644 --- a/Lieb/Pages/Raids/RaidRoles.razor +++ b/Lieb/Pages/Raids/RaidRoles.razor @@ -9,6 +9,7 @@ Role Users + (@_raid.SignUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count()/@_raid.Roles.Sum(r => r.Spots)) @@ -22,7 +23,7 @@ int usedSpots = signUps.Where(s => s.SignUpType == SignUpType.SignedUp).Count(); - @role.Name (@usedSpots /@role.Spots)
@role.Description + @role.Name (@usedSpots / @role.Spots)
@role.Description @foreach (var signUp in signUps)