diff --git a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop2/EW2Listeners.kt b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop2/EW2Listeners.kt index ba5831e86..5abd816d9 100644 --- a/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop2/EW2Listeners.kt +++ b/Server/src/main/content/region/kandarin/seers/quest/elementalworkshop2/EW2Listeners.kt @@ -724,35 +724,26 @@ class EW2Listeners : InteractionListener { } // stairs in the main level of the workshop - on(intArrayOf(Scenery.DOOR_18702, Scenery.STAIRS_18610, Scenery.STAIRS_18611), IntType.SCENERY, "climb-up", "climb-down") { player, node -> + on(intArrayOf(Scenery.DOOR_18702, Scenery.STAIRS_18610, Scenery.STAIRS_18611), IntType.SCENERY, "climb-up", "climb-down") { player, _ -> // locations - val playerLoc = toInstance(player, player.location) val northTop = toInstance(player, Location.create(1959, 5159, 3)) val northBottom = toInstance(player, Location.create(1957, 5159, 2)) val southTop = toInstance(player, Location.create(1948, 5149, 3)) val southBottom = toInstance(player, Location.create(1950, 5149, 2)) - // handlers + // handler options val climb = Animation(Animations.HUMAN_CLIMB_STAIRS_828) val up = "You climb up the stairs." val down = "You climb down the stairs." - when(node.id) { - // up - Scenery.STAIRS_18610 -> { - when(playerLoc) { - northBottom -> ClimbActionHandler.climb(player, climb, northTop, up) - southBottom -> ClimbActionHandler.climb(player, climb, southTop, up) - } - } - // down - Scenery.STAIRS_18611 -> { - when(playerLoc) { - northTop -> ClimbActionHandler.climb(player, climb, northBottom, down) - southTop -> ClimbActionHandler.climb(player, climb, southBottom, down) - } - } + // get destination + when(player.location) { + northBottom -> ClimbActionHandler.climb(player, climb, northTop, up) + southBottom -> ClimbActionHandler.climb(player, climb, southTop, up) + northTop -> ClimbActionHandler.climb(player, climb, northBottom, down) + southTop -> ClimbActionHandler.climb(player, climb, southBottom, down) } + return@on true }