Skip to content

Commit

Permalink
Fix backwards (3.4.0) compatibility
Browse files Browse the repository at this point in the history
Fix a flyout menu tooltip error
  • Loading branch information
Road-block authored and Rottenbeer committed Jan 19, 2023
1 parent 8273a70 commit d1e5666
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
11 changes: 6 additions & 5 deletions ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
Expand Down Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions ItemRack/ItemRackEquip.lua
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ItemRack/ItemRack_Wrath.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion ItemRackOptions/ItemRackOptions_Wrath.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 30400
## Interface: 30401
## Title: ItemRackOptions
## Notes: Load-On-Demand modules for ItemRack
## Dependencies: ItemRack, Blizzard_MacroUI
Expand Down

0 comments on commit d1e5666

Please sign in to comment.