mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 11:03:43 +01:00 
			
		
		
		
	Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows
This commit is contained in:
		@@ -1,5 +1,7 @@
 | 
			
		||||
package com.gmail.nossr50.util;
 | 
			
		||||
 | 
			
		||||
import com.gmail.nossr50.config.AdvancedConfig;
 | 
			
		||||
import com.gmail.nossr50.config.Config;
 | 
			
		||||
import com.gmail.nossr50.datatypes.experience.XPGainReason;
 | 
			
		||||
import com.gmail.nossr50.datatypes.experience.XPGainSource;
 | 
			
		||||
import com.gmail.nossr50.datatypes.party.Party;
 | 
			
		||||
@@ -329,7 +331,7 @@ public class EventUtils {
 | 
			
		||||
                String skillName = primarySkillType.toString();
 | 
			
		||||
                int playerSkillLevel = playerProfile.getSkillLevel(primarySkillType);
 | 
			
		||||
 | 
			
		||||
                playerProfile.modifySkill(primarySkillType, playerSkillLevel - levelChanged.get(skillName));
 | 
			
		||||
                playerProfile.modifySkill(primarySkillType, Math.max(Config.getInstance().getHardcoreDeathStatPenaltyLevelThreshold(), playerSkillLevel - levelChanged.get(skillName)));
 | 
			
		||||
                playerProfile.removeXp(primarySkillType, experienceChanged.get(skillName));
 | 
			
		||||
 | 
			
		||||
                if (playerProfile.getSkillXpLevel(primarySkillType) < 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -49,7 +49,7 @@ public final class HardcoreManager {
 | 
			
		||||
                continue;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            double statsLost = playerSkillLevel * (statLossPercentage * 0.01D);
 | 
			
		||||
            double statsLost = Math.max(0, (playerSkillLevel - levelThreshold)) * (statLossPercentage * 0.01D);
 | 
			
		||||
            int levelsLost = (int) statsLost;
 | 
			
		||||
            int xpLost = (int) Math.floor(playerSkillXpLevel * (statsLost - levelsLost));
 | 
			
		||||
            levelChanged.put(primarySkillType.toString(), levelsLost);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user