Fixed users not gaining club xp

This commit is contained in:
Kwoth
2022-08-10 12:31:52 +02:00
parent e0e4d697c3
commit 998779203a
2 changed files with 10 additions and 0 deletions

View File

@@ -188,6 +188,13 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
},
(_, n) => n);
await ctx.Clubs
.Where(x => x.Members.Any(m => group.Contains(m.UserId)))
.UpdateAsync(old => new()
{
Xp = old.Xp + (group.Key * old.Members.Count(m => group.Contains(m.UserId)))
});
dus.AddRange(items);
}