Quantcast Items that can be converted into gems - ESOUI
Thread Tools Display Modes
08/23/19, 07:00 AM   #1
iFedix
 
iFedix's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 2
Items that can be converted into gems

Hey guys! I want to update Dustman addon in order to mark as junk/delete crown related stuff obtained by daily rewards. Problem is that those exact same items can be found also when opening crates and gems can be extracted using them (so I don't want to delete those).
So, is there any method (like canGemsBeExtracted(itemLink)) or id in itemLink that I can use to distinguish the different versions of items?
Here an example of what I am talking about:

Thank you!
  Reply With Quote
08/23/19, 07:08 AM   #2
Kyoma
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 90
I'm assuming you checked for a difference in the item link itself (if any)? A search on the API page gave me this: https://wiki.esoui.com/GetNumCrownGe...alGemification.
  Reply With Quote
08/23/19, 07:27 AM   #3
iFedix
 
iFedix's Avatar
AddOn Author - Click to view addons
Join Date: May 2017
Posts: 2
Originally Posted by Kyoma View Post
I'm assuming you checked for a difference in the item link itself (if any)? A search on the API page gave me this: https://wiki.esoui.com/GetNumCrownGe...alGemification.
Yeah exactly, I thought that there were a flag or something in the item link itself. Anyway thx, that did the trick! I was looking on api list only form "crown" stuff and not "gem" :P
  Reply With Quote
08/23/19, 10:02 AM   #4
zelenin
AddOn Author - Click to view addons
Join Date: Nov 2018
Posts: 2
copy-paste from esoui code (/esoui/ingame/inventory/sharedinventory.lua):

Code:
    local isFromCrownCrate = IsItemFromCrownCrate(bagId, slotIndex)
    slot.isGemmable = false
    slot.requiredPerGemConversion = nil
    slot.gemsAwardedPerConversion = nil
    if isFromCrownCrate then
        local requiredPerGemConversion, gemsAwardedPerConversion = GetNumCrownGemsFromItemManualGemification(bagId, slotIndex)
        if requiredPerGemConversion > 0 and gemsAwardedPerConversion > 0 then
            slot.requiredPerGemConversion = requiredPerGemConversion
            slot.gemsAwardedPerConversion = gemsAwardedPerConversion
            slot.isGemmable = true
        end
    end
  Reply With Quote
08/23/19, 10:48 AM   #5
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 2,353
If you use Dustman you should have the inventorySlot and it's dataEntry.data already given and do not need to create a new itemlink from the inventorySlot.
Just check if dataEntry.daa.isGemmable should be enough then I hope.
  Reply With Quote

ESOUI » AddOns » AddOn Help/Support » Items that can be converted into gems

Thread Tools
Display Modes

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