Merge branch 'fix-zammywine' into 'master'

Fix wine of zamorak pickup interaction.

See merge request 2009scape/2009scape!363
This commit is contained in:
Ceikry 2021-12-30 17:22:30 +00:00
commit 5d4c67b02a
4 changed files with 8 additions and 5 deletions

View file

@ -80,3 +80,4 @@
- Add Family Crest quest.
- Add mort myre stems and pears to bloom's effect, and add the sound effect for bloom.
- Add proper sound effects for the explorer's ring and fix leaf-bladed sword's sound effects.
- Fix wine of zamorak pickup interaction.

View file

@ -61,7 +61,6 @@ public final class FaladorNodePlugin extends OptionHandler {
// dwarven mine
SceneryDefinition.forId(30868).getHandlers().put("option:squeeze-through", this);
SceneryDefinition.forId(5020).getHandlers().put("option:ride", this);
ItemDefinition.forId(245).getHandlers().put("option:take", this);
// fally park.
NPCDefinition.forId(2290).getHandlers().put("option:talk-to", this);
SceneryDefinition.forId(11708).getHandlers().put("option:close", this);

View file

@ -355,9 +355,12 @@ public final class InteractionPacket implements IncomingPacket {
player.debug("Handled by quest interaction manager.");
return;
}
if(InteractionListeners.run(item.getId(), InteractionListener.Companion.getGROUNDITEM(), option.getName(),player,item)){
if(InteractionListeners.run(item.getId(), InteractionListener.Companion.getGROUNDITEM(), option.getName(), player, item)) {
return;
}
}
if(InteractionListeners.run(item.getId(), InteractionListener.Companion.getITEM(), option.getName(), player, item)) {
return;
}
item.getInteraction().handle(player, option);
}

View file

@ -9,7 +9,7 @@ import rs09.game.interaction.InteractionListener
class WineOfZamorakInteraction : InteractionListener() {
override fun defineListeners() {
on(Items.WINE_OF_ZAMORAK_245,ITEM,"take"){player, wine ->
on(Items.WINE_OF_ZAMORAK_245,GROUNDITEM,"take"){player, wine ->
if(player.location.regionId != 11574){
PickupHandler.take(player, wine as GroundItem)
return@on true
@ -24,4 +24,4 @@ class WineOfZamorakInteraction : InteractionListener() {
return@on true
}
}
}
}