mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 16:51:37 +00:00
Clean up remaining issues on prayer plugin
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user