From a737a5a428604185771dd696b8b8d87c87a7fcad Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 14:21:20 +0200 Subject: [PATCH 1/3] 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 From 91de7c2ff0156fc9d4419f766557bac902a21701 Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 16:02:57 +0200 Subject: [PATCH 2/3] add iswrath condition --- ItemRack/ItemRack.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index f50cac5..6183940 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -392,7 +392,7 @@ function ItemRack.UpdateClassSpecificStuff() ItemRack.CanWearOneHandOffHand = 1 end - if class=="WARRIOR" then + if ItemRack.IsWrath() and class=="WARRIOR" then if select(5,GetTalentInfo(2,26))>0 then ItemRack.HasTitansGrip = 1 ItemRack.SlotInfo[17].INVTYPE_2HWEAPON = 1 From 95223f12af0d0f492c1d1fbef055061f4fa20a6d Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 17:08:25 +0200 Subject: [PATCH 3/3] 2handed should be disabled for offhand not ranged --- ItemRack/ItemRack.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 6183940..f6aac63 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -398,7 +398,7 @@ function ItemRack.UpdateClassSpecificStuff() ItemRack.SlotInfo[17].INVTYPE_2HWEAPON = 1 else ItemRack.HasTitansGrip = nil - ItemRack.SlotInfo[18].INVTYPE_2HWEAPON = nil + ItemRack.SlotInfo[17].INVTYPE_2HWEAPON = nil end end