-- module independent variables -- ---------------------------------- local addon, ns = ... local C, L, I = ns.LC.color, ns.L, ns.I if ns.client_version<6 then return end -- module own local variables and local cached functions -- ----------------------------------------------------------- local name = "Wardrobe"; -- WARDROBE L["ModDesc-Wardrobe"] local ldbName, ttName, ttColumns, tt, module = name, name.."TT", 4 local illusions,weapons = {0,0},{}; local ctForm = C("green","%d")..C("gray","/")..C("dkyellow","%d"); local pForm = C("ltgrey","%.1f"); local session = nil; local brokerValues = { ["_none"] = NONE.."/"..HIDE, p = "<"..STATUS_TEXT_PERCENT..">".." "..L["+"], ct = L["/"].." "..L["+"], s = L["+"] } -- register icon names and default files -- ------------------------------------------- I[name] = {iconfile="INTERFACE\\ICONS\\trade_archaeology",coords={0.05,0.95,0.05,0.95}}; --IconName::Archaeology-- -- some local functions -- -------------------------- local function addToBroker(tb,color,o,collected,total,sess) local res,sess = "",(sess0 and table.concat(tmp,", ") or WARDROBE; end local function resetSessionCounter(x) if not session then session = {}; end session.armor = {}; for k, v in pairs(TRANSMOG_SLOTS) do if v.armorCategoryID then local collected = C_TransmogCollection.GetCategoryCollectedCount(v.armorCategoryID); session.armor[v.slot or v.location.slotID] = collected; end end session.weapons = {}; for categoryID = FIRST_TRANSMOG_COLLECTION_WEAPON_TYPE, LAST_TRANSMOG_COLLECTION_WEAPON_TYPE do local name, isWeapon, _, canMainHand, canOffHand = C_TransmogCollection.GetCategoryInfo(categoryID); if name and isWeapon then session.weapons[name] = C_TransmogCollection.GetCategoryCollectedCount(categoryID); end end local count,total = 0,C_TransmogCollection.GetIllusions(); for i=1, #total do if total[i].isCollected then count=count+1; end end session.misc = { illusions = count, sets = (C_TransmogSets.GetBaseSetsCounts()) } if x then updateBroker(); end end local function sortWeapons(a,b) return a[2]