random raids now can have more players
This commit is contained in:
parent
929ca9c0a7
commit
07eede3f9a
5 changed files with 46 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue