mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Merge branch 'xpservicepatch' into 'v3'
Remove deprecated method from XpService. See merge request Kwoth/nadekobot!191
This commit is contained in:
@@ -746,27 +746,6 @@ namespace NadekoBot.Modules.Xp.Services
|
|||||||
guildRank);
|
guildRank);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static (int Level, int LevelXp, int LevelRequiredXp) GetLevelData(UserXpStats stats)
|
|
||||||
{
|
|
||||||
var baseXp = XpService.XP_REQUIRED_LVL_1;
|
|
||||||
|
|
||||||
var required = baseXp;
|
|
||||||
var totalXp = 0;
|
|
||||||
var lvl = 1;
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
required = (int) (baseXp + baseXp / 4.0 * (lvl - 1));
|
|
||||||
|
|
||||||
if (required + totalXp > stats.Xp)
|
|
||||||
break;
|
|
||||||
|
|
||||||
totalXp += required;
|
|
||||||
lvl++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (lvl - 1, stats.Xp - totalXp, required);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool ToggleExcludeServer(ulong id)
|
public bool ToggleExcludeServer(ulong id)
|
||||||
{
|
{
|
||||||
using (var uow = _db.GetDbContext())
|
using (var uow = _db.GetDbContext())
|
||||||
|
Reference in New Issue
Block a user