RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
UnfinishedPotion.java
1package com.osroyale.content.skill.impl.herblore;
2
3import com.osroyale.game.world.items.Item;
4
5import java.util.Arrays;
6
44
45public enum UnfinishedPotion implements Potion {
46 GUAM_POTION(91, 249, 1),
47 MARRENTILL_POTION(93, 251, 5),
48 TARROMIN_POTION(95, 253, 12),
49 HARRALANDER_POTION(97, 255, 22),
50 RANARR_POTION(99, 257, 30),
51 TOADFLAX_POTION(3002, 2998, 34),
52 SPIRIT_WEED_POTION(12181, 12172, 40),
53 IRIT_POTION(101, 259, 45),
54 WERGALI_POTION(14856, 14854, 1),
55 AVANTOE_POTION(103, 261, 50),
56 KWUARM_POTION(105, 263, 55),
57 SNAPDRAGON_POTION(3004, 3000, 63),
58 CADANTINE_POTION(107, 265, 66),
59 LANTADYME(2483, 2481, 69),
60 DWARF_WEED_POTION(109, 267, 72),
61 TORSTOL_POTION(111, 269, 78);
62
63 private final int product;
64 private final Item[] ingredients;
65 private final int level;
66
67 UnfinishedPotion(int product, int ingredient, int level) {
68 this.product = product;
69 this.ingredients = new Item[] { new Item(227), new Item(ingredient) };
70 this.level = level;
71 }
72
73 public static UnfinishedPotion get(Item use, Item with) {
74 for (final UnfinishedPotion potion : values()) {
75 if (potion.ingredients[0].equals(use) && potion.ingredients[1].equals(with) || potion.ingredients[1].equals(use) && potion.ingredients[0].equals(with)) {
76 return potion;
77 }
78 }
79 return null;
80 }
81
82 @Override
83 public int getAnimation() {
84 return -1;
85 }
86
87 @Override
88 public double getExperience() {
89 return 0;
90 }
91
92 @Override
93 public Item[] getIngredients() {
94 return Arrays.copyOf(ingredients, ingredients.length);
95 }
96
97 @Override
98 public int getLevel() {
99 return level;
100 }
101
102 @Override
103 public Item getProduct() {
104 return new Item(product);
105 }
106
107 @Override
108 public String toString() {
109 return "UnfinishedPotion[product: " + getProduct() + ", level: " + level + ", ingredients: " + Arrays.toString(ingredients) + "]";
110 }
111}