Quantcast
WoWInterface - View Single Post - Logging the item my character acquired
View Single Post
05-19-17, 08:26 AM   #4
Kakjens
A Cliff Giant
Join Date: Apr 2017
Posts: 75
Originally Posted by Eommus View Post
Thanks. I moved LootLog = {} to just above table.insert(LootLog, itemName), but it saves the items only for the current session. The next time I log in, the items log is empty. I want it to be saved between sessions.

Let's say, I acquired 100 items in a play session, I want them all to be logged in the LootLog.lua savedvariable file. In my next play session, say, I acquired 60 items, I want them to be added to the same file. A growing log of items in other words.
I don't see how moving LootLog = {} to just above table.insert(LootLog, itemName) would save anything but the last entry.
Also, I don't see how you are loading items from previous session.
Instead of table.insert(LootLog, itemName) I would suggest using LootLog[itemName] = {}, assuming you don't want to track how many items you obtained.
Edit. Also, there might be better events to watch, for example, "BAG_UPDATE_DELAYED" or events dealing with loot. Additionally, I think long time ago there was an addon that tracked what previously dropped from a mob. Due to AoE looting, it might be abandoned.

Last edited by Kakjens : 05-19-17 at 08:46 AM.
  Reply With Quote