Soldiers can now use sets that don't require light offhand weapons

master
Durel 7 years ago
parent bef2c1a0d9
commit 38bf228198

@ -13942,9 +13942,12 @@ function inv.set.createWithHandicap(priorityName, level, handicap)
table.sort(weaponArray, function (entry1, entry2) return entry1.score > entry2.score end) table.sort(weaponArray, function (entry1, entry2) return entry1.score > entry2.score end)
table.sort(offhandArray, function (entry1, entry2) return entry1.offhand > entry2.offhand end) table.sort(offhandArray, function (entry1, entry2) return entry1.offhand > entry2.offhand end)
local _, subclass = dbot.gmcp.getClass()
for _, primary in ipairs(weaponArray) do for _, primary in ipairs(weaponArray) do
for _, offhand in ipairs(offhandArray) do for _, offhand in ipairs(offhandArray) do
if (primary.weight >= offhand.weight * 2) and (primary.id ~= offhand.id) then if (primary.id ~= offhand.id) and
((primary.weight >= offhand.weight * 2) or (string.lower(subclass) == "soldier")) then
if (primary.score + offhand.offhand > bestWeaponSet.score) then if (primary.score + offhand.offhand > bestWeaponSet.score) then
bestWeaponSet.score = primary.score + offhand.offhand bestWeaponSet.score = primary.score + offhand.offhand
bestWeaponSet.primary = { id = primary.id, score = primary.score } bestWeaponSet.primary = { id = primary.id, score = primary.score }

Loading…
Cancel
Save