Skip to content

Commit

Permalink
Merge branch 'master' into titangrip
Browse files Browse the repository at this point in the history
  • Loading branch information
Rottenbeer authored Sep 19, 2022
2 parents 95223f1 + 4b8bb49 commit 33cb0ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ItemRack/ItemRack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down Expand Up @@ -83,7 +87,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
Expand Down Expand Up @@ -184,7 +188,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
Expand Down Expand Up @@ -388,7 +392,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
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

Expand All @@ -402,9 +406,6 @@ function ItemRack.UpdateClassSpecificStuff()
end
end

if class=="SHAMAN" then
ItemRack.CanWearOneHandOffHand = 1
end
end

function ItemRack.OnSetBagItem(tooltip, bag, slot)
Expand Down Expand Up @@ -493,8 +494,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
Expand Down
1 change: 1 addition & 0 deletions ItemRack/ItemRack.toc
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 33cb0ba

Please sign in to comment.