Module unit.Player.Equipment

This is the Player Equipment module.

Functions

Player:GetEquipment () Returns the player's current equipped items.
Player:GetOnUseItems () Returns a list of usable items currently equipped by the player.
Player:GetTrinketItems () Returns the player's equipped trinkets.
Player:UpdateEquipment () Updates the player's equipped items and usable items lists.
Player:GetUsableItem (excludedItemIDs, slotID) Retrieves a usable item from the player's equipped items, optionally excluding certain items and filtering by slot.
Player:HasTier (tier, pieces) Checks if the player has a certain number of pieces from a specific tier set.


Functions

Player:GetEquipment ()
Returns the player's current equipped items.

Returns:

    table A table where keys are inventory slot IDs and values are item IDs.
Player:GetOnUseItems ()
Returns a list of usable items currently equipped by the player.

Returns:

    table A numerically indexed table of `Item` objects that are usable.
Player:GetTrinketItems ()
Returns the player's equipped trinkets.

Returns:

  1. Item trinket1 The first trinket item object, or an `Item(0)` if no trinket is equipped in the first slot.
  2. Item trinket2 The second trinket item object, or an `Item(0)` if no trinket is equipped in the second slot.
Player:UpdateEquipment ()
Updates the player's equipped items and usable items lists. Also updates the status of worn tier sets. This function queries the game API for the player's current equipment.
Player:GetUsableItem (excludedItemIDs, slotID)
Retrieves a usable item from the player's equipped items, optionally excluding certain items and filtering by slot.

Parameters:

  • excludedItemIDs table An optional table of item IDs to exclude from the search.
  • slotID number An optional inventory slot ID to filter the search by.

Returns:

  1. Item|nil The usable `Item` object if found, otherwise nil.
  2. number|nil The effective range of the usable item if found, otherwise nil.
Player:HasTier (tier, pieces)
Checks if the player has a certain number of pieces from a specific tier set.

Parameters:

  • tier string The name or identifier of the tier set (e.g., "TWWS1", "TWW2").
  • pieces number The number of pieces to check for (e.g., 2 for 2-piece bonus, 4 for 4-piece bonus).

Returns:

    boolean True if the player has the specified number of pieces from the tier set, false otherwise.
generated by LDoc 1.5.0 Last updated 2025-08-07 15:27:51