View Single Post
04/21/14, 08:21 PM   #1
Sharlikran
 
Sharlikran's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 666
I need to Test and Event

There is an event EVENT_LOOT_RECEIVED and there are a few different ways of defining it. The way that seems to be working is this
Lua Code:
  1. function Harvest.OnLootReceived( eventCode, receivedBy, objectName, stackCount, soundCategory, lootType, lootedBySelf )
The Wiki is reporting it as (string receivedBy, string itemName, integer quantity, integer itemSound, integer lootType, bool self) which is one less parameter. I think tha the last parameter is important because I use it. Currently it's used in HarvestMap to see if the player looted the item. They can't both be right.

Can I call the event like, var1, var2, var3, var4, var5, var6, var7 = EVENT_LOOT_RECEIVED or do i need to register an event like "EVENT_MANAGER:RegisterForEvent("HarvestMap", EVENT_LOOT_RECEIVED, Harvest.OnLootReceived)" to that it will fire on auto loot and then try to decode those variables.

What is the best way to go about checking that?
  Reply With Quote