From cff9006074775b4c0f8b92ca8c75272299569851 Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 14:18:54 +0200 Subject: [PATCH 1/5] basic wrath support --- ItemRack/ItemRack.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 01e85a1..2c1f0c8 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -12,6 +12,10 @@ function ItemRack.IsBCC() return WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC end +function ItemRack.IsWrath() + return WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC +end + local LDB = LibStub("LibDataBroker-1.1") local LDBIcon = LibStub("LibDBIcon-1.0") @@ -77,7 +81,7 @@ ItemRack.Menu = {} ItemRack.LockList = {} -- index -2 to 11, flag whether item is tagged already for swap if ItemRack.IsClassic() then ItemRack.BankSlots = { -1,5,6,7,8,9,10 } -elseif ItemRack.IsBCC() then +elseif ItemRack.IsBCC() or ItemRack.IsWrath() then ItemRack.BankSlots = { -1,5,6,7,8,9,10,11 } end ItemRack.KnownItems = {} -- cache of known item locations for fast lookup From 8246c19dcd1771ee018ad4ff8c6581fcb9f1c740 Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 15:52:35 +0200 Subject: [PATCH 2/5] dual spec events --- ItemRack/ItemRack.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 2c1f0c8..4863dd6 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -182,7 +182,7 @@ function ItemRack.InitEventHandlers() handler.CHARACTER_POINTS_CHANGED = ItemRack.UpdateClassSpecificStuff handler.PLAYER_TALENT_UPDATE = ItemRack.UpdateClassSpecificStuff handler.PLAYER_ENTERING_WORLD = ItemRack.OnEnterWorld --- handler.ACTIVE_TALENT_GROUP_CHANGED = ItemRack.UpdateClassSpecificStuff + handler.ACTIVE_TALENT_GROUP_CHANGED = ItemRack.UpdateClassSpecificStuff -- handler.PET_BATTLE_OPENING_START = ItemRack.OnEnteringPetBattle -- handler.PET_BATTLE_CLOSE = ItemRack.OnLeavingPetBattle end From c3c5980b681c1796231b7eb9ac4c4dd03eaad66e Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 15:54:28 +0200 Subject: [PATCH 3/5] deathknights can use offhands --- ItemRack/ItemRack.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 4863dd6..8d933b9 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -393,6 +393,10 @@ function ItemRack.UpdateClassSpecificStuff() if class=="SHAMAN" then ItemRack.CanWearOneHandOffHand = 1 end + + if class=="DEATHKNIGHT" then + ItemRack.CanWearOneHandOffHand = 1 + end end function ItemRack.OnSetBagItem(tooltip, bag, slot) @@ -481,8 +485,8 @@ function ItemRack.InitCore() ItemRackFrame:RegisterEvent("BANKFRAME_CLOSED") ItemRackFrame:RegisterEvent("BANKFRAME_OPENED") ItemRackFrame:RegisterEvent("CHARACTER_POINTS_CHANGED") - -- ItemRackFrame:RegisterEvent("PLAYER_TALENT_UPDATE") - -- ItemRackFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + ItemRackFrame:RegisterEvent("PLAYER_TALENT_UPDATE") + ItemRackFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") -- ItemRackFrame:RegisterEvent("PET_BATTLE_OPENING_START") -- ItemRackFrame:RegisterEvent("PET_BATTLE_CLOSE") --if not disable_delayed_swaps then From f033a88bafbbe2064b6097156d809ef45bf58920 Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 16:03:58 +0200 Subject: [PATCH 4/5] simplify code --- ItemRack/ItemRack.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ItemRack/ItemRack.lua b/ItemRack/ItemRack.lua index 8d933b9..2763387 100644 --- a/ItemRack/ItemRack.lua +++ b/ItemRack/ItemRack.lua @@ -386,15 +386,7 @@ end function ItemRack.UpdateClassSpecificStuff() local _,class = UnitClass("player") - if class=="WARRIOR" or class=="ROGUE" or class=="HUNTER" or class=="MAGE" or class=="WARLOCK" then - ItemRack.CanWearOneHandOffHand = 1 - end - - if class=="SHAMAN" then - ItemRack.CanWearOneHandOffHand = 1 - end - - if class=="DEATHKNIGHT" then + if class=="WARRIOR" or class=="ROGUE" or class=="HUNTER" or class=="MAGE" or class=="WARLOCK" or class=="SHAMAN" or class=="DEATHKNIGHT" then ItemRack.CanWearOneHandOffHand = 1 end end From 4b8bb495b66c7259e435c08336a3474247aa0edd Mon Sep 17 00:00:00 2001 From: Jelmer Jaarsma Date: Mon, 19 Sep 2022 17:52:35 +0200 Subject: [PATCH 5/5] update TOC --- ItemRack/ItemRack.toc | 1 + 1 file changed, 1 insertion(+) diff --git a/ItemRack/ItemRack.toc b/ItemRack/ItemRack.toc index 075031f..13654c1 100644 --- a/ItemRack/ItemRack.toc +++ b/ItemRack/ItemRack.toc @@ -1,6 +1,7 @@ ## Interface: 20501 ## Interface-Classic: 11400 ## Interface-BCC: 20501 +## Interface-WOTLKC: 30400 ## Title: ItemRack ## Author: Gello - Updated for Classic by Rottenbeer ## SavedVariables: ItemRackSettings, ItemRackItems, ItemRackEvents