Skip to content

Commit

Permalink
Fixed an issue with one-handed weapons when combined with main-hand o…
Browse files Browse the repository at this point in the history
…r off-hand weapons
  • Loading branch information
Slackluster committed Aug 9, 2024
1 parent d114643 commit b463e43
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,27 @@ function api.DoTheThing(msg)
end
-- If dual wielding with 1 upgrade
elseif dualCount == 1 then
-- Equip to main hand if not already equipped there
if v.item ~= item16 then
if #bestWeapons == 2 then
if bestWeapons[1].slot == 16 or bestWeapons[2].slot == 17 then
if k == 1 and v.item ~= item16 then
v.slot = 16
upgrade[#upgrade+1] = v
elseif k == 2 and v.item ~= item17 then
v.slot = 17
upgrade[#upgrade+1] = v
end
elseif bestWeapons[1].slot == 17 or bestWeapons[2].slot == 16 then
if k == 2 and v.item ~= item16 then
v.slot = 16
upgrade[#upgrade+1] = v
elseif k == 1 and v.item ~= item17 then
v.slot = 17
upgrade[#upgrade+1] = v
end
end
elseif v.item ~= item16 then
v.slot = 16
upgrade[#upgrade+1] = v
-- Equip to off hand if not already equipped there
elseif v.item ~= item17 then
v.slot = 17
upgrade[#upgrade+1] = v
end
-- If dual wielding with 2 upgrades
elseif dualCount == 2 then
Expand Down

0 comments on commit b463e43

Please sign in to comment.