From a737a5a428604185771dd696b8b8d87c87a7fcad Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 14:21:20 +0200 Subject: [PATCH] titangrip support --- ItemRack/ItemRack.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 01e85a1..f50cac5 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -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