mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 08:34:27 -05:00 
			
		
		
		
	Awarded xp is now correctly used in level up calculations, closes #376
This commit is contained in:
		@@ -277,8 +277,8 @@ public class XpService : INService, IReadyExecutor, IExecNoCommand
 | 
			
		||||
                if (guildToAdd.TryGetValue(du.GuildId, out var users)
 | 
			
		||||
                    && users.TryGetValue(du.UserId, out var xpGainData))
 | 
			
		||||
                {
 | 
			
		||||
                    var oldLevel = new LevelStats(du.Xp - xpGainData.XpAmount);
 | 
			
		||||
                    var newLevel = new LevelStats(du.Xp);
 | 
			
		||||
                    var oldLevel = new LevelStats(du.Xp - xpGainData.XpAmount + du.AwardedXp);
 | 
			
		||||
                    var newLevel = new LevelStats(du.Xp + du.AwardedXp);
 | 
			
		||||
 | 
			
		||||
                    if (oldLevel.Level < newLevel.Level)
 | 
			
		||||
                    {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user