Skip to content

Commit

Permalink
Merge pull request #204 from jelmerj/titangrip
Browse files Browse the repository at this point in the history
titangrip support
  • Loading branch information
Rottenbeer authored Sep 19, 2022
2 parents 4b8bb49 + 33cb0ba commit 70a67a0
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,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
Expand Down Expand Up @@ -389,6 +395,17 @@ function ItemRack.UpdateClassSpecificStuff()
if class=="WARRIOR" or class=="ROGUE" or class=="HUNTER" or class=="MAGE" or class=="WARLOCK" or class=="SHAMAN" or class=="DEATHKNIGHT" then
ItemRack.CanWearOneHandOffHand = 1
end

if ItemRack.IsWrath() and 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[17].INVTYPE_2HWEAPON = nil
end
end

end

function ItemRack.OnSetBagItem(tooltip, bag, slot)
Expand Down Expand Up @@ -1327,7 +1344,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
Expand Down

0 comments on commit 70a67a0

Please sign in to comment.