API GetLootRollItemInfo

Returns information about the loot event with rollID.

texture, name, count, quality, bindOnPickUp, canNeed, canGreed, canDisenchant, reasonNeed, reasonGreed, reasonDisenchant, deSkillRequired = GetLootRollItemInfo(rollID)

Arguments

 * rollID : Number - The number increments by 1 for each new roll. The count is not reset by reloading the UI.

Returns

 * texture : String - The path of the texture of the item icon.
 * name : String - The name of the item.
 * count : Number - The quantity of the item.
 * quality : Number - The quality of the item. Starting with 1 for common, going up to 5 for legendary.
 * bindOnPickUp : Flag - Returns 1 when the item is bind on pickup, nil otherwise.
 * canNeed : Flag - Returns 1 when you can roll need on the item, nil otherwise.
 * canGreed : Flag - Returns 1 when you can roll greed on the item, nil otherwise.
 * canDisenchant : Flag - Returns 1 when you can disenchant the item, nil otherwise.
 * reasonNeed : Number - See details.
 * reasonGreed : Number - See details.
 * reasonDisenchant : Number - See details.
 * deSkillRequired : Number - Required skill in enchanting to disenchant the item.

Details
The return values reasonNeed/reasonGreed/reasonDisenchant can be numbers from 0 to 5. The following logic is used in FrameXML:

If the player cannot roll need/greed/disenchant, the respective loot button is disabled and gets a tooltip from one of the following global strings, where the number is determined by the return values reasonNeed/reasonGreed/reasonDisenchant:


 * LOOT_ROLL_INELIGIBLE_REASON1: "Your class may not roll need on this item."
 * LOOT_ROLL_INELIGIBLE_REASON2: "You already have the maximum amount of this item."
 * LOOT_ROLL_INELIGIBLE_REASON3: "This item may not be disenchanted."
 * LOOT_ROLL_INELIGIBLE_REASON4: "You do not have an Enchanter of skill %d in your group."
 * LOOT_ROLL_INELIGIBLE_REASON5: "Need rolls are disabled for this item."

For example NeedButton.reason = _G["LOOT_ROLL_INELIGIBLE_REASON"..reasonNeed]. If the player can roll need/greed/disenchant the respective value of reasonNeed/reasonGreed/reasonDisenchant returns 0.