GetJournalQuestRewardInfo

From ESOUI Wiki

Jump to: navigation, search

This function returns information on a quest reward.

Contents

Arguments

journalIndex
The index of the quest to retrieve; it must be a number between 1 and GetNumJournalQuests(), inclusive.
rewardIndex
The index of the reward to retrieve; it must be a number between 1 and GetJournalQuestNumRewards(journalIndex), inclusive.

Return values

type
A RewardType value.
name
The name of the reward.
amount
How many of the reward will be received.
iconFile
A texture path.
meetsUsageRequirement
A boolean indicating whether the player meets any applicable level and Champion Point requirements for using the reward item.
itemQuality
An ItemQuality value representing the reward's rarity.
rewardType
A RewardItemType value, or nil.

Example

local desiredQuest = "The Covetous Countess"
 
local count = GetNumJournalQuests()
for i = 1, count do
   local name = GetJournalQuestName(i)
   if name == desiredQuest then
      --
      -- We found the quest we're interested in.
      --
      d(name .. " awards the following items when completed:")
      local count = GetJournalQuestNumRewards(i)
      for j = 1, count do
         local type, name, amount, _, _, _, rewardType = GetJournalQuestRewardInfo(i, j)
         if type == REWARD_TYPE_AUTO_ITEM and rewardType == REWARD_ITEM_TYPE_ITEM then
            local id = GetJournalQuestRewardItemId(i, j)
            d("Item ID: " .. id)
         end
      end
      --
      -- Now let's stop iterating over the other quests:
      --
      break
   end
end

External links

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox