View Single Post
12-14-12, 06:36 AM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Well, you also need LibQTip, though I suppose you could actually do away with that, since you could just do two columns with "<npc> / <item>" for incomplete quests and "<npc> / Complete" for complete ones:

Code:
	OnTooltipShow = function(tooltip)
		if not TILLERS then
			TILLERS = GetFactionInfoByID(1272)
			for i = 1, #npcs do
				local npc = npcs[i]
				npc.name = GetFactionInfoByID(npc.factionID)
			end
			sort(npcs, sortByName)
		end

		tooltip:AddDoubleLine(TILLERS, ITEMS)
		for i = 1, #npcs do
			local npc = npcs[i]
			if not npc.item then
				npc.item = GetItemInfo(npc.itemID)
			end
			if not IsQuestFlaggedCompleted(npc.questID) then
				tooltip:AddDoubleLine(npc.name, npc.item, 1, 0.8, 0.8, 1, 0.8, 0.8)
			elseif not hideComplete then
				tooltip:AddDoubleLine(npc.name, COMPLETE, 0.6, 0.8, 0.6, 0.6, 0.8, 0.6)
			end
		end
		tooltip:Show()
	end
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote