Originally Posted by ZOS_ChipHilseberg
We can add GetItemLinkEnchantSearchCategoryType(itemlink) - search category.
|
That would be very helpful. For now I made a workaround:
Lua Code:
local ENCHANT_CATEGORY_BY_HEADER = {}
do
local SAMPLE_GLYPH_ITEM_LINK_TEMPLATE = "|H1:item:%d:366:50:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0|h|h"
local enchantCategorySampleGlyphItemId = {
-- weapons
[ENCHANTMENT_SEARCH_CATEGORY_FIERY_WEAPON] = 26848,
[ENCHANTMENT_SEARCH_CATEGORY_FROZEN_WEAPON] = 5365,
[ENCHANTMENT_SEARCH_CATEGORY_CHARGED_WEAPON] = 26844,
[ENCHANTMENT_SEARCH_CATEGORY_POISONED_WEAPON] = 26587,
[ENCHANTMENT_SEARCH_CATEGORY_BEFOULED_WEAPON] = 26841,
[ENCHANTMENT_SEARCH_CATEGORY_DAMAGE_HEALTH] = 45869,
[ENCHANTMENT_SEARCH_CATEGORY_BERSERKER] = 54484,
[ENCHANTMENT_SEARCH_CATEGORY_REDUCE_POWER] = 26591,
[ENCHANTMENT_SEARCH_CATEGORY_DAMAGE_SHIELD] = 5366,
[ENCHANTMENT_SEARCH_CATEGORY_REDUCE_ARMOR] = 26845,
[ENCHANTMENT_SEARCH_CATEGORY_ABSORB_MAGICKA] = 45868,
[ENCHANTMENT_SEARCH_CATEGORY_ABSORB_HEALTH] = 43573,
[ENCHANTMENT_SEARCH_CATEGORY_ABSORB_STAMINA] = 45867,
-- prismatic 68344
-- armor
[ENCHANTMENT_SEARCH_CATEGORY_MAGICKA] = 26582,
[ENCHANTMENT_SEARCH_CATEGORY_HEALTH] = 26580,
[ENCHANTMENT_SEARCH_CATEGORY_STAMINA] = 26588,
-- prismatic 68343
-- jewelry
[ENCHANTMENT_SEARCH_CATEGORY_FIRE_RESISTANT] = 26849,
[ENCHANTMENT_SEARCH_CATEGORY_FROST_RESISTANT] = 5364,
[ENCHANTMENT_SEARCH_CATEGORY_SHOCK_RESISTANT] = 43570,
[ENCHANTMENT_SEARCH_CATEGORY_POISON_RESISTANT] = 26586,
[ENCHANTMENT_SEARCH_CATEGORY_DISEASE_RESISTANT] = 26847,
[ENCHANTMENT_SEARCH_CATEGORY_DECREASE_SPELL_DAMAGE] = 45886,
[ENCHANTMENT_SEARCH_CATEGORY_DECREASE_PHYSICAL_DAMAGE] = 45885,
[ENCHANTMENT_SEARCH_CATEGORY_INCREASE_SPELL_DAMAGE] = 45884,
[ENCHANTMENT_SEARCH_CATEGORY_INCREASE_PHYSICAL_DAMAGE] = 45883,
[ENCHANTMENT_SEARCH_CATEGORY_INCREASE_BASH_DAMAGE] = 45872,
[ENCHANTMENT_SEARCH_CATEGORY_INCREASE_POTION_EFFECTIVENESS] = 45874,
[ENCHANTMENT_SEARCH_CATEGORY_REDUCE_POTION_COOLDOWN] = 45875,
[ENCHANTMENT_SEARCH_CATEGORY_REDUCE_SPELL_COST] = 45870,
[ENCHANTMENT_SEARCH_CATEGORY_REDUCE_FEAT_COST] = 45871,
[ENCHANTMENT_SEARCH_CATEGORY_REDUCE_BLOCK_AND_BASH] = 45873,
[ENCHANTMENT_SEARCH_CATEGORY_MAGICKA_REGEN] = 26583,
[ENCHANTMENT_SEARCH_CATEGORY_HEALTH_REGEN] = 26581,
[ENCHANTMENT_SEARCH_CATEGORY_STAMINA_REGEN] = 26589,
}
for category, id in pairs(enchantCategorySampleGlyphItemId) do
local _, enchantHeader = GetItemLinkEnchantInfo(SAMPLE_GLYPH_ITEM_LINK_TEMPLATE:format(id))
ENCHANT_CATEGORY_BY_HEADER[enchantHeader] = category
end
end
local function GetItemLinkEnchantSearchCategoryType(itemLink)
local _, enchantHeader = GetItemLinkEnchantInfo(itemLink)
if(enchantHeader ~= "") then
return ENCHANT_CATEGORY_BY_HEADER[enchantHeader] or ENCHANTMENT_SEARCH_CATEGORY_OTHER
end
return nil
end
I also noticed there are no enchant search categories for the prismatic glyphs. They show up in ENCHANTMENT_SEARCH_CATEGORY_OTHER at the moment and since the ability altering equipment no longer uses enchantments, it would probably make sense to remove the "other" category in favor of two new ones for the prismatic glyphs.
And I agree with what Kyoma said. A way to get the default glyph on dropped equipment would still be nice for other use cases.