View Single Post
01/27/18, 10:43 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
You basically only need to know which items are the ones that count and mark them via an addon like ItemSaver or FCOItemSaver with a protection icon so you can see them at a glance (or filter them if you use FCOItemSaver) in your inventories.
This will even have them marked if you do a reloadui or logout etc.

From the addon code of GamepadBuddy I found that it checks for the quest name "The Covetous Countess" and then checks for these quest infos:

Code:
games
ritual
writings and maps
cosmetics
drinkware, utensils, and dishes
Depending on this text inside the quest steps it's setting a "wished itemtype" to some constant values which are used as the key for items that apply to this category:
Code:
-- Value Define
TCC_QUEST_GAMES_DOLLS_STATUES = 1
TCC_QUEST_RITUAL_ODDITIES = 2
TCC_QUEST_WRITINGS_MAPS = 3
TCC_QUEST_COSMETICS_LINENS_ACCESSORIES = 4
TCC_QUEST_DRINKWARE_UTENSILS_DISHES = 5
TCC_QUEST_UNKNOWN = -1
Items that apply for each category:
Code:
GamePadBuddy.CONST.TCCQuestTags = {
	[TCC_QUEST_GAMES_DOLLS_STATUES] = {["Games"] = true, ["Dolls"] = true, ["Statues"] = true},
	[TCC_QUEST_RITUAL_ODDITIES] = {["Ritual Objects"] = true, ["Oddities"] = true},
	[TCC_QUEST_WRITINGS_MAPS] = {["Writings"] = true, ["Maps"] = true, ["Scrivener Supplies"] = true},
	[TCC_QUEST_COSMETICS_LINENS_ACCESSORIES] = {["Cosmetics"] = true, ["Linens"] = true, ["Wardrobe Accessories"] = true},
	[TCC_QUEST_DRINKWARE_UTENSILS_DISHES] = {["Drinkware"] = true, ["Utensils"] = true, ["Dishes and Cookware"] = true}
	}
In function GamePadBuddy:GetItemFlagStatus(bagId, slotIndex) the addon checks each item for it's item tag if you got the quest active.

Lua Code:
  1. local numItemTags = GetItemLinkNumItemTags(itemLink)
  2.     if numItemTags > 0 then
  3.         local useful = false
  4.         for i = 1, numItemTags do
  5.             local itemTagDescription, itemTagCategory = GetItemLinkItemTagInfo(itemLink, i)
  6.             local itemTagString = zo_strformat(SI_TOOLTIP_ITEM_TAG_FORMATER, itemTagDescription)
  7.             if GamePadBuddy.CONST.TCCQuestTags[GamePadBuddy.CurrentTCCQuest][itemTagString] ~= nil then
  8.                 return GamePadBuddy.CONST.ItemFlags.ITEM_FLAG_TCC_QUEST, name
  9.             end
  10.             if GamePadBuddy:IsTCCQuestItemTag(itemTagString) then
  11.                 useful = true
  12.             end
  13.         end
  14.         if useful == false then
  15.             return GamePadBuddy.CONST.ItemFlags.ITEM_FLAG_TCC_USELESS, name
  16.         else
  17.             return GamePadBuddy.CONST.ItemFlags.ITEM_FLAG_TCC_USABLE, name
  18.         end
  19.     end

Basically it checks the item at bagid and slotIndex, builds the itemLink of the item, builds the item tags string (which is one of the constants mentioned above, e.g. "Drinkware") via function GamePadBuddy:IsTCCQuestItemTag(itemTagString)

If the itemtag string equals to one of the constants the item is a valid item for the quest.
  Reply With Quote