ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Wish List (https://www.esoui.com/forums/forumdisplay.php?f=177)
-   -   [outdated] IsItemPartOfQuest(bagId, slotId) (https://www.esoui.com/forums/showthread.php?t=7473)

manavortex 11/19/17 04:33 AM

[outdated] IsItemPartOfQuest(bagId, slotId)
 
Hey Chip,

I'd like to check whether or not an item in my bag is needed for an active quest.
Use case: Auto-junk-AddOns like Dustman or my self-hacked thing that ditches certain stuff on pickup - both are somewhat annoying with the crow quests right now.

Suuuuper convenient would be if I could add a boolean to ask if that item would be needed for _any_ quest that my character is entitled to, but that'd probably be difficult?

Thanks a ton!

sirinsidiator 11/19/17 05:05 AM

I agree, but the other way around would be more widely usable IMO. Instead of checking if an item in the inventory is part of the quest, give use a way to get the requirements for a quest, e.g. itemLink, stackCountNeeded, stackCountInInventory = GetQuestConditionItemDetails(index) and of course a GetQuestConditionItemCount().

Dolgubon 11/19/17 11:23 AM

If this happens I'll be surprised, really thankful, and also annoyed. And probably sit in shock for a few minutes.

ZOS_ChipHilseberg 11/20/17 10:22 AM

Hmm, conditions have a type that we could return. Then we would need to implement different functions for every type to return info specific to that type. Right now we have 53 quest condition types, so that would be a lot of work. Of those 53, 8 reference items so maybe we could just expose info on those.

Dolgubon 11/20/17 11:42 AM

I should have just asked before. Even if it's just an item link or something that would greatly simplify a lot of code, and prevent issues where the quest conditions get swapped or misspelled in translations and mess up the writ crafter.

sirinsidiator 11/20/17 11:44 AM

That's all I'd expect. Items are probably the only quest condition that is relevant for addons atm.

manavortex 11/21/17 04:01 AM

I have two addons that are directly affected.
One is the thing that automatically unstuffs my inventory which I haven't updated in forever but am still using.
It would be great to be able to exclude quest items via API call*.
The other is my (currently early alpha) addOn that processes stolen items based on user preferences. Currently I'm excluding items like
Lua Code:
  1. for i=1, GetItemLinkNumItemTags(itemLink) do
  2.     local itemTagDescription, itemTagCategory = GetItemLinkItemTagInfo(itemLink, i)
  3.     for index, partial in pairs(AutoProcessStolenItems.crowStrings) do
  4.         if itemTagDescription:match(partial) then return true end
  5.     end
  6. end
which is not particularly pretty and requires me to hold the localised crow strings in a list to iterate over.

* btw, why is there an IsItemLinkCrafted(string itemLink), but not IsItemCrafted(bagId, slotId)? Would you call that internally anyway? Right now I'd have to use IsItemLinkCrafted(GetItemLink(bagId, slotId)).


Hence my request. I hope that clarifies my needs to a degree - I can't speak for the others, of course. :)


All times are GMT -6. The time now is 12:16 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI