Xivgear Types Documentation
    Preparing search index...

    Class CharacterGearSet

    Class representing equipped gear, food, and other overrides.

    Index

    Constructors

    Properties

    checkpointEnabled: boolean = false
    checkpointTimer: Inactivitytimer = ...
    currentCheckpoint: GearSetCheckpointNode = undefined
    displaySettings: SetDisplaySettings = ...
    equipment: EquipmentSet
    isSeparator: boolean = false
    listeners: (() => void)[] = []
    materiaMemory: MateriaMemory = ...
    relicStatMemory: RelicStatMemory = ...

    Accessors

    • get description(): string

      Optional description for the set. May be undefined if not specified.

      Returns string

    • set description(desc: string): void

      Parameters

      • desc: string

      Returns void

    • get job(): | "PLD"
      | "WAR"
      | "DRK"
      | "GNB"
      | "WHM"
      | "SCH"
      | "AST"
      | "SGE"
      | "MNK"
      | "DRG"
      | "NIN"
      | "SAM"
      | "RPR"
      | "VPR"
      | "BRD"
      | "MCH"
      | "DNC"
      | "BLM"
      | "SMN"
      | "RDM"
      | "PCT"
      | "BLU"

      Returns
          | "PLD"
          | "WAR"
          | "DRK"
          | "GNB"
          | "WHM"
          | "SCH"
          | "AST"
          | "SGE"
          | "MNK"
          | "DRG"
          | "NIN"
          | "SAM"
          | "RPR"
          | "VPR"
          | "BRD"
          | "MCH"
          | "DNC"
          | "BLM"
          | "SMN"
          | "RDM"
          | "PCT"
          | "BLU"

    • get jobOverride(): | "PLD"
      | "WAR"
      | "DRK"
      | "GNB"
      | "WHM"
      | "SCH"
      | "AST"
      | "SGE"
      | "MNK"
      | "DRG"
      | "NIN"
      | "SAM"
      | "RPR"
      | "VPR"
      | "BRD"
      | "MCH"
      | "DNC"
      | "BLM"
      | "SMN"
      | "RDM"
      | "PCT"
      | "BLU"

      Returns
          | "PLD"
          | "WAR"
          | "DRK"
          | "GNB"
          | "WHM"
          | "SCH"
          | "AST"
          | "SGE"
          | "MNK"
          | "DRG"
          | "NIN"
          | "SAM"
          | "RPR"
          | "VPR"
          | "BRD"
          | "MCH"
          | "DNC"
          | "BLM"
          | "SMN"
          | "RDM"
          | "PCT"
          | "BLU"

    • set jobOverride(
          job:
              | "PLD"
              | "WAR"
              | "DRK"
              | "GNB"
              | "WHM"
              | "SCH"
              | "AST"
              | "SGE"
              | "MNK"
              | "DRG"
              | "NIN"
              | "SAM"
              | "RPR"
              | "VPR"
              | "BRD"
              | "MCH"
              | "DNC"
              | "BLM"
              | "SMN"
              | "RDM"
              | "PCT"
              | "BLU",
      ): void

      Parameters

      • job:
            | "PLD"
            | "WAR"
            | "DRK"
            | "GNB"
            | "WHM"
            | "SCH"
            | "AST"
            | "SGE"
            | "MNK"
            | "DRG"
            | "NIN"
            | "SAM"
            | "RPR"
            | "VPR"
            | "BRD"
            | "MCH"
            | "DNC"
            | "BLM"
            | "SMN"
            | "RDM"
            | "PCT"
            | "BLU"

      Returns void

    • get name(): string

      The name of the set

      Returns string

    • set name(name: string): void

      Parameters

      • name: string

      Returns void

    Methods

    • Add a listener, which will be called when modifications are made to this set.

      Parameters

      • listener: () => void

      Returns void

    • Whether there is a next checkpoint available.

      Returns boolean

    • Whether there is a previous checkpoint available.

      Returns boolean

    • Like setting jobOverride, but does not trigger any hooks. Useful when initializing an imported set, as the hooks and such will not have been configured correctly.

      Parameters

      • job:
            | "PLD"
            | "WAR"
            | "DRK"
            | "GNB"
            | "WHM"
            | "SCH"
            | "AST"
            | "SGE"
            | "MNK"
            | "DRG"
            | "NIN"
            | "SAM"
            | "RPR"
            | "VPR"
            | "BRD"
            | "MCH"
            | "DNC"
            | "BLM"
            | "SMN"
            | "RDM"
            | "PCT"
            | "BLU"

      Returns void

    • Perform a materia auto-fill.

      Parameters

      • prio: MateriaAutoFillPrio

        The priority of stats.

      • overwrite: boolean

        true to fill all slots, even if already occupied. false to only fill empty slots.

      • Optionalslots: (
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Weapon"
            | "RingLeft"
            | "RingRight"
        )[]

        Omit to fill all slots. Specify one or more slots to specifically fill those slots.

      Returns void

    • Invalidate calculations for this set, and notify listeners that something has changed about the set, possibly triggering a UI refresh. This will typically also save and create an undo checkpoint.

      Returns void

    • Run a function against every equipment slot which has an item equipped.

      Parameters

      • f: (
            key:
                | "OffHand"
                | "Head"
                | "Body"
                | "Hand"
                | "Legs"
                | "Feet"
                | "Ears"
                | "Neck"
                | "Wrist"
                | "Weapon"
                | "RingLeft"
                | "RingRight",
            item: EquippedItem,
        ) => void

        The function. The first parameter is the EquipSlotKey, the second is the EquippedItem.

      Returns void

    • Run a function against every materia slot on currently equipped gear.

      Parameters

      • f: (
            key:
                | "OffHand"
                | "Head"
                | "Body"
                | "Hand"
                | "Legs"
                | "Feet"
                | "Ears"
                | "Neck"
                | "Wrist"
                | "Weapon"
                | "RingLeft"
                | "RingRight",
            item: EquippedItem,
            slot: MeldableMateriaSlot,
            slotIndex: number,
        ) => void

        The function. The first parameter is the EquipSlotKey, the second is the EquippedItem, third is the materia slot itself, and fourth is the index of the materia slot on the item.

      Returns void

    • Run a function against every equipment slot, regardless of whether anything is equipped or not.

      Parameters

      • f: (
            key:
                | "OffHand"
                | "Head"
                | "Body"
                | "Hand"
                | "Legs"
                | "Feet"
                | "Ears"
                | "Neck"
                | "Wrist"
                | "Weapon"
                | "RingLeft"
                | "RingRight",
            item: EquippedItem,
        ) => void

        The function. The first parameter is the EquipSlotKey, the second is the EquippedItem or null if nothing is equipped.

      Returns void

    • Parameters

      • slotId:
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Weapon"
            | "RingLeft"
            | "RingRight"

      Returns RawStats

    • Get the effective stats and issues pertaining to a specific slot.

      Parameters

      • slotId:
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Weapon"
            | "RingLeft"
            | "RingRight"

      Returns { issues: GearSetIssue[]; stats: RawStats }

    • Whether a stat is relevant to this set.

      Parameters

      Returns boolean

    • Notify listeners that something has changed, without invalidating. This will typically also save and create an undo checkpoint.

      Returns void

    • Request a checkpoint be recorded.

      Returns void

    • Perform a redo - i.e. restore this set's state to the next checkpoint.

      If there was no previous checkpoint, returns false.

      Returns boolean

    • Parameters

      • val: boolean

      Returns void

    • Set a new equipment piece into the given slot. Unlike directly setting fields on equipment, this will also handle things like materia autofill, invalidation, saving, etc.

      Parameters

      • slot:
            | "OffHand"
            | "Head"
            | "Body"
            | "Hand"
            | "Legs"
            | "Feet"
            | "Ears"
            | "Neck"
            | "Wrist"
            | "Weapon"
            | "RingLeft"
            | "RingRight"
      • item: GearItem
      • OptionalmateriaAutoFillController: MateriaAutoFillController

      Returns void

    • Initialize the undo/checkpoint mechanism.

      Parameters

      • hook: () => void

        A hook which will be called when a roll back/forward happens.

      Returns void

    • Perform an undo - i.e. restore this set's state to the previous checkpoint.

      If there was no previous checkpoint, returns false.

      Returns boolean