ZO COLLECTIBLE DATA MANAGER mounts

From ESOUI Wiki

Jump to: navigation, search
    --Table will contain [collectibleIdOfOwnedMount] = "Mount name",
    local MountData = {}
 
    local function IsNotMountCategory(categoryData)
        return not categoryData:IsOutfitStylesCategory() and not categoryData:IsHousingCategory()
    end
 
    local function IsMount(collectibleData)
        return collectibleData:IsCategoryType(COLLECTIBLE_CATEGORY_TYPE_MOUNT)
    end
 
    --Iterate over the main categories and do not use outfits or houses
    for idx, categoryData in ZO_COLLECTIBLE_DATA_MANAGER:CategoryIterator({IsNotMountCategory}) do
        --Iterate over the sub-categories of the current main category and do not use outfits or houses
        for _, subCategoryData in categoryData:SubcategoryIterator({IsNotMountCategory}) do
            --Iterate over the sub-categorie's collectibles and only check for mounts collectible type
            for _, subCatCollectibleData in subCategoryData:CollectibleIterator({IsMount}) do
                --Check if the mount is owned/unlocked and not blocked
                if subCatCollectibleData:IsUnlocked() and not subCatCollectibleData:IsBlocked() then
                    MountData[subCatCollectibleData:GetId()] = subCatCollectibleData:GetFormattedName()
                end
            end
        end
    end
Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox