RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
StallData.java
1package com.osroyale.content.skill.impl.thieving;
2
3import com.osroyale.game.world.items.Item;
4
5import java.util.Arrays;
6import java.util.Optional;
7
49
50public enum StallData {
51 FOOD(4875, new Item(3162), 1, 25, 275),
52 GENERAL(4876, new Item(1887), 20, 50, 760),
53 CRAFTING(4874, new Item(1635), 40, 125, 1453),
54 RUNES(4877, new Item(8788), 50, 250, 2546),
55 SCIMITAR(4878, new Item(686), 80, 500, 3860);
56
58 private final int object;
59
61 private final Item item;
62
64 private final int level;
65
67 private final int experience;
68
70 private final int value;
71
73 StallData(int object, Item item, int level, int experience, int value) {
74 this.object = object;
75 this.item = item;
76 this.level = level;
77 this.experience = experience;
78 this.value = value;
79 }
80
82 public int getObject() {
83 return object;
84 }
85
87 public Item getItem() {
88 return item;
89 }
90
92 public int getLevel() {
93 return level;
94 }
95
97 public int getValue() {
98 return value;
99 }
100
102 public int getExperience() {
103 return experience;
104 }
105
107 public static Optional<StallData> forId(int id) {
108 return Arrays.stream(values()).filter(a -> a.object == id).findAny();
109 }
110
112 public static boolean isReward(Item item) {
113 if (item == null)
114 return false;
115 return Arrays.stream(values()).anyMatch(i -> i.getItem().getId() == item.getId());
116 }
117
119 public static final int getValue(Item item) {
120 return Arrays.stream(values()).filter(i -> i.getItem().getId() == item.getId()).findAny().get().getValue();
121 }
122}
static Optional< StallData > forId(int id)
StallData(int object, Item item, int level, int experience, int value)