Reworked random raids to be randomizable multiple times

This commit is contained in:
t.ruspekhofer 2022-03-13 17:21:17 +01:00
parent dd79b0e333
commit 6e4dce5b1f
9 changed files with 249 additions and 83 deletions

View file

@ -209,12 +209,16 @@
{
if(_raid.RaidType != RaidType.Planned)
{
PlannedRaidRole role = _raid.Roles.FirstOrDefault(r => r.IsRandomSignUpRole);
int randomRoleId = role != null ? role.PlannedRaidRoleId : 0;
_raid.Roles.Clear();
_raid.Roles.Add(new PlannedRaidRole()
{
Spots = 10,
Name = "Random",
Description = _raid.RaidType.ToString()
Description = _raid.RaidType.ToString(),
IsRandomSignUpRole = true,
PlannedRaidRoleId = randomRoleId
});
}