Quantcast
WoWInterface - View Single Post - Logging the item my character acquired
View Single Post
05-20-17, 12:36 AM   #14
Eommus
A Fallenroot Satyr
Join Date: Apr 2017
Posts: 28
Originally Posted by Kakjens View Post
With CHAT_MSG_LOOT the corresponding script of getting itemlink from the text, or saving the text as is. Moreover, it's supposed to run just when you receive an item.
Thank you. It looks using CHAT_MSG_LOOT is more efficient than using BAG_UPDATE. I would assume, CHAT_MSG_LOOT is fired for any type of item acquisition. I will study how CHAT_MSG_LOOT works and try to use it instead.

Originally Posted by MunkDev View Post
It's unclear whether you want your addon to track items that you have acquired but no longer possess or just the items you currently have.
Sorry if my first post was unclear: I want to keep track of items I acquire from any source. This is for building my own item database. The item log will be a growing log of all items I have collected (since the start of the addon), it will have no duplicates, it will not have item counts. Currently, I am copying that data and using it in an Excel file for final storage. I do that like once a few days or a week and I delete the log, in order not to make it huge (i.e. thousands of items).

Originally Posted by Kanegasi View Post
That is called SavedVariables. They need to be declared in your .toc file in order to save them. Otherwise, what you have there is just a global table that will be discarded upon logout.
Yes, I know that and I had it declared. I didn't think you would go ahead and code something after my last reply where I mentioned I had it working, but thank you very much for the effort.

You see, as a newbie, I don't know how something should be done, or what's the best approach for something in WoW LUA. So, I am following tips and advice given here or there. Yesterday, I was thinking BAG_UPDATE is the way to go, today, it became obvious that I need to use CHAT_MSG_LOOT as it will be more efficient for what I am trying to accomplish, which is simply logging what items I acquire.

Now, I need to figure out how to get the itemlink from the CHAT_MSG_LOOT event.

Last edited by Eommus : 05-20-17 at 02:05 AM.
  Reply With Quote