forked from 2009Scape/Server
fix for trading npcs behind booths/etc
This commit is contained in:
parent
3236f76f36
commit
659b504356
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue