View Single Post
05-04-20, 09:43 AM   #1
zZeroFJ
A Defias Bandit
Join Date: May 2020
Posts: 2
itemSellPrice differs from actual ingame selling price

Hey, I just got into scripting in Lua today. I want to create a small WeakAura, that displays an icon next to the Quest Reward with the highest vendor selling price.

I got as far as icons only showing with the QuestFrameRewardPanel open, and calling itemSellPrice on various items by its IDs. While experimenting with itemSellPrice, I realized that the selling price from the database is often different to the actual ingame selling price. I suppose that's due to quest rewards scaling with the level of the player, and with it the vendor selling prices.

Is there a way to call GetItemInfo() directly on the items shown in the QuestFrameRewardPanel? I found GetQuestLogChoiceInfo(i) to be perfect for extracting the name of the item rewards, but found no way to call GetItemInfo() directly on the items shown in the Rewards Panel. Is there a way to access the itemSellPrice of the QuestLogChoices?


Edit: I realized by now, that GetQuestLogChoiceInfo() only works if you selected the quest in your quest log. GetNumQuestChoices() and GetQuestChoiceInfo()[?] were the methods I was looking for. However, GetQuestChoiceInfo() does not work the same way GetQuestLogChoiceInfo() does, so I'm not even able to access the names of the rewarded items. I don't know whether that is due to WeakAuras not being able to run C code, or me using the methods wrong.

Is there a way to access the names/IDs of the items from the QuestRewardPanel?

Lua Code:
  1. GetRewardMoney - Returns the amount of money awarded when completing a quest
  2. GetRewardSpell - Returns information about a spell awarded when completing a quest
  3. GetRewardTalents - Returns the talent points awarded when completing a quest
  4. GetRewardText - Returns questgiver dialog to be displayed when completing a quest
  5. GetRewardTitle - Returns the title awarded when completing a quest
  6. GetRewardXP

These are all methods that access some part of the reward interaction initiated by the QUEST_COMPLETE and finished by the QUEST_FINISHED events. But I didn't find a method to access any of the information about the items, only the amount by calling GetNumQuestChoices().

Last edited by zZeroFJ : 05-04-20 at 02:27 PM.
  Reply With Quote