View Single Post
11/18/14, 03:19 PM   #13
Sasky
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 231
Nice, farangkao.

Better yet, put the check right at the beginning so you exit as quickly as possible:
Lua Code:
  1. function MB.SingleSlotUpdate(eventCode,bagId, slotId, isNewItem, itemSoundCategory, updateReason)
  2.     if not isNewItem then
  3.         return
  4.     end
  5.  
  6.     -- Actual code here
  7. end


Though as circonian noted, it does remove details in the dataEntry table. So if you use that or cache the slotIndex values, you're going to need to update the slots instead of this (and should probably do it as a delayed full scan).
  Reply With Quote