Skip to content

Commit

Permalink
Cataclysm Classic compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Road-block authored and Rottenbeer committed Apr 13, 2024
1 parent ae85321 commit fb33847
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
7 changes: 6 additions & 1 deletion ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ _G[addonName] = addon

local _

local wowver, wowbuild, wowbuilddate, wowtoc = GetBuildInfo()
ItemRack.Version = GetAddOnMetadata(addonName, "Version")

function ItemRack.IsClassic()
Expand All @@ -14,7 +15,11 @@ function ItemRack.IsBCC()
end

function ItemRack.IsWrath()
return WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC
return (WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC) and not ItemRack.IsCata()
end

function ItemRack.IsCata()
return wowtoc > 40000 and wowtoc < 50000
end

function ItemRack.IsEngravingActive()
Expand Down
9 changes: 5 additions & 4 deletions ItemRack/ItemRack.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Interface: 30403
## Interface-Classic: 11500
## Interface-BCC: 20504
## Interface-WOTLKC: 30403
## Interface: 30403, 40400
## Interface-Vanilla: 11500
## Interface-TBC: 20504
## Interface-Wrath: 30403
## Interface-Cata: 40400
## Title: ItemRack - Classic
## Version: 3.77
## Author: Gello - Updated for Classic by Rottenbeer,Roadblock
Expand Down
14 changes: 10 additions & 4 deletions ItemRack/ItemRackButtons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,17 @@ function ItemRack.InitButtons()
ItemRack.oldPaperDollItemSlotButton_OnModifiedClick = PaperDollItemSlotButton_OnModifiedClick
PaperDollItemSlotButton_OnModifiedClick = ItemRack.newPaperDollItemSlotButton_OnModifiedClick

ItemRack.oldCharacterAmmoSlot_OnClick = CharacterAmmoSlot:GetScript("OnClick")
CharacterAmmoSlot:SetScript("OnClick",ItemRack.newCharacterAmmoSlot_OnClick)
if CharacterAmmoSlot then
ItemRack.oldCharacterAmmoSlot_OnClick = CharacterAmmoSlot:GetScript("OnClick")
CharacterAmmoSlot:SetScript("OnClick",ItemRack.newCharacterAmmoSlot_OnClick)
end

local characterModel = CharacterModelFrame or CharacterModelScene
if characterModel then
ItemRack.oldCharacterModelFrame_OnMouseUp = characterModel:GetScript("OnMouseUp")
characterModel:SetScript("OnMouseUp",ItemRack.newCharacterModelFrame_OnMouseUp)
end

ItemRack.oldCharacterModelFrame_OnMouseUp = CharacterModelFrame:GetScript("OnMouseUp")
CharacterModelFrame:SetScript("OnMouseUp",ItemRack.newCharacterModelFrame_OnMouseUp)

local button
for i=0,20 do
Expand Down
9 changes: 5 additions & 4 deletions ItemRackOptions/ItemRackOptions.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## Interface: 30403
## Interface-Classic: 11500
## Interface-BCC: 20504
## Interface-WOTLKC: 30403
## Interface: 30403, 40400
## Interface-Vanilla: 11500
## Interface-TBC: 20504
## Interface-Wrath: 30403
## Interface-Cata: 40400
## Title: ItemRackOptions
## Notes: Load-On-Demand modules for ItemRack
## Dependencies: ItemRack, Blizzard_MacroUI
Expand Down

0 comments on commit fb33847

Please sign in to comment.