Hey Folks,
Im very new with the lua language and especially with the ESO API, but Im experienced in C languages.
At the moment I write a small Loot Manager which have a few kind of options for itemfiltering purpose.
My problem is this small function which filters out the unwished items. I wrote for debugging purposes a small ItemIdentifier which have similiar functions.
This
Code:
function LootManager.ItemFilter(itemnumber,bagID,slotID)
...
if Config.MaterialFilterSettings.LootAlchemy == true then
if itemtype == ITEMTYPE_POISON_BASE then return true end
if itemtype == ITEMTYPE_POTION_BASE then return true end
if itemtype == ITEMTYPE_REAGENT then return true end
end
if Config.MaterialFilterSettings.LootCooking == true then
if itemtype == ITEMTYPE_FLAVORING then return true end
if itemtype == ITEMTYPE_INGREDIENT then return true end
if itemtype == ITEMTYPE_FISH then return true end
if itemtype == ITEMTYPE_LURE then return true end
if itemtype == ITEMTYPE_SPICE then return true end
end
return false
end
My other filteroptions like LootAlchemy seems to work. I also checked the LootCooking var and it works perfectly. Is there a special hint in lua which I missed?
Here is a part of my ItemIdentifier which works perfectly
Code:
function LootManager.LootItemIdentifier(itemnumber)
......
if itemtype == ITEMTYPE_FLAVORING then itemtype = "Flavoring" end
if itemtype == ITEMTYPE_INGREDIENT then itemtype = "Ingredient" end
if itemtype == ITEMTYPE_FISH then itemtype = "Fish" end
if itemtype == ITEMTYPE_LURE then itemtype = "Lure" end
if itemtype == ITEMTYPE_SPICE then itemtype = "Spice" end
return itemtype
end
Thx for your patience