diff --git a/.gitignore b/.gitignore index 0972e0d..a4b1174 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,8 @@ DiscordBot/token.txt DiscordBot/debugtoken.txt Lieb/discordAppSecret.txt publish.sh +getDatabase.sh +TODO.txt # Build results [Dd]ebug/ diff --git a/Lieb/Data/RaidService.cs b/Lieb/Data/RaidService.cs index f73187a..22c4e24 100644 --- a/Lieb/Data/RaidService.cs +++ b/Lieb/Data/RaidService.cs @@ -542,11 +542,11 @@ namespace Lieb.Data } } - public RaidRole CreateRandomSignUpRole(RaidType raidType) + public RaidRole CreateRandomSignUpRole(RaidType raidType, int spots = 10) { return new RaidRole() { - Spots = 10, + Spots = spots, Name = "Random", Description = raidType.ToString(), IsRandomSignUpRole = true diff --git a/Lieb/Data/TimerService.cs b/Lieb/Data/TimerService.cs index 36da057..f30d79b 100644 --- a/Lieb/Data/TimerService.cs +++ b/Lieb/Data/TimerService.cs @@ -37,8 +37,8 @@ namespace Lieb.Data foreach(RaidTemplate template in raidTemplateService.GetTemplates()) { TimeZoneInfo timeZone = TimeZoneInfo.FindSystemTimeZoneById(template.TimeZone); - DateTime UTCStartTime = TimeZoneInfo.ConvertTimeToUtc(template.StartTime, timeZone); - if(template.Interval > 0 && UTCStartTime.AddDays(-template.CreateDaysBefore).AddHours(1) < DateTime.UtcNow) + DateTime UTCEndTime = TimeZoneInfo.ConvertTimeToUtc(template.EndTime, timeZone); + if(template.Interval > 0 && UTCEndTime.AddDays(-template.CreateDaysBefore) < DateTime.UtcNow) { raidTemplateService.CreateRaidFromTemplate(template.RaidTemplateId).Wait(); } diff --git a/Lieb/Pages/Raids/RaidEdit/RaidEdit.razor b/Lieb/Pages/Raids/RaidEdit/RaidEdit.razor index 7245fc6..c7f3c2e 100644 --- a/Lieb/Pages/Raids/RaidEdit/RaidEdit.razor +++ b/Lieb/Pages/Raids/RaidEdit/RaidEdit.razor @@ -46,6 +46,15 @@

+ @if(_raid.RaidType != RaidType.Planned) + { +

+ +

+ }

+ @if(_template.RaidType != RaidType.Planned) + { +

+ +

+ }