slight bugfix

This commit is contained in:
Ceikry
2021-03-26 16:37:45 -05:00
parent f51be46f8b
commit 04b88c744e
@@ -1,33 +1,23 @@
package rs09.game.content.quest.members.thelosttribe package rs09.game.content.quest.members.thelosttribe
import core.cache.def.impl.NPCDefinition
import core.game.content.dialogue.FacialExpression import core.game.content.dialogue.FacialExpression
import core.game.interaction.OptionHandler
import core.game.node.Node
import core.game.node.entity.player.Player
import core.game.node.item.Item import core.game.node.item.Item
import core.game.system.task.Pulse import core.game.system.task.Pulse
import core.game.world.update.flag.context.Animation import core.game.world.update.flag.context.Animation
import core.plugin.Initializable
import core.plugin.Plugin
import org.rs09.consts.Items import org.rs09.consts.Items
import org.rs09.consts.NPCs
import rs09.game.interaction.InteractionListener
import rs09.game.world.GameWorld import rs09.game.world.GameWorld
@Initializable
/** /**
* handles pickpocketing sigmund during the lost tribe quest * handles pickpocketing sigmund during the lost tribe quest
* @author Ceikry * @author Ceikry
*/ */
class PickpocketSigmund : OptionHandler(){ class PickpocketSigmund : InteractionListener(){
override fun newInstance(arg: Any?): Plugin<Any> { val SIGMUND = NPCs.SIGMUND_2082
NPCDefinition.forId(2082).handlers["option:pickpocket"] = this
return this
}
override fun handle(player: Player?, node: Node?, option: String?): Boolean {
player ?: return false
node ?: return false
override fun defineListeners() {
on(SIGMUND,NPC,"pickpocket"){player, node ->
player.lock() player.lock()
GameWorld.Pulser.submit(object : Pulse(){ GameWorld.Pulser.submit(object : Pulse(){
var counter = 0 var counter = 0
@@ -48,7 +38,7 @@ class PickpocketSigmund : OptionHandler(){
return false return false
} }
}) })
return true return@on true
}
} }
} }