瀏覽代碼

Fixed bug where disabling hardcore mode for specific skills didn't work

Fixes #1661
TfT_02 11 年之前
父節點
當前提交
07cafd4866
共有 2 個文件被更改,包括 9 次插入0 次删除
  1. 1 0
      Changelog.txt
  2. 8 0
      src/main/java/com/gmail/nossr50/util/HardcoreManager.java

+ 1 - 0
Changelog.txt

@@ -22,6 +22,7 @@ Version 1.4.08-dev
  = Fixed bug where the Unbreaking enchantment was ignored when using "Super Breaker" or "Giga Drill Breaker"
  = Fixed bug which prevented players from gaining Acrobatics XP when the setting 'Prevent_XP_After_Teleport' was set to false
  = Fixed bug where cooldown donor perks were reducing more than expected
+ = Fixed bug where disabling hardcore mode for specific skills didn't work
  ! Updated localization files
  ! Changed AxesCritical to CriticalHit in config file
  ! Changed several secondary ability permissions(deprecated versions still exist)

+ 8 - 0
src/main/java/com/gmail/nossr50/util/HardcoreManager.java

@@ -22,6 +22,10 @@ public final class HardcoreManager {
         int totalLevelsLost = 0;
 
         for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
+            if (!skillType.getHardcoreStatLossEnabled()) {
+                break;
+            }
+
             int playerSkillLevel = playerProfile.getSkillLevel(skillType);
             int playerSkillXpLevel = playerProfile.getSkillXpLevel(skillType);
 
@@ -54,6 +58,10 @@ public final class HardcoreManager {
         int totalLevelsStolen = 0;
 
         for (SkillType skillType : SkillType.NON_CHILD_SKILLS) {
+            if (!skillType.getHardcoreVampirismEnabled()) {
+                break;
+            }
+
             int killerSkillLevel = killerProfile.getSkillLevel(skillType);
             int victimSkillLevel = victimProfile.getSkillLevel(skillType);