diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 0fea9b6..ffcba35 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -3,6 +3,7 @@ _G[addonName] = addon local _ +local wowver, wowbuild, wowbuilddate, wowtoc = GetBuildInfo() ItemRack.Version = GetAddOnMetadata(addonName, "Version") function ItemRack.IsClassic() @@ -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() diff --git a/ItemRack/ItemRack.toc b/ItemRack/ItemRack.toc index 9fbf0f0..9a0cbe1 100644 --- a/ItemRack/ItemRack.toc +++ b/ItemRack/ItemRack.toc @@ -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 diff --git a/ItemRack/ItemRackButtons.lua b/ItemRack/ItemRackButtons.lua index a9ddec5..505d14b 100644 --- a/ItemRack/ItemRackButtons.lua +++ b/ItemRack/ItemRackButtons.lua @@ -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 diff --git a/ItemRackOptions/ItemRackOptions.toc b/ItemRackOptions/ItemRackOptions.toc index 407fc68..12a8fe3 100644 --- a/ItemRackOptions/ItemRackOptions.toc +++ b/ItemRackOptions/ItemRackOptions.toc @@ -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