Quantcast
WoWInterface - View Single Post - Logging the item my character acquired
View Single Post
05-19-17, 03:09 PM   #11
Kakjens
A Cliff Giant
Join Date: Apr 2017
Posts: 75
Link in gamepedia about CHAT_MSG_LOOT.
When comparing OnEvent scripts, both the frequency of the event firing, and the complexity of it (for example, getting info from inventory is slower than doing arithmetical operations with local variables).
The frequency of different events can be estimated by assigning an integer to number of calls of particular event. The complexity of code can be evaluated by having it repeated CRAZY but the same number of times (say, 10000), and recording execution time.
With BAG_UPDATE in this particular case it's looping through inventory many times per session despite (potentially) just rearranging items in bag/splitting a stack.
With CHAT_MSG_LOOT the corresponding script of getting itemlink from the text, or saving the text as is. Moreover, it's supposed to run just when you receive an item.
  Reply With Quote