forked from runelite/runelite
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathItemDefinition.java
117 lines (103 loc) · 2.65 KB
/
ItemDefinition.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package net.runelite.api;
/**
* Represents the template of a specific item type.
*/
public interface ItemDefinition
{
/**
* Gets the items name.
*
* @return the name of the item
*/
String getName();
/**
* Gets the items ID.
*
* @return the items ID
* @see ItemID
*/
int getId();
/**
* Gets a value specifying whether the item is noted.
*
* @return 799 if noted, -1 otherwise
*/
int getNote();
/**
* Gets the item ID of the noted or unnoted variant of this item.
* <p>
* Calling this method on a noted item will result in the ID of itself
* in unnoted form, and on an unnoted item its noted variant.
*
* @return the noted or unnoted variant of this item
*/
int getLinkedNoteId();
/**
* Gets the item ID of the normal or placeholder variant of this item.
* <p>
* Calling this method on a normal item will result in the ID of itself
* in placeholder form, and on a placeholder item its normal variant.
*
* @return the normal or placeholder variant of this item
*/
int getPlaceholderId();
/**
* Gets a value specifying whether the item is a placeholder.
*
* @return 14401 if placeholder, -1 otherwise
*/
int getPlaceholderTemplateId();
/**
* Gets the store price of the item.
* <p>
* Although not all items can be found in a store, they have a store price
* which can be used to calculate high and low alchemy values. Multiplying
* the price by {@code 0.6} and {@code 0.4} gives these high and low
* alchemy values, respectively.
*
* @return the general store value of the item
*
* @see Constants#HIGH_ALCHEMY_MULTIPLIER
*/
int getPrice();
/**
* Checks whether the item is members only.
*
* @return true if members only, false otherwise.
*/
boolean isMembers();
/**
* Checks whether the item is able to stack in a players inventory.
*
* @return true if stackable, false otherwise
*/
boolean isStackable();
/**
* Returns whether or not the item can be sold on the grand exchange.
*/
boolean isTradeable();
/**
* Gets an array of possible right-click menu actions the item
* has in a player inventory.
*
* @return the inventory menu actions
*/
String[] getInventoryActions();
/**
* Gets the menu action index of the shift-click action.
*
* @return the index of the shift-click action
*/
int getShiftClickActionIndex();
/**
* Sets the menu action index of the shift-click action.
*
* @param shiftClickActionIndex the new index of the shift-click action
*/
void setShiftClickActionIndex(int shiftClickActionIndex);
/**
* Resets the menu action index of the shift-click action to its
* default value.
*/
void resetShiftClickActionIndex();
}