GetNumCrownGemsFromItemManualGemification

From ESOUI Wiki

Jump to: navigation, search

This function returns multiple values indicating information about the item in a specified bag slot, and whether that item can be "gemified" (i.e. whether the player can extract Crown Crate Gems from it, destroying it in the process).

Contents

Arguments

bagId
A number representing the bag to check; it must be one of the built-in Bag values.
slotIndex
The numeric index of the slot in that bag which should be checked. For most bags, this is a number ranging from 1 to the size of the bag.

Return values

itemsRequired
The player must have at least this many of the item in order to gemify it. Every time the player gemifies this bag slot, they will lose this many of the item.
gemsAwarded
The player would receive this many gems by gemifying the item. To clarify, this is the number of gems awarded per (itemsRequired) items destroyed.

Syntax

function CanGemifyItem(bagId, slotIndex)
   if IsItemFromCrownCrate(bagId, slotIndex) and not IsItemPlayerLocked(bagId, slotIndex) then
      local itemsRequired, gemsAwarded = GetNumCrownGemsFromItemManualGemification(bagId, slotIndex)
      return gemsAwarded > 0 and itemsRequired > 0
   end
   return false
end

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox