mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
Rewrite xp gain loop. Hopefully faster and fixes xp freeze bugs.
This commit is contained in:
@@ -3,7 +3,7 @@ using NadekoBot.Modules.Xp.Services;
|
||||
|
||||
namespace NadekoBot.Modules.Xp;
|
||||
|
||||
public class LevelStats
|
||||
public readonly struct LevelStats
|
||||
{
|
||||
public long Level { get; }
|
||||
public long LevelXp { get; }
|
||||
|
@@ -1,16 +1,13 @@
|
||||
#nullable disable
|
||||
using Cloneable;
|
||||
|
||||
namespace NadekoBot.Modules.Xp.Services;
|
||||
|
||||
public class UserCacheItem
|
||||
[Cloneable]
|
||||
public sealed partial class UserXpGainData : ICloneable<UserXpGainData>
|
||||
{
|
||||
public IGuildUser User { get; set; }
|
||||
public IGuild Guild { get; set; }
|
||||
public IMessageChannel Channel { get; set; }
|
||||
public int XpAmount { get; set; }
|
||||
|
||||
public override int GetHashCode()
|
||||
=> User.GetHashCode();
|
||||
|
||||
public override bool Equals(object obj)
|
||||
=> obj is UserCacheItem uci && uci.User == User;
|
||||
}
|
Reference in New Issue
Block a user