diff --git a/Server/src/main/java/core/game/interaction/npc/NPCTradePlugin.kt b/Server/src/main/java/core/game/interaction/npc/NPCTradePlugin.kt index f2f3bb769..f867050d2 100644 --- a/Server/src/main/java/core/game/interaction/npc/NPCTradePlugin.kt +++ b/Server/src/main/java/core/game/interaction/npc/NPCTradePlugin.kt @@ -32,4 +32,16 @@ class NPCTradePlugin : InteractionListener() { return@on npc.openShop(player) } } + + override fun defineDestinationOverrides() { + setDest(NPC,"trade","shop"){node -> + val npc = node as NPC + if (npc.getAttribute("facing_booth", false)) { + val offsetX = npc.direction.stepX shl 1 + val offsetY = npc.direction.stepY shl 1 + return@setDest npc.location.transform(offsetX, offsetY, 0) + } + return@setDest node.location + } + } } \ No newline at end of file