Merge branch 'fix-smithing-perk' into 'master'

The barefisted smithing perk now properly activates

See merge request 2009scape/2009scape!91
This commit is contained in:
Ceikry
2021-07-02 16:06:54 +00:00
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)
}