Skip to content

Commit 681f0a6

Browse files
committed
allow 2h weapons to be considered valid for dual wield specs when dual wielding is not available; also require CanDualWield() for ranged specs before MoP to consider off-hand weapons valid
1 parent e301162 commit 681f0a6

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

AutoGear.lua

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3110,8 +3110,8 @@ function AutoGearGetValidGearSlots(info)
31103110
or (info.subclassID ~= Enum.ItemWeaponSubclass.Polearm)))
31113111
and { INVSLOT_MAINHAND, INVSLOT_OFFHAND }
31123112
or (((weapons == "any")
3113-
or (weapons == "2h"))
3114-
-- or ((weapons == "dual wield") and (not CanDualWield()))
3113+
or (weapons == "2h")
3114+
or ((weapons == "dual wield") and (not CanDualWield())))
31153115
and { INVSLOT_TABARD }
31163116
or nil),
31173117
[Enum.InventoryType.IndexWeaponmainhandType] = ((weapons == "any")
@@ -3127,9 +3127,9 @@ function AutoGearGetValidGearSlots(info)
31273127
and ((weapons == "any")
31283128
or (weapons == "dagger and any")
31293129
or (weapons == "dagger")
3130-
or ((weapons == "dual wield") and (not IsPlayerSpell(46917))))
3130+
or ((weapons == "dual wield") and (not IsPlayerSpell(46917)))
31313131
or ((TOC_VERSION_CURRENT < TOC_VERSION_MOP)
3132-
and (weapons == "ranged")))
3132+
and (weapons == "ranged"))))
31333133
and { INVSLOT_OFFHAND }
31343134
or nil,
31353135
[Enum.InventoryType.IndexHoldableType] = (weapons == "any")
@@ -3163,6 +3163,9 @@ function AutoGearGetValidGearSlots(info)
31633163
return gearSlotTable[info.invType]
31643164
end
31653165

3166+
-- indicates slots that go together as a set
3167+
-- for example, the set of slots for a shield is { main-hand and off-hand } even though the shield can only be equipped in the off-hand
3168+
-- this is useful to find which slots to use to add scores together from all items in those slots
31663169
function AutoGearGetSetSlots(info)
31673170
local setSlotTable = {
31683171
[Enum.InventoryType.IndexNonEquipType] = nil,
@@ -3204,7 +3207,8 @@ function AutoGearGetSetSlots(info)
32043207
or (info.subclassID ~= Enum.ItemWeaponSubclass.Polearm)))
32053208
and { INVSLOT_MAINHAND, INVSLOT_OFFHAND }
32063209
or (((weapons == "any")
3207-
or (weapons == "2h"))
3210+
or (weapons == "2h")
3211+
or ((weapons == "dual wield") and (not CanDualWield())))
32083212
and { INVSLOT_TABARD }
32093213
or nil),
32103214
[Enum.InventoryType.IndexWeaponmainhandType] = ((weapons == "any")
@@ -3220,9 +3224,9 @@ function AutoGearGetSetSlots(info)
32203224
and ((weapons == "any")
32213225
or (weapons == "dagger and any")
32223226
or (weapons == "dagger")
3223-
or ((weapons == "dual wield") and (not IsPlayerSpell(46917))))
3227+
or ((weapons == "dual wield") and (not IsPlayerSpell(46917)))
32243228
or ((TOC_VERSION_CURRENT < TOC_VERSION_MOP)
3225-
and (weapons == "ranged")))
3229+
and (weapons == "ranged"))))
32263230
and { INVSLOT_MAINHAND, INVSLOT_OFFHAND }
32273231
or nil,
32283232
[Enum.InventoryType.IndexHoldableType] = (weapons == "any")

0 commit comments

Comments
 (0)