Thread Tools Display Modes
Prev Previous Post   Next Post Next
07/24/19, 04:17 AM   #1
cOOLsp0T
 
cOOLsp0T's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2019
Posts: 17
Have Problems with Setting an Itemfilter

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
  Reply With Quote
 

ESOUI » AddOns » AddOn Help/Support » Have Problems with Setting an Itemfilter


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off