Originally Posted by Lombra
First of all you'd need to keep track of what's actually changed between every update, and not just store everything in your bags.
|
Interestingly, the code I have in post #6 above stores only items I acquire. It does not store everything in my bags. It looks it is not working as it should, but it is doing what I need it to do.
Currently, my addon works just fine. My only concern is whether it is efficient or not. From a general programming perspective, using BAG_UPDATE is not efficient for identifying newly acquired items. I currently don't know how to use CHAT_MSG_LOOT, but I will check. If there was a simple ITEM_RECIEVED event, that would be perfect.
Is there a way to check or compare two lua scripts in terms of efficiency? For example, using BAG_UPDATE vs using CHAT_MSG_LOOT.
@MunkDev, the current code stores only the newly acquired items, so, I will note your suggestion about C_NewItems, but I will not use it for the moment.
Thanks again.