Skip to content

Commit 0120ad2

Browse files
authored
Update Item import API to support 3.29 changes (#9958)
1 parent 5af9cca commit 0120ad2

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

src/Classes/ImportTab.lua

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,13 +1632,15 @@ function ImportTabClass:ImportItem(itemData, slotName, ignoreWeaponSwap)
16321632
end
16331633
end
16341634
if itemData.implicitMods then
1635-
for _, line in ipairs(itemData.implicitMods) do
1636-
for line in line:gmatch("[^\n]+") do
1635+
for _, itemMod in ipairs(itemData.implicitMods) do
1636+
local modLine = itemMod.description or itemMod
1637+
for line in modLine:gmatch("[^\n]+") do
16371638
local modList, extra = modLib.parseMod(line)
16381639
t_insert(item.implicitModLines, { line = line, extra = extra, mods = modList or { } })
16391640
end
16401641
end
16411642
end
1643+
-- TODO: Remove once 3.29 releases https://www.pathofexile.com/developer/docs/changelog#3-29-0
16421644
if itemData.fracturedMods then
16431645
for _, line in ipairs(itemData.fracturedMods) do
16441646
for line in line:gmatch("[^\n]+") do
@@ -1648,10 +1650,14 @@ function ImportTabClass:ImportItem(itemData, slotName, ignoreWeaponSwap)
16481650
end
16491651
end
16501652
if itemData.explicitMods then
1651-
for _, line in ipairs(itemData.explicitMods) do
1652-
for line in line:gmatch("[^\n]+") do
1653+
for _, itemMod in ipairs(itemData.explicitMods) do
1654+
local modLine = itemMod.description or itemMod
1655+
for line in modLine:gmatch("[^\n]+") do
16531656
local modList, extra = modLib.parseMod(line)
1654-
t_insert(item.explicitModLines, { line = line, extra = extra, mods = modList or { } })
1657+
t_insert(item.explicitModLines, { line = line, extra = extra, mods = modList or { },
1658+
fractured = itemMod.fractured,
1659+
crafted = itemMod.crafted,
1660+
mutated = itemMod.mutated })
16551661
end
16561662
end
16571663
end
@@ -1663,6 +1669,7 @@ function ImportTabClass:ImportItem(itemData, slotName, ignoreWeaponSwap)
16631669
end
16641670
end
16651671
end
1672+
-- TODO: Remove once 3.29 releases https://www.pathofexile.com/developer/docs/changelog#3-29-0
16661673
if itemData.craftedMods then
16671674
for _, line in ipairs(itemData.craftedMods) do
16681675
for line in line:gmatch("[^\n]+") do
@@ -1671,6 +1678,7 @@ function ImportTabClass:ImportItem(itemData, slotName, ignoreWeaponSwap)
16711678
end
16721679
end
16731680
end
1681+
-- TODO: Remove once 3.29 releases https://www.pathofexile.com/developer/docs/changelog#3-29-0
16741682
if itemData.mutatedMods then
16751683
for _, line in ipairs(itemData.mutatedMods) do
16761684
for line in line:gmatch("[^\n]+") do

0 commit comments

Comments
 (0)