Commit dd4d13cc authored by Blazeflack's avatar Blazeflack

Fixed error with PlaySound in the BagButtons tweak.

Reference: #4
parent 7cb13b81
......@@ -13,6 +13,8 @@ local ToggleFrame = ToggleFrame
local PlaySound = PlaySound
local IsShiftKeyDown = IsShiftKeyDown
local DepositReagentBank = DepositReagentBank
local IG_CHARACTER_INFO_TAB = SOUNDKIT.IG_CHARACTER_INFO_TAB
local IG_MAINMENU_OPTION = SOUNDKIT.IG_MAINMENU_OPTION
---
-- GLOBALS: BagItemAutoSortButton, BankFrame
......@@ -138,7 +140,7 @@ local function CreateContainerButtons(self, name, isBank)
f.reagentToggleOld:SetScript("OnEnter", B.Tooltip_Show)
f.reagentToggleOld:SetScript("OnLeave", B.Tooltip_Hide)
f.reagentToggleOld:SetScript("OnClick", function()
PlaySound("igCharacterInfoTab");
PlaySound(IG_CHARACTER_INFO_TAB);
if f.holderFrame:IsShown() then
BankFrame.selectedTab = 2
f.holderFrame:Hide()
......@@ -166,7 +168,7 @@ local function CreateContainerButtons(self, name, isBank)
--Modify original Reagent Toggle OnClick
f.reagentToggle:SetScript("OnClick", function()
PlaySound("igCharacterInfoTab");
PlaySound(IG_CHARACTER_INFO_TAB);
if f.holderFrame:IsShown() then
BankFrame.selectedTab = 2
f.holderFrame:Hide()
......@@ -245,7 +247,7 @@ local function CreateContainerButtons(self, name, isBank)
f.depositButtonOld:SetScript("OnEnter", B.Tooltip_Show)
f.depositButtonOld:SetScript("OnLeave", B.Tooltip_Hide)
f.depositButtonOld:SetScript('OnClick', function()
PlaySound("igMainMenuOption");
PlaySound(IG_MAINMENU_OPTION);
DepositReagentBank()
end)
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment