Package net.storm.api.magic
Enum Class RunePouch.RuneSlot
- All Implemented Interfaces:
Serializable,Comparable<RunePouch.RuneSlot>,Constable
- Enclosing class:
RunePouch
Represents a slot within the Rune Pouch.
Each slot can hold one type of rune and tracks both the rune type and quantity through game variables.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintGets the quantity of runes stored in this slot.intGets the varbit index for the rune quantity in this slot.intGets the item ID of the rune stored in this slot.Gets the display name of the rune stored in this slot.intgetType()Gets the varbit index for the rune type in this slot.intGets the current varbit value for this slot's rune type.static RunePouch.RuneSlotReturns the enum constant of this class with the specified name.static RunePouch.RuneSlot[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FIRST
The first slot of the Rune Pouch. -
SECOND
The second slot of the Rune Pouch. -
THIRD
The third slot of the Rune Pouch. -
FOURTH
The fourth slot of the Rune Pouch (Divine only).
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getType
public int getType()Gets the varbit index for the rune type in this slot.- Returns:
- the type varbit index
-
getQuantityVarbitIdx
public int getQuantityVarbitIdx()Gets the varbit index for the rune quantity in this slot.- Returns:
- the quantity varbit index
-
getVarbit
public int getVarbit()Gets the current varbit value for this slot's rune type.The varbit value corresponds to a specific rune type (1=Air, 2=Water, etc.). A value of 0 indicates an empty slot.
- Returns:
- the varbit value representing the rune type, or 0 if empty
-
getRuneName
Gets the display name of the rune stored in this slot.The name is determined by the varbit value:
- 1 = Air rune
- 2 = Water rune
- 3 = Earth rune
- 4 = Fire rune
- 5-14 = Various catalytic runes
- 15-23 = Combination and special runes
- Returns:
- the rune name, or
nullif the slot is empty
-
getRuneId
public int getRuneId()Gets the item ID of the rune stored in this slot.The item ID is determined by the varbit value and corresponds to the actual game item IDs for runes.
- Returns:
- the rune item ID, or -1 if the slot is empty
-
getQuantity
public int getQuantity()Gets the quantity of runes stored in this slot.- Returns:
- the number of runes in this slot
-