Skill requirements no longer ignored for Fremennik Trials and Lost City

This commit is contained in:
Lila Hioh 2022-08-13 13:34:46 +00:00 committed by Ryan
parent 1d9165e874
commit 31734cb540
2 changed files with 18 additions and 3 deletions

View file

@ -109,6 +109,9 @@ public enum WoodcuttingNode {
//Mahogany
MAHOGANY(9034,9035, (byte) 12),
//Swaying Tree
SWAYING_TREE(4142,-1, (byte) 30),
//Arctic pine
ARCTIC_PINE(21273,21274, (byte) 13),
@ -306,6 +309,14 @@ public enum WoodcuttingNode {
level = 1;
rewardAmount = Integer.MAX_VALUE;
break;
case 30:
reward = 3692;
respawnRate = -1;
rate = 0.05;
experience = 1;
level = 40;
rewardAmount = Integer.MAX_VALUE;
break;
}
}
WoodcuttingNode(int full, int empty, byte identifier, boolean farming){

View file

@ -12,6 +12,7 @@ import core.game.node.entity.player.link.diary.DiaryType
import core.game.node.entity.player.link.music.MusicEntry
import core.game.node.entity.skill.Skills
import core.game.node.entity.skill.gather.SkillingTool
import core.game.node.entity.skill.gather.woodcutting.WoodcuttingSkillPulse
import core.game.node.scenery.Scenery
import core.game.system.task.Pulse
import core.game.world.map.Location
@ -93,6 +94,10 @@ class TFTInteractionListeners : InteractionListener{
}
onUseWith(ITEM,KNIFE,TREE_BRANCH){player,_,_ ->
if (!player.skills.hasLevel(Skills.CRAFTING,40)) {
sendDialogue(player, "You need 40 crafting to do this!")
return@onUseWith true
}
if (inInventory(player,KNIFE))
Pulser.submit(BranchFletchingPulse(player))
else
@ -256,9 +261,8 @@ class TFTInteractionListeners : InteractionListener{
return@on true
}
on(SWAYING_TREE,SCENERY,"cut-branch"){ player, _ ->
SkillingTool.getHatchet(player)?.let { Pulser.submit(ChoppingPulse(player)).also { return@on true } }
sendMessage(player,"You need an axe which you have the woodcutting level to use to do this.")
on(SWAYING_TREE,SCENERY,"cut-branch"){ player, node ->
player.pulseManager.run(WoodcuttingSkillPulse(player, node as Scenery))
return@on true
}