Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cataclysm Classic Compatibility #255

Merged
merged 5 commits into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
11 changes: 6 additions & 5 deletions ItemRack/ItemRack.toc
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## 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
## Version: 3.78
## Author: Gello - Updated for Classic by Rottenbeer,Roadblock
## SavedVariables: ItemRackSettings, ItemRackItems, ItemRackEvents
## SavedVariablesPerCharacter: ItemRackUser
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