Quantcast
WoWInterface - View Single Post - Logging the item my character acquired
View Single Post
05-19-17, 09:48 AM   #5
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 556
The LootLog table initialization was fine where it was. The problem is that you're looking through your entire inventory every bag update, adding an item 183 times because you have 183 total slots. What I find weird is that it's adding the same item, but your code should add every item the way it's written.

In order to log a new item, you need to maintain a separate memory table that keeps track of what's in your bags, then log any difference. You can either log both additions and removals or just additions, like logging only if the bag/slot was empty and an item name was returned.

I would write up a working example, but I'm on my phone. I'll see if I can help later today.
  Reply With Quote