Clean up remaining issues on prayer plugin

This commit is contained in:
Gary Tierney
2018-03-31 22:12:34 +01:00
parent 59a651a1eb
commit 7c59c2c3a5
2 changed files with 12 additions and 10 deletions
@@ -34,14 +34,16 @@ on { ItemOptionMessage::class }
class BuryBoneAction(val player: Player, val slot: Int, val bone: Bone) : AsyncAction<Player>(0, true, player) {
override fun action(): ActionBlock = {
if (player.inventory.get(slot).id == bone.id) {
if (player.inventory.removeSlot(slot, 1) > 0) {
player.sendMessage("You dig a hole in the ground...")
player.playAnimation(BURY_BONE_ANIMATION)
wait(1) //Wait for animation
player.inventory.reset(slot)
player.sendMessage("You bury the bones.")
player.prayer.experience += bone.xp
}
stop()
}
}