Quantcast
WoWInterface - View Single Post - How to track if a Reagent was used from Reagent Bank while crafting?
View Single Post
01-17-21, 10:01 AM   #1
Xruptor
A Flamescale Wyrmkin
 
Xruptor's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2005
Posts: 126
How to track if a Reagent was used from Reagent Bank while crafting?

Hello all,

I've been pondering on what would be the best way to determine if an item was used from the Reagent Bank during crafting? My addon currently tracks the items in the Reagent Bank. However, when a user crafts something use the Tradeskill UI. It will consume items from the Reagent Bank. That item count won't be updated until they revisit the bank. This creates inaccurate item counts.

So I've been wracking my brain for a few days to come up with ideas on how to solve this. Sadly, I like none of the ideas i've come up with. Some of them are too elaborate and a few are just too simple.

One idea I had was to use GetTradeSkillReagentInfo and grab the playerReagentCount to determine if the reagent count is greater than what the player has in their inventory. Subtracting and then creating a modifier that utilizes the count in the reagent bank. This is terribly ugly way of doing it. As I would have to grab the current recipe being used (TradeSkillFrame.RecipeList:GetSelectedRecipeID()). Track when it's actually crafted using UNIT_SPELLCAST_SUCCEEDED and then record a modifier for the count.

I'm hoping a few of you can give some suggestions or ideas on how to tackle this. I've looked over the API and it's not very helpful for the situation I described above. If anyone know of any other methods/functions/events etc.. that would help please let me know as well.

Thanks in advance!
__________________
Click HERE for the ultimate idiot test.

if (sizeof(sadness) > sizeof(happiness)) { initDepression(); }

Last edited by Xruptor : 01-19-21 at 10:59 AM.
  Reply With Quote