RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
ItemDefinition.java
1package com.osroyale.util.parser.old.defs;
2
3import com.osroyale.Config;
4
44
45public class ItemDefinition {
46
48 public static final ItemDefinition[] DEFINITIONS = new ItemDefinition[Config.ITEM_DEFINITION_LIMIT];
49
51 private int id;
52
54 private String name;
55
57 private boolean members;
58
60 private boolean tradeable;
61
63 private boolean stackable;
64
66 private boolean droppable;
67
69 private boolean noteable;
70
72 private boolean noted;
73
75 private int notedId;
76
78 private int street_value;
79
81 private int base_value;
82
84 private int highAlch;
85
87 private int lowAlch;
88
90 private String examine;
91
93 private String destroyMessage;
94
96 private double weight;
97
98 public ItemDefinition(int id, String name, boolean members, boolean tradeable, boolean stackable, boolean droppable, boolean noteable, boolean noted, int notedId, int street_value, int base_value, int highAlch, int lowAlch, String examine, String destroyMessage, double weight) {
99 this.id = id;
100 this.name = name;
101 this.members = members;
102 this.tradeable = tradeable;
103 this.stackable = stackable;
104 this.droppable = droppable;
105 this.noteable = noteable;
106 this.noted = noted;
107 this.notedId = notedId;
108 this.street_value = street_value;
109 this.base_value = base_value;
110 this.highAlch = highAlch;
111 this.lowAlch = lowAlch;
112 this.examine = examine;
113 this.destroyMessage = destroyMessage;
114 this.weight = weight;
115 }
116
124 public static final ItemDefinition get(int id) {
125 if (id < 0 || id >= DEFINITIONS.length) {
126 return null;
127 }
128
129 return DEFINITIONS[id];
130 }
131
137 public int getId() {
138 return id;
139 }
140
146 public String getName() {
147 return name;
148 }
149
155 public String getExamine() {
156 return examine;
157 }
158
164 public String getDestroyMessage() {
165 return destroyMessage;
166 }
167
173 public boolean isNoted() {
174 return noted;
175 }
176
182 public boolean isNoteable() {
183 return noteable;
184 }
185
192 public int getParentId() {
193 if (!noteable) {
194 return id;
195 }
196 return noted ? notedId : get(notedId).notedId;
197 }
198
204 public int getNotedId() {
205 if (notedId == -1) {
206 return id;
207 }
208 return notedId;
209 }
210
216 public boolean isStackable() {
217 return stackable;
218 }
219
225 public boolean isDroppable() {
226 return droppable;
227 }
228
234 public boolean isTradeable() {
235 return tradeable;
236 }
237
243 public boolean isMembers() {
244 return members;
245 }
246
252 public int getStreetValue() {
253 return street_value;
254 }
255
261 public int getBaseValue() {
262 return base_value;
263 }
264
270 public int getValue() {
271 return getStreetValue();
272 }
273
279 public int getHighAlch() {
280 return highAlch;
281 }
282
288 public int getLowAlch() {
289 return lowAlch;
290 }
291
297 public double getWeight() {
298 return weight;
299 }
300
301}
static final int ITEM_DEFINITION_LIMIT
Definition Config.java:219