From a52b1abf852392164bea84e787c98fce7c00692a Mon Sep 17 00:00:00 2001 From: Avi Weinstock Date: Sun, 14 Aug 2022 04:25:03 +0000 Subject: [PATCH] Removed GildedAltarPlugin (actual gilded altars are handled by BoneOfferPlugin) --- .../item/withobject/GildedAltarPlugin.java | 60 ------------------- 1 file changed, 60 deletions(-) delete mode 100644 Server/src/main/java/core/game/interaction/item/withobject/GildedAltarPlugin.java diff --git a/Server/src/main/java/core/game/interaction/item/withobject/GildedAltarPlugin.java b/Server/src/main/java/core/game/interaction/item/withobject/GildedAltarPlugin.java deleted file mode 100644 index 1dc8fedf7..000000000 --- a/Server/src/main/java/core/game/interaction/item/withobject/GildedAltarPlugin.java +++ /dev/null @@ -1,60 +0,0 @@ -package core.game.interaction.item.withobject; - -import core.game.content.global.Bones; -import core.game.node.entity.skill.Skills; -import core.game.interaction.NodeUsageEvent; -import core.game.interaction.UseWithHandler; -import core.game.node.entity.player.Player; -import core.game.world.update.flag.context.Animation; -import core.game.world.update.flag.context.Graphics; -import core.plugin.Initializable; -import core.plugin.Plugin; - -/** - * Handles the guilded altar. - * @author Vexia - * - */ -@Initializable -public class GildedAltarPlugin extends UseWithHandler { - - /** - * The animation for the player. - */ - private static final Animation ANIMATION = new Animation(713); - - /** - * The graphics for the player. - */ - private static final Graphics GRAPHICS = new Graphics(624); - - /** - * Constructs the {@code GuildedAltarPlugin} - */ - public GildedAltarPlugin() { - super(Bones.getArray()); - } - - @Override - public Plugin newInstance(Object arg) throws Throwable { - addHandler(24343, OBJECT_TYPE, this); - return this; - } - - @Override - public boolean handle(NodeUsageEvent event) { - final Player player = event.getPlayer(); - final Bones bone = Bones.forId(event.getUsedItem().getId()); - if (bone == null) { - return true; - } - if (player.getInventory().remove(event.getUsedItem(), event.getUsedItem().getSlot(), true)) { - player.lock(ANIMATION.getDelay()); - player.visualize(ANIMATION, GRAPHICS); - player.getSkills().addExperience(Skills.PRAYER, bone.getExperience() * 2.5); - player.sendMessage("The gods are very pleased with your offering."); - } - return true; - } - -}