Logging the item my character acquired
View Single Post
05-19-17, 09:48 AM
A Molten Giant
Join Date: Apr 2007
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.
Lua Wall of Shame
Don't like combat text on frames?
View Public Profile
Send a private message to Kanegasi
Find More Posts by Kanegasi