From 55151cc72f49cf097e7dfa0d127b5554b67981cf Mon Sep 17 00:00:00 2001 From: ceikry Date: Thu, 1 Jul 2021 16:37:43 -0500 Subject: [PATCH] Wells nerfed --- .../item/withobject/WaterSourcePlugin.java | 5 +++++ Server/src/main/kotlin/api/ContentAPI.kt | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java b/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java index 9cae233b0..4d1f9377f 100644 --- a/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java +++ b/Server/src/main/java/core/game/interaction/item/withobject/WaterSourcePlugin.java @@ -1,5 +1,6 @@ package core.game.interaction.item.withobject; +import api.ContentAPI; import core.plugin.Initializable; import org.rs09.consts.Items; import core.game.interaction.NodeUsageEvent; @@ -11,6 +12,7 @@ import core.game.node.object.Scenery; import core.game.system.task.Pulse; import core.game.world.update.flag.context.Animation; import core.plugin.Plugin; +import rs09.game.system.SystemLogger; /** * Represents the plugin used to fill a bucket. @@ -40,6 +42,9 @@ public final class WaterSourcePlugin extends UseWithHandler { @Override public Plugin newInstance(Object arg) throws Throwable { for (int i : OBJECTS) { + if(ContentAPI.sceneryDefinition(i).getName().toLowerCase().contains("well")){ + continue; + } addHandler(i, OBJECT_TYPE, this); } return this; diff --git a/Server/src/main/kotlin/api/ContentAPI.kt b/Server/src/main/kotlin/api/ContentAPI.kt index b04703066..28dcd8de0 100644 --- a/Server/src/main/kotlin/api/ContentAPI.kt +++ b/Server/src/main/kotlin/api/ContentAPI.kt @@ -1,6 +1,7 @@ package api import core.cache.def.impl.ItemDefinition +import core.cache.def.impl.SceneryDefinition import core.game.component.Component import core.game.content.dialogue.FacialExpression import core.game.node.Node @@ -994,4 +995,14 @@ object ContentAPI { fun getQP(player: Player): Int{ return player.questRepository.points } + + /** + * Gets a scenery definition from the given ID + * @param id the ID of the scenery to get the definition for. + * @return the scenery definition + */ + @JvmStatic + fun sceneryDefinition(id: Int): SceneryDefinition{ + return SceneryDefinition.forId(id) + } } \ No newline at end of file