ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   AddOn Help/Support (https://www.esoui.com/forums/forumdisplay.php?f=164)
-   -   Items that can be converted into gems (https://www.esoui.com/forums/showthread.php?t=8725)

iFedix 08/23/19 07:00 AM

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!

Kyoma 08/23/19 07:08 AM

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.

iFedix 08/23/19 07:27 AM

Quote:

Originally Posted by Kyoma (Post 38980)
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

zelenin 08/23/19 10:02 AM

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


Baertram 08/23/19 10:48 AM

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.


All times are GMT -6. The time now is 10:42 PM.

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