Thread Tools Display Modes
07/15/17, 02:58 PM   #1
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I've updated http://wiki.esoui.com/StyleItemIndex

If your addon deals with smithing (+wood / clothing) or style knowledge, you should rewrite it.
  Reply With Quote
07/16/17, 09:21 AM   #2
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Originally Posted by Ayantir View Post
I've updated http://wiki.esoui.com/StyleItemIndex

If your addon deals with smithing (+wood / clothing) or style knowledge, you should rewrite it.
Nice one Ayantir
I think your dynamic list code could be tweaked slightly.
I am happy to do this but wanted to get your opinion first.

Looking at how ZOS do it in "function ZO_SharedSmithingCreation:RefreshStyleList()" they loop using GetNumValidItemStyles() instead of GetHighestItemStyleId(). And they get the ID from the index, ItemStyleId from GetValidItemStyleId(itemStyleIndex)

How about this:
Lua Code:
  1. for itemStyleIndex = 1, GetNumValidItemStyles() do
  2.     local itemStyleId = GetValidItemStyleId(itemStyleIndex)
  3.     if itemStyleId > 0 then
  4.         local styleItemLink = GetItemStyleMaterialLink(itemStyleId)
  5.         local _, _, meetsUsageRequirement = GetItemLinkInfo(styleItemLink)
  6.         if meetsUsageRequirement then
  7.             d(zo_strformat("<<1>> : <<2>> (<<3>>)", itemStyleId, styleItemLink, GetItemStyleName(itemStyleId)))
  8.         end
  9.     end
  10. end

Maybe even remove GetItemLinkInfo(styleItemLink) completely

Last edited by Weolo : 07/16/17 at 09:24 AM.
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » 3.1 Update


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