View Single Post
09/30/15, 05:43 AM   #9
@AlphaLemming
 
@AlphaLemming's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 122
The short version of how i made this in CraftStore to save style knowledge in saved variable:

Code:
local DWEMER, XIVKYN, GLASS, AKAVIRI, YOKUDAN, MERCENARY = 1,2,3,4,5,6
local styles = {
	[DWEMER] = 57572,
	[XIVKYN] = 57834,
	[GLASS] = 64669,
	[AKAVIRI] = 57590,
	[YOKUDAN] = 57605,
	[MERCENARY] = 64714,
}
local function IsStyleKnown(cat,id)
	local txt, known = GetAchievementCriterion(cat,id)
	if known == 1 then return true end
	return false
end
for x = 1,14 do
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[DWEMER] + x] = IsStyleKnown(1144,x)
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[XIVKYN] + x] = IsStyleKnown(1181,x)
	CSE.account.style.knowledge[CURRENT_PLAYER][styles[GLASS] + x] = IsStyleKnown(1319,x)
end

Last edited by @AlphaLemming : 09/30/15 at 09:03 AM.
  Reply With Quote