View Single Post
05/04/14, 01:39 PM   #18
Flagrick
 
Flagrick's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 24
I think i have found something :

i' m using these events
  • EVENT_QUEST_TOOL_UPDATED
  • EVENT_QUEST_CONDITION_COUNTER_CHANGED
and i'm saving journalIndex

Then on an event EVENT_LOOT_RECEIVED ( receivedBy, itemName, quantity, itemSound, lootType, mine )
i'm testing GetItemLinkInfo(itemName)
if i do not have icon, i m testing saved informations from bag event
and if no icon then saved information with quest event (journalIndex)
Code:
local count=GetQuestToolCount(self.journalIndex)
		for i = 0, count do
			local iconFilename, stackCount, isUsable, name = GetQuestToolInfo(self.journalIndex, i)
			if (name==text) then
				icon=iconFilename
				break;
			end
		end
text is given by EVENT_LOOT_RECEIVED
and icon is the result i will used to print a lootdrop item

So, to test i have to find a quest with tools items to collect.
if it works (or not) i will say it

Last edited by Flagrick : 05/05/14 at 02:36 AM.
  Reply With Quote