Enum Class RunePouch.RuneSlot

java.lang.Object
java.lang.Enum<RunePouch.RuneSlot>
net.storm.api.magic.RunePouch.RuneSlot
All Implemented Interfaces:
Serializable, Comparable<RunePouch.RuneSlot>, Constable
Enclosing class:
RunePouch

public static enum RunePouch.RuneSlot extends Enum<RunePouch.RuneSlot>
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.

  • Enum Constant Details

    • FIRST

      public static final RunePouch.RuneSlot FIRST
      The first slot of the Rune Pouch.
    • SECOND

      public static final RunePouch.RuneSlot SECOND
      The second slot of the Rune Pouch.
    • THIRD

      public static final RunePouch.RuneSlot THIRD
      The third slot of the Rune Pouch.
    • FOURTH

      public static final RunePouch.RuneSlot FOURTH
      The fourth slot of the Rune Pouch (Divine only).
  • Method Details

    • values

      public static RunePouch.RuneSlot[] 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

      public static RunePouch.RuneSlot valueOf(String name)
      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 name
      NullPointerException - 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

      public String 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 null if 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