The barefisted smithing perk now properly activates

This commit is contained in:
ceikry
2021-07-02 11:06:34 -05:00
parent caf96b3dcf
commit 16763d242e
2 changed files with 3 additions and 1 deletions
@@ -13,6 +13,7 @@ import core.game.node.item.Item;
import core.game.node.object.Scenery;
import core.plugin.Plugin;
import core.plugin.Initializable;
import rs09.game.node.entity.skill.skillcapeperks.SkillcapePerks;
import rs09.plugin.PluginManager;
/**
@@ -70,7 +71,7 @@ public final class SmithingPlugin extends UseWithHandler {
player.getDialogueInterpreter().sendDialogue("Property of Doric the Dwarf.");
return true;
}
if (!player.getInventory().contains(2347, 1)) {
if (!player.getInventory().contains(2347, 1) && !SkillcapePerks.isActive(SkillcapePerks.BAREFISTED_SMITHING,player)) {
player.getDialogueInterpreter().sendDialogue("You need a hammer to work the metal with.");
return true;
} else {
@@ -110,6 +110,7 @@ enum class SkillcapePerks(val attribute: String, val effect: ((Player) -> Unit)?
if(!isActive(this,player)){
player.setAttribute("/save:$attribute",true)
}
player.debug("Activated ${this.name}")
if(this == CONSTANT_GLOW)
DarkZone.checkDarkArea(player)
}