This commit is contained in:
2022-06-08 19:59:58 +03:00
parent 531edcd3cc
commit 51324f6dca
8 changed files with 47 additions and 21 deletions

View File

@@ -25,7 +25,7 @@ namespace EVE_LevelingSystem.LevelingSystemCore
internal static bool AddEXP(this User user)
{
if (OnWaitingList.Contains(user.userID)) return false;
if (OnWaitingList.Contains(user.user.userID.ToString())) return false;
Random r = new Random();
int exp = r.Next(2, 12);
Int64 userXP = user.CurrentEXP;
@@ -40,14 +40,14 @@ namespace EVE_LevelingSystem.LevelingSystemCore
user.CurrentEXP += exp;
OnWaitingList.Add(user.userID);
OnWaitingList.Add(user.user.userID.ToString());
new Thread(() =>
{
int minutesToWait = Level.globalSettings.TimeToWaitBetweenMessages;
Thread.Sleep(60000 * minutesToWait);
OnWaitingList.Remove(user.userID);
OnWaitingList.Remove(user.user.userID.ToString());
}
);

View File

@@ -1,9 +1,20 @@
namespace EVE_LevelingSystem.LevelingSystemCore;
using Discord;
using Discord.WebSocket;
public class User
namespace EVE_LevelingSystem.LevelingSystemCore
{
public string userID { get; set; }
public int CurrentLevel { get; set; }
public long CurrentEXP { get; set; }
public long RequiredEXPToLevelUp { get; set; }
}
public class DiscordUser
{
public string Username { get; set; }
public ushort DiscordTag { get; set; }
public ulong userID { get; set; }
}
public class User
{
public DiscordUser user { get; set; }
public int CurrentLevel { get; set; }
public long CurrentEXP { get; set; }
public long RequiredEXPToLevelUp { get; set; }
}
}