Browse Source

Use minimum level of salvagable properly

Shane Freeder 5 years ago
parent
commit
4f161812aa

+ 3 - 3
src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java

@@ -82,11 +82,11 @@ public class SalvageManager extends SkillManager {
             return;
             return;
         }
         }
 
 
-        /*int skillLevel = getSkillLevel();
-        int minimumSalvageableLevel = salvageable.getMinimumLevel();*/
+        /*int skillLevel = getSkillLevel();*/
+        int minimumSalvageableLevel = salvageable.getMinimumLevel();
 
 
         // Level check
         // Level check
-        if (!RankUtils.hasUnlockedSubskill(player, SubSkillType.SALVAGE_SCRAP_COLLECTOR)) {
+        if (getSkillLevel() < minimumSalvageableLevel) {
             NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Salvage.Skills.Adept.Level", String.valueOf(RankUtils.getUnlockLevel(SubSkillType.SALVAGE_ARCANE_SALVAGE)), StringUtils.getPrettyItemString(item.getType()));
             NotificationManager.sendPlayerInformation(player, NotificationType.REQUIREMENTS_NOT_MET, "Salvage.Skills.Adept.Level", String.valueOf(RankUtils.getUnlockLevel(SubSkillType.SALVAGE_ARCANE_SALVAGE)), StringUtils.getPrettyItemString(item.getType()));
             return;
             return;
         }
         }