From d1e56664beb274f0505effa78eff67c20c595d93 Mon Sep 17 00:00:00 2001 From: Road-block Date: Sun, 8 Jan 2023 08:11:13 +0200 Subject: [PATCH] Fix backwards (3.4.0) compatibility Fix a flyout menu tooltip error --- Changelog.txt | 4 ++++ ItemRack/ItemRack.lua | 11 ++++++----- ItemRack/ItemRackEquip.lua | 7 ++++--- ItemRack/ItemRack_Wrath.toc | 4 ++-- ItemRackOptions/ItemRackOptions_Wrath.toc | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index 039b997..432d99a 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,7 @@ +__ New in 3.75 - By Roadblock __ +* WOTLK 3.4.1 compatibility +* Fix a flyout menu tooltip error + __ New in 3.74 - By Roadblock __ * WOTLK fix for Polearms + Titan's Grip. * Fix for ammo slot not equipping the set ammo. diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 76d0929..72b95a7 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -17,13 +17,14 @@ function ItemRack.IsWrath() return WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC end -local GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem +local GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem, ContainerIDToInventoryID if C_Container then GetContainerNumSlots = C_Container.GetContainerNumSlots GetContainerItemLink = C_Container.GetContainerItemLink GetContainerItemCooldown = C_Container.GetContainerItemCooldown GetItemCooldown = C_Container.GetItemCooldown PickupContainerItem = C_Container.PickupContainerItem + ContainerIDToInventoryID = C_Container.ContainerIDToInventoryID GetContainerItemInfo = function(bag, slot) local info = C_Container.GetContainerItemInfo(bag, slot) if info then @@ -33,8 +34,8 @@ if C_Container then end end else - GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem = - GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem + GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem, ContainerIDToInventoryID = + _G.GetContainerNumSlots, _G.GetContainerItemLink, _G.GetContainerItemCooldown, _G.GetContainerItemInfo, _G.GetItemCooldown, _G.PickupContainerItem, _G.ContainerIDToInventoryID end local LDB = LibStub("LibDataBroker-1.1") @@ -683,13 +684,13 @@ function ItemRack.FindItem(id,lock) local knownID = ItemRack.KnownItems[id] if knownID then local bag,slot = math.floor(knownID/100),mod(knownID,100) - if bag<0 and not slot then + if bag < 0 and not slot then bag = bag*-1 if id==getid(bag) and (not lock or not locklist[-2][bag]) then if lock then locklist[-2][bag]=1 end return bag end - else + elseif slot and slot > 0 then if id==getid(bag,slot) and (not lock or not locklist[bag][slot]) then if lock then locklist[bag][slot]=1 end return nil,bag,slot diff --git a/ItemRack/ItemRackEquip.lua b/ItemRack/ItemRackEquip.lua index 027243d..24bae79 100644 --- a/ItemRack/ItemRackEquip.lua +++ b/ItemRack/ItemRackEquip.lua @@ -1,11 +1,12 @@ -- ItemRackEquip.lua : ItemRack.EquipSet and its supporting functions. -local GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem +local GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem, ContainerIDToInventoryID if C_Container then GetContainerNumSlots = C_Container.GetContainerNumSlots GetContainerItemLink = C_Container.GetContainerItemLink GetContainerItemCooldown = C_Container.GetContainerItemCooldown GetItemCooldown = C_Container.GetItemCooldown PickupContainerItem = C_Container.PickupContainerItem + ContainerIDToInventoryID = C_Container.ContainerIDToInventoryID GetContainerItemInfo = function(bag, slot) local info = C_Container.GetContainerItemInfo(bag, slot) if info then @@ -15,8 +16,8 @@ if C_Container then end end else - GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem = - GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem + GetContainerNumSlots, GetContainerItemLink, GetContainerItemCooldown, GetContainerItemInfo, GetItemCooldown, PickupContainerItem, ContainerIDToInventoryID = + _G.GetContainerNumSlots, _G.GetContainerItemLink, _G.GetContainerItemCooldown, _G.GetContainerItemInfo, _G.GetItemCooldown, _G.PickupContainerItem, _G.ContainerIDToInventoryID end ItemRack.SwapList = {} -- table of item ids that want to swap in, indexed by slot diff --git a/ItemRack/ItemRack_Wrath.toc b/ItemRack/ItemRack_Wrath.toc index 8a6a4b1..c12e0ff 100644 --- a/ItemRack/ItemRack_Wrath.toc +++ b/ItemRack/ItemRack_Wrath.toc @@ -1,6 +1,6 @@ -## Interface: 30400 +## Interface: 30401 ## Title: ItemRack - Classic -## Version: 2.74 +## Version: 2.75 ## Author: Gello - Updated for Classic by Rottenbeer,Roadblock ## SavedVariables: ItemRackSettings, ItemRackItems, ItemRackEvents ## SavedVariablesPerCharacter: ItemRackUser diff --git a/ItemRackOptions/ItemRackOptions_Wrath.toc b/ItemRackOptions/ItemRackOptions_Wrath.toc index 0f0fb6a..d949483 100644 --- a/ItemRackOptions/ItemRackOptions_Wrath.toc +++ b/ItemRackOptions/ItemRackOptions_Wrath.toc @@ -1,4 +1,4 @@ -## Interface: 30400 +## Interface: 30401 ## Title: ItemRackOptions ## Notes: Load-On-Demand modules for ItemRack ## Dependencies: ItemRack, Blizzard_MacroUI