Mercurial > wow > askmrrobot
comparison Constants.lua @ 195:4ccc9ff6e824 v95
Update item parsing for new item link format changes.
author | Yellowfive |
---|---|
date | Tue, 24 Nov 2020 16:20:10 -0600 |
parents | 21a69c63fee8 |
children |
comparison
equal
deleted
inserted
replaced
194:02bbbf5ef3db | 195:4ccc9ff6e824 |
---|---|
105 [35] = "ability_warrior_innerrage", -- WarriorFury | 105 [35] = "ability_warrior_innerrage", -- WarriorFury |
106 [36] = "ability_warrior_defensivestance", -- WarriorProtection | 106 [36] = "ability_warrior_defensivestance", -- WarriorProtection |
107 } | 107 } |
108 | 108 |
109 -- instance IDs ordered in preferred display order | 109 -- instance IDs ordered in preferred display order |
110 Amr.InstanceIdsOrdered = { 1861, 2070, 2096, 2164, 2217, 2296 } | 110 Amr.InstanceIdsOrdered = { 2296 } |
111 | 111 |
112 Amr.Difficulties = { | 112 Amr.Difficulties = { |
113 Lfr = 17, | 113 Lfr = 17, |
114 Normal = 14, | 114 Normal = 14, |
115 Heroic = 15, | 115 Heroic = 15, |
127 | 127 |
128 ------------------------------------------------------------------------------------------ | 128 ------------------------------------------------------------------------------------------ |
129 -- Item Methods | 129 -- Item Methods |
130 ------------------------------------------------------------------------------------------ | 130 ------------------------------------------------------------------------------------------ |
131 | 131 |
132 -- 1 2 3 4 5 6 7 8 9 10 11 12 | 132 -- 1 2 3 4 5 6 7 8 9 10 11 12 13 |
133 -- itemId:ench:gem1 :gem2 :gem3 :gem4:suf:uid:lvl:spec:flags :instdiffid:numbonusIDs:bonusIDs1...n :varies:?:relic bonus ids | 133 -- itemId:ench:gem1 :gem2 :gem3 :gem4:suf:uid:lvl:spec:flags :instdiffid:numbonusIDs:bonusIDs1...n :varies:?:relic bonus ids |
134 --|cffe6cc80|Hitem:128866: :152046:147100:152025: : : :110:66 :16777472:9 :4 :736:1494:1490:1495:709 :1:3:3610:1472:3528:3:3562:1483:3528:3:3610:1477:3336|h[Truthguard]|h|r | 134 --|cffe6cc80|Hitem:128866: :152046:147100:152025: : : :110:66 :16777472:9 :4 :736:1494:1490:1495:709 :1:3:3610:1472:3528:3:3562:1483:3528:3:3610:1477:3336|h[Truthguard]|h|r |
135 -- | 135 -- |
136 function Amr.CreateItemLink(itemObj) | 136 function Amr.CreateItemLink(itemObj) |
137 | 137 |
160 | 160 |
161 table.insert(parts, 0) -- not sure what this is anymore | 161 table.insert(parts, 0) -- not sure what this is anymore |
162 | 162 |
163 table.insert(parts, 0) -- difficulty id, doesn't matter | 163 table.insert(parts, 0) -- difficulty id, doesn't matter |
164 | 164 |
165 -- 13, num bonus ids | |
165 if itemObj.bonusIds then | 166 if itemObj.bonusIds then |
166 table.insert(parts, #itemObj.bonusIds) | 167 table.insert(parts, #itemObj.bonusIds) |
167 for i,v in ipairs(itemObj.bonusIds) do | 168 for i,v in ipairs(itemObj.bonusIds) do |
168 table.insert(parts, v) | 169 table.insert(parts, v) |
169 end | 170 end |
170 else | 171 else |
171 table.insert(parts, 0) -- no bonus ids | 172 table.insert(parts, 0) -- no bonus ids |
172 end | 173 end |
173 | 174 |
175 --[[ | |
176 if itemObj.upgradeId and itemObj.upgradeId ~= 0 then | |
177 -- figure this out (if we still care) | |
178 end]] | |
179 | |
180 -- 14 + bonus id count, number of "properties" | |
181 local propCount = 0 | |
174 if itemObj.level and itemObj.level ~= 0 then | 182 if itemObj.level and itemObj.level ~= 0 then |
175 table.insert(parts, 2) -- not sure if this is always 2 or not... | 183 propCount = propCount + 1 |
176 table.insert(parts, 9) -- not sure if this is always 9 or not... | 184 end |
177 table.insert(parts, itemObj.level) | 185 if itemObj.stat1 and itemObj.stat1 ~= 0 then |
178 elseif itemObj.upgradeId and itemObj.upgradeId ~= 0 then | 186 propCount = propCount + 1 |
179 -- figure this out (if we still care) | 187 end |
180 end | 188 if itemObj.stat2 and itemObj.stat2 ~= 0 then |
181 | 189 propCount = propCount + 1 |
182 -- we don't bother with relic bonus ids anymore when generating links | 190 end |
183 table.insert(parts, 0) | 191 |
192 if propCount > 0 then | |
193 table.insert(parts, propCount) | |
194 if itemObj.level and itemObj.level ~= 0 then | |
195 table.insert(parts, 9) | |
196 table.insert(parts, itemObj.level) | |
197 end | |
198 if itemObj.stat1 and itemObj.stat1 ~= 0 then | |
199 table.insert(parts, 29) | |
200 table.insert(parts, itemObj.stat1) | |
201 end | |
202 if itemObj.stat2 and itemObj.stat2 ~= 0 then | |
203 table.insert(parts, 30) | |
204 table.insert(parts, itemObj.stat2) | |
205 end | |
206 else | |
207 table.insert(parts, 0) -- no props | |
208 end | |
209 | |
210 -- these last 3 seem to be blank for most items... | |
184 table.insert(parts, 0) | 211 table.insert(parts, 0) |
185 table.insert(parts, 0) | 212 table.insert(parts, 0) |
186 table.insert(parts, 0) | 213 table.insert(parts, 0) |
187 | 214 |
188 return table.concat(parts, ":") | 215 return table.concat(parts, ":") |