Skip to content

Commit 2529cd9

Browse files
Fix Energy Blade not working with socketed Abyssal jewels (#5608)
1 parent 1b0084c commit 2529cd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Modules/CalcSetup.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,8 @@ function calcs.initEnv(build, mode, override, specEnv)
712712
end
713713
end
714714
elseif (slotName == "Weapon 1" or slotName == "Weapon 2") and modDB.conditions["AffectedByEnergyBlade"] then
715-
local type = env.player.itemList[slotName] and env.player.itemList[slotName].weaponData and env.player.itemList[slotName].weaponData[1].type
715+
local previousItem = env.player.itemList[slotName]
716+
local type = previousItem and previousItem.weaponData and previousItem.weaponData[1].type
716717
local info = env.data.weaponTypeInfo[type]
717718
if info and type ~= "Bow" then
718719
local name = info.oneHand and "Energy Blade One Handed" or "Energy Blade Two Handed"
@@ -738,6 +739,8 @@ function calcs.initEnv(build, mode, override, specEnv)
738739
end
739740
item:NormaliseQuality()
740741
item:BuildAndParseRaw()
742+
item.sockets = previousItem.sockets
743+
item.abyssalSocketCount = previousItem.abyssalSocketCount
741744
env.player.itemList[slotName] = item
742745
else
743746
env.itemModDB:ScaleAddList(srcList, scale)

0 commit comments

Comments
 (0)