Skip to content

Commit 9a684e4

Browse files
committed
Resolve issues with certain catalyst items showing as uncollected, when the transmog is in fact collected
1 parent f5f2fa7 commit 9a684e4

File tree

1 file changed

+92
-19
lines changed

1 file changed

+92
-19
lines changed

TransmogUpgradeMaster.lua

Lines changed: 92 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -65,25 +65,86 @@ local playerClassID = select(3, UnitClass("player"))
6565

6666
TUM.currentSeason = 14; -- TWW S2
6767

68-
--- could potentially be extracted from C_TransmogSets.GetAllSets() more or less, but meh, effort, and requires linking to a specific season still anyway
69-
--- @type table<number, table<number, {[1]:number, [2]:number, [3]:number, [4]:number}>> [m+ seasonID][classID] = { [1] = lfrSetID, [2] = normalSetID, [3] = heroicSetID, [4] = mythicSetID }
70-
TUM.sets = {
71-
[14] = { -- TWW S2
72-
[1] = { 4326, 4325, 4323, 4324 }, -- Warrior
73-
[2] = { 4306, 4305, 4303, 4304 }, -- Paladin
74-
[3] = { 4294, 4293, 4291, 4292 }, -- Hunter
75-
[4] = { 4314, 4313, 4311, 4312 }, -- Rogue
76-
[5] = { 4310, 4309, 4307, 4308 }, -- Priest
77-
[6] = { 4278, 4277, 4275, 4276 }, -- Death Knight
78-
[7] = { 4318, 4317, 4315, 4316 }, -- Shaman
79-
[8] = { 4298, 4297, 4295, 4296 }, -- Mage
80-
[9] = { 4322, 4321, 4319, 4320 }, -- Warlock
81-
[10] = { 4302, 4301, 4299, 4300 }, -- Monk
82-
[11] = { 4286, 4285, 4283, 4284 }, -- Druid
83-
[12] = { 4282, 4281, 4279, 4280 }, -- Demon Hunter
84-
[13] = { 4290, 4289, 4287, 4288 }, -- Evoker
85-
},
86-
}
68+
-- hardcoded data
69+
do
70+
--- could potentially be extracted from C_TransmogSets.GetAllSets() more or less, but meh, effort, and requires linking to a specific season still anyway
71+
--- @type table<number, table<number, {[1]:number, [2]:number, [3]:number, [4]:number}>> [m+ seasonID][classID] = { [1] = lfrSetID, [2] = normalSetID, [3] = heroicSetID, [4] = mythicSetID }
72+
TUM.sets = {
73+
-- TWW S2
74+
[14] = {
75+
[1] = { 4326, 4325, 4323, 4324 }, -- Warrior
76+
[2] = { 4306, 4305, 4303, 4304 }, -- Paladin
77+
[3] = { 4294, 4293, 4291, 4292 }, -- Hunter
78+
[4] = { 4314, 4313, 4311, 4312 }, -- Rogue
79+
[5] = { 4310, 4309, 4307, 4308 }, -- Priest
80+
[6] = { 4278, 4277, 4275, 4276 }, -- Death Knight
81+
[7] = { 4318, 4317, 4315, 4316 }, -- Shaman
82+
[8] = { 4298, 4297, 4295, 4296 }, -- Mage
83+
[9] = { 4322, 4321, 4319, 4320 }, -- Warlock
84+
[10] = { 4302, 4301, 4299, 4300 }, -- Monk
85+
[11] = { 4286, 4285, 4283, 4284 }, -- Druid
86+
[12] = { 4282, 4281, 4279, 4280 }, -- Demon Hunter
87+
[13] = { 4290, 4289, 4287, 4288 }, -- Evoker
88+
},
89+
}
90+
--- C_TransmogSets.GetSourceIDsForSlot and C_TransmogSets.GetSourcesForSlot miss information for certain slots, very "fun" -.-
91+
--- @type table<number, table<number, number>> # [setID] = { [Enum.InventoryType.Foo] = sourceID }
92+
TUM.setSourceIDs = {
93+
-- TWW S2
94+
[4326] = { [1] = 225238, [3] = 225214, [5] = 225274, [6] = 225202, [7] = 225226, [8] = 225262, [9] = 225190, [10] = 225250, [16] = 225178 }, -- Warrior
95+
[4325] = { [1] = 225233, [3] = 225209, [5] = 225269, [6] = 225197, [7] = 225221, [8] = 225257, [9] = 225185, [10] = 225245, [16] = 225173 }, -- Warrior
96+
[4323] = { [1] = 225239, [3] = 225215, [5] = 225275, [6] = 225203, [7] = 225227, [8] = 225263, [9] = 225191, [10] = 225251, [16] = 225179 }, -- Warrior
97+
[4324] = { [1] = 225240, [3] = 225216, [5] = 225276, [6] = 225204, [7] = 225228, [8] = 225264, [9] = 225192, [10] = 225252, [16] = 225180 }, -- Warrior
98+
[4306] = { [1] = 225346, [3] = 225322, [5] = 225382, [6] = 225310, [7] = 225334, [8] = 225370, [9] = 225298, [10] = 225358, [16] = 225286 }, -- Paladin
99+
[4305] = { [1] = 225341, [3] = 225317, [5] = 225377, [6] = 225305, [7] = 225329, [8] = 225365, [9] = 225293, [10] = 225353, [16] = 225281 }, -- Paladin
100+
[4303] = { [1] = 225347, [3] = 225323, [5] = 225383, [6] = 225311, [7] = 225335, [8] = 225371, [9] = 225299, [10] = 225359, [16] = 225287 }, -- Paladin
101+
[4304] = { [1] = 225348, [3] = 225324, [5] = 225384, [6] = 225312, [7] = 225336, [8] = 225372, [9] = 225300, [10] = 225360, [16] = 225288 }, -- Paladin
102+
[4294] = { [1] = 225658, [3] = 225634, [5] = 225694, [6] = 225622, [7] = 225646, [8] = 225682, [9] = 225610, [10] = 225670, [16] = 225598 }, -- Hunter
103+
[4293] = { [1] = 225653, [3] = 225629, [5] = 225689, [6] = 225617, [7] = 225641, [8] = 225677, [9] = 225605, [10] = 225665, [16] = 225593 }, -- Hunter
104+
[4291] = { [1] = 225659, [3] = 225635, [5] = 225695, [6] = 225623, [7] = 225647, [8] = 225683, [9] = 225611, [10] = 225671, [16] = 225599 }, -- Hunter
105+
[4292] = { [1] = 225660, [3] = 225636, [5] = 225696, [6] = 225624, [7] = 225648, [8] = 225684, [9] = 225612, [10] = 225672, [16] = 225600 }, -- Hunter
106+
[4314] = { [1] = 225874, [3] = 225850, [5] = 225910, [6] = 225838, [7] = 225862, [8] = 225898, [9] = 225826, [10] = 225886, [16] = 225814 }, -- Rogue
107+
[4313] = { [1] = 225869, [3] = 225845, [5] = 225905, [6] = 224939, [7] = 225857, [8] = 225893, [9] = 225821, [10] = 225881, [16] = 225809 }, -- Rogue
108+
[4311] = { [1] = 225875, [3] = 225851, [5] = 225911, [6] = 225839, [7] = 225863, [8] = 225899, [9] = 225827, [10] = 225887, [16] = 225815 }, -- Rogue
109+
[4312] = { [1] = 225876, [3] = 225852, [5] = 225912, [6] = 225840, [7] = 225864, [8] = 225900, [9] = 225828, [10] = 225888, [16] = 225816 }, -- Rogue
110+
[4310] = { [1] = 226414, [3] = 226390, [5] = 226450, [6] = 226378, [7] = 226402, [8] = 226438, [9] = 226366, [10] = 226426, [16] = 226354 }, -- Priest
111+
[4309] = { [1] = 226409, [3] = 226385, [5] = 226445, [6] = 226373, [7] = 226397, [8] = 226433, [9] = 226361, [10] = 226421, [16] = 226349 }, -- Priest
112+
[4307] = { [1] = 226415, [3] = 226391, [5] = 226451, [6] = 226379, [7] = 226403, [8] = 226439, [9] = 226367, [10] = 226427, [16] = 226355 }, -- Priest
113+
[4308] = { [1] = 226416, [3] = 226392, [5] = 231638, [6] = 226380, [7] = 226404, [8] = 226440, [9] = 226368, [10] = 226428, [16] = 226356 }, -- Priest
114+
[4278] = { [1] = 225454, [3] = 225430, [5] = 225490, [6] = 225418, [7] = 225442, [8] = 225478, [9] = 225406, [10] = 225466, [16] = 225394 }, -- Death Knight
115+
[4277] = { [1] = 225449, [3] = 225425, [5] = 225485, [6] = 225413, [7] = 225437, [8] = 225473, [9] = 225401, [10] = 225461, [16] = 225389 }, -- Death Knight
116+
[4275] = { [1] = 225455, [3] = 225431, [5] = 225491, [6] = 225419, [7] = 225443, [8] = 225479, [9] = 225407, [10] = 225467, [16] = 225395 }, -- Death Knight
117+
[4276] = { [1] = 225456, [3] = 225432, [5] = 225492, [6] = 225420, [7] = 225444, [8] = 225480, [9] = 225408, [10] = 225468, [16] = 225396 }, -- Death Knight
118+
[4318] = { [1] = 225556, [3] = 225538, [6] = 225526, [7] = 225547, [8] = 225580, [9] = 225514, [10] = 225568, [16] = 225502, [20] = 225589 }, -- Shaman
119+
[4317] = { [1] = 225551, [3] = 225533, [6] = 225521, [7] = 225548, [8] = 225575, [9] = 225509, [10] = 225563, [16] = 225497, [20] = 225590 }, -- Shaman
120+
[4315] = { [1] = 225557, [3] = 225539, [6] = 225527, [7] = 225549, [8] = 225581, [9] = 225515, [10] = 225569, [16] = 225503, [20] = 225591 }, -- Shaman
121+
[4316] = { [1] = 225558, [3] = 225540, [6] = 225528, [7] = 225550, [8] = 225582, [9] = 225516, [10] = 225570, [16] = 225504, [20] = 225592 }, -- Shaman
122+
[4298] = { [1] = 226520, [3] = 226496, [6] = 226484, [7] = 226508, [8] = 226544, [9] = 226472, [10] = 226532, [16] = 226460, [20] = 226556 }, -- Mage
123+
[4297] = { [1] = 226515, [3] = 226491, [6] = 226479, [7] = 226503, [8] = 226539, [9] = 226467, [10] = 226527, [16] = 226455, [20] = 226551 }, -- Mage
124+
[4295] = { [1] = 226521, [3] = 226497, [6] = 226485, [7] = 226509, [8] = 226545, [9] = 226473, [10] = 226533, [16] = 226461, [20] = 226557 }, -- Mage
125+
[4296] = { [1] = 226522, [3] = 226498, [6] = 226486, [7] = 226510, [8] = 226546, [9] = 226474, [10] = 226534, [16] = 226462, [20] = 226558 }, -- Mage
126+
[4322] = { [1] = 226306, [3] = 226282, [6] = 226270, [7] = 226294, [8] = 226330, [9] = 226258, [10] = 226318, [16] = 226246, [20] = 226342 }, -- Warlock
127+
[4321] = { [1] = 226301, [3] = 226277, [6] = 226265, [7] = 226289, [8] = 226325, [9] = 226253, [10] = 226313, [16] = 226241, [20] = 226337 }, -- Warlock
128+
[4319] = { [1] = 226307, [3] = 226283, [6] = 226271, [7] = 226295, [8] = 226331, [9] = 226259, [10] = 226319, [16] = 226247, [20] = 226343 }, -- Warlock
129+
[4320] = { [1] = 226308, [3] = 226284, [6] = 226272, [7] = 226296, [8] = 226332, [9] = 226260, [10] = 226320, [16] = 226248, [20] = 226344 }, -- Warlock
130+
[4302] = { [1] = 225982, [3] = 225958, [5] = 226018, [6] = 225946, [7] = 225970, [8] = 226006, [9] = 225934, [10] = 225994, [16] = 225922 }, -- Monk
131+
[4301] = { [1] = 225977, [3] = 225953, [5] = 226013, [6] = 225941, [7] = 225965, [8] = 226001, [9] = 225929, [10] = 225989, [16] = 225917 }, -- Monk
132+
[4299] = { [1] = 225983, [3] = 225959, [5] = 226019, [6] = 225947, [7] = 225971, [8] = 226007, [9] = 225935, [10] = 225995, [16] = 225923 }, -- Monk
133+
[4300] = { [1] = 225984, [3] = 225960, [5] = 226020, [6] = 225948, [7] = 225972, [8] = 226008, [9] = 225936, [10] = 225996, [16] = 225924 }, -- Monk
134+
[4286] = { [1] = 226090, [3] = 226066, [6] = 226054, [7] = 226078, [8] = 226114, [9] = 226042, [10] = 226102, [16] = 226030, [20] = 226126 }, -- Druid
135+
[4285] = { [1] = 226085, [3] = 226061, [6] = 226049, [7] = 226073, [8] = 226109, [9] = 226037, [10] = 226097, [16] = 226025, [20] = 226121 }, -- Druid
136+
[4283] = { [1] = 226091, [3] = 226067, [6] = 226055, [7] = 226079, [8] = 226115, [9] = 226043, [10] = 226103, [16] = 226031, [20] = 226127 }, -- Druid
137+
[4284] = { [1] = 226092, [3] = 226068, [6] = 226056, [7] = 226080, [8] = 226116, [9] = 226044, [10] = 226104, [16] = 226032, [20] = 226128 }, -- Druid
138+
[4282] = { [1] = 226198, [3] = 226174, [5] = 226234, [6] = 226162, [7] = 226186, [8] = 226222, [9] = 226150, [10] = 226210, [16] = 226138 }, -- Demon Hunter
139+
[4281] = { [1] = 226193, [3] = 226169, [5] = 226229, [6] = 226157, [7] = 226181, [8] = 226217, [9] = 226145, [10] = 226205, [16] = 226133 }, -- Demon Hunter
140+
[4279] = { [1] = 226199, [3] = 226175, [5] = 226235, [6] = 226163, [7] = 226187, [8] = 226223, [9] = 226151, [10] = 226211, [16] = 226139 }, -- Demon Hunter
141+
[4280] = { [1] = 226200, [3] = 226176, [5] = 226236, [6] = 226164, [7] = 226188, [8] = 226224, [9] = 226152, [10] = 226212, [16] = 226140 }, -- Demon Hunter
142+
[4290] = { [1] = 225766, [3] = 225742, [5] = 225802, [6] = 225730, [7] = 225754, [8] = 225790, [9] = 225718, [10] = 225778, [16] = 225706 }, -- Evoker
143+
[4289] = { [1] = 225761, [3] = 225737, [5] = 225797, [6] = 225725, [7] = 225749, [8] = 225785, [9] = 225713, [10] = 225773, [16] = 225701 }, -- Evoker
144+
[4287] = { [1] = 225767, [3] = 225743, [5] = 225803, [6] = 225731, [7] = 225755, [8] = 225791, [9] = 225719, [10] = 225779, [16] = 225707 }, -- Evoker
145+
[4288] = { [1] = 225768, [3] = 225744, [5] = 225804, [6] = 225732, [7] = 225756, [8] = 225792, [9] = 225720, [10] = 225780, [16] = 225708 }, -- Evoker
146+
}
147+
end
87148

88149
EventUtil.ContinueOnAddOnLoaded(name, function()
89150
local currentSeason = C_MythicPlus.GetCurrentSeason()
@@ -298,6 +359,18 @@ function TUM:IsCatalystSlot(slot)
298359
end
299360

300361
function TUM:IsSetItemCollected(transmogSetID, slot)
362+
if self.setSourceIDs[transmogSetID] then
363+
local sourceID = self.setSourceIDs[transmogSetID][slot]
364+
if sourceID then
365+
local sourceInfo = C_TransmogCollection.GetSourceInfo(sourceID)
366+
if sourceInfo and sourceInfo.isCollected then
367+
return true
368+
end
369+
end
370+
371+
return false
372+
end
373+
301374
local sources = C_TransmogSets.GetSourcesForSlot(transmogSetID, slot)
302375
for _, slotSourceInfo in ipairs(sources) do
303376
if slotSourceInfo.isCollected then

0 commit comments

Comments
 (0)