Enum Class MapleInventoryType

java.lang.Object
java.lang.Enum<MapleInventoryType>
client.inventory.MapleInventoryType
All Implemented Interfaces:
Serializable, Comparable<MapleInventoryType>, Constable

public enum MapleInventoryType extends Enum<MapleInventoryType>
背包分頁類型的列舉,對應用戶端協定中的背包類型編號。

每個常數持有一個 byte 類型值(type),可透過 getType() 取得、getByType(byte) 反查; getBitfieldEncoding() 回傳協定中的位元欄位遮罩(2 << type)。

支援的分頁包含:

  • EQUIP(1):裝備背包
  • USE(2):消耗品背包
  • SETUP(3):設置背包
  • ETC(4):其他背包
  • CASH(5):楓點背包
  • EQUIPPED(-1):已穿戴格位,非獨立背包分頁

getByWZName(String) 提供 WZ 資料中英文節點名稱(如 "Consume""Eqp") 到類型的映射,供 server.MapleItemInformationProvider 解析道具分類使用。

  • Enum Constant Details

  • Method Details

    • values

      public static MapleInventoryType[] 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 MapleInventoryType 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 byte getType()
    • getBitfieldEncoding

      public short getBitfieldEncoding()
    • getByType

      public static MapleInventoryType getByType(byte type)
    • getByWZName

      public static MapleInventoryType getByWZName(String name)