Skip to content

Commit

Permalink
titangrip support
Browse files Browse the repository at this point in the history
Jelmer Jaarsma committed Sep 19, 2022
1 parent d9f85da commit a737a5a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
@@ -73,6 +73,12 @@ ItemRackItems = {
["25653"] = { keep=1 }, -- riding crop
}

ItemRack.NoTitansGrip = {
["Polearms"] = 1,
["Fishing Poles"] = 1,
["Staves"] = 1
}

ItemRack.Menu = {}
ItemRack.LockList = {} -- index -2 to 11, flag whether item is tagged already for swap
if ItemRack.IsClassic() then
@@ -386,6 +392,16 @@ function ItemRack.UpdateClassSpecificStuff()
ItemRack.CanWearOneHandOffHand = 1
end

if class=="WARRIOR" then
if select(5,GetTalentInfo(2,26))>0 then
ItemRack.HasTitansGrip = 1
ItemRack.SlotInfo[17].INVTYPE_2HWEAPON = 1
else
ItemRack.HasTitansGrip = nil
ItemRack.SlotInfo[18].INVTYPE_2HWEAPON = nil
end
end

if class=="SHAMAN" then
ItemRack.CanWearOneHandOffHand = 1
end
@@ -1327,7 +1343,7 @@ function ItemRack.EquipItemByID(id,slot)
if not isLocked and not IsInventoryItemLocked(slot) then
-- neither container item nor inventory item locked, perform swap
local _,_,equipSlot = ItemRack.GetInfoByID(id)
if equipSlot~="INVTYPE_2HWEAPON" or not GetInventoryItemLink("player",17) then
if equipSlot~="INVTYPE_2HWEAPON" or (ItemRack.HasTitansGrip and not ItemRack.NoTitansGrip[select(7,GetItemInfo(GetContainerItemLink(b,s))) or ""]) or not GetInventoryItemLink("player",17) then
PickupContainerItem(b,s)
PickupInventoryItem(slot)
else

0 comments on commit a737a5a

Please sign in to comment.