Skip to content

Commit

Permalink
Updated PlaySound to use soundkits.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mortalknight committed Aug 29, 2017
1 parent c97ed14 commit e9cc9eb
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 28 deletions.
3 changes: 2 additions & 1 deletion bag.lua
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ function gw_move_bagbar()
if b=='RightButton' then

local parent = _G[default_bag_frame_container[k]];
PlaySound("igMainMenuOptionCheckBoxOn");

PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON );
ToggleDropDownMenu(1, nil, parent.FilterDropDown, self, 0, 0);

else
Expand Down
9 changes: 5 additions & 4 deletions character/character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,9 @@ end

function gwCharacterPanelToggle(frame)

PlaySound("igMainMenuOptionCheckBoxOn");



PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB );


GwPaperDollBagItemList:Hide()
Expand Down Expand Up @@ -821,7 +822,7 @@ function GwPaperDollOutfits_OnEvent(self, event, ...)
if ( event == "EQUIPMENT_SWAP_FINISHED" ) then
local completed, setName = ...;
if ( completed ) then
PlaySoundKitID(1212); -- plays the equip sound for plate mail
PlaySound(1212); -- plays the equip sound for plate mail
if (self:IsShown()) then
self.selectedSetName = setName;
GwOutfitsDrawItemSetList();
Expand Down Expand Up @@ -1396,7 +1397,7 @@ function gw_register_character_window()

hooksecurefunc('GearManagerDialogPopupOkay_OnClick',GwOutfitsDrawItemSetList)
GearManagerDialogPopup:SetScript('OnShow',function(self)
PlaySound("igCharacterInfoOpen");
PlaySound(SOUNDKIT.IG_CHARACTER_INFO_OPEN );
self.name = nil;
self.isEdit = false;
RecalculateGearManagerDialogPopup();
Expand Down
6 changes: 3 additions & 3 deletions frames/bag.xml
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
<HighlightFont style="ChatBubbleFont"></HighlightFont>
<Scripts>
<OnClick>
PlaySound("UI_BagSorting_01");
PlaySound(SOUNDKIT.UI_BAG_SORTING_01);
SortBankBags();
self:GetParent():Hide()
</OnClick>
Expand Down Expand Up @@ -898,8 +898,8 @@
<HighlightFont style="ChatBubbleFont"></HighlightFont>
<Scripts>
<OnClick>
PlaySound("UI_BagSorting_01");
SortBags();
PlaySound(SOUNDKIT.UI_BAG_SORTING_01);
SortBags();
self:GetParent():Hide()
</OnClick>
<OnLoad>
Expand Down
4 changes: 3 additions & 1 deletion frames/character.xml
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@
<OnClick>
local selectedSetName = GwPaperDollOutfits.selectedSetName;
if ( selectedSetName and selectedSetName ~= "") then
PlaySound("igCharacterInfoTab");

PlaySound(SOUNDKIT.IG_CHARACTER_INFO_TAB );

UseEquipmentSet(selectedSetName);
end
</OnClick>
Expand Down
3 changes: 2 additions & 1 deletion frames/hudelements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,8 @@
_G['GwLevelingRewardsItem4'].name:SetText(GwLocalization['LEVEL_REWARDS'])
</OnLoad>
<OnShow>
PlaySound("AchievementMenuOpen");

PlaySound(SOUNDKIT.ACHIEVEMENT_MENU_OPEN );
self.animationValue = -400
local name = self:GetName()
local start = GetTime()
Expand Down
6 changes: 4 additions & 2 deletions hud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -984,10 +984,12 @@ function create_micro_menu()

CloseMenus();
CloseAllWindows()
PlaySound("igMainMenuOpen");
PlaySound(SOUNDKIT.IG_MAINMENU_OPEN );

ShowUIPanel(GameMenuFrame);
else
PlaySound("igMainMenuQuit");

PlaySound(SOUNDKIT.IG_MAINMENU_QUIT );
HideUIPanel(GameMenuFrame);
MainMenuMicroButton_SetNormal();
end
Expand Down
7 changes: 4 additions & 3 deletions map.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ function gw_set_minimap()
Minimap:SetScript("OnMouseDown", function(self, event)
if event=='RightButton' then
ToggleDropDownMenu(1, nil, MiniMapTrackingDropDown, "MiniMapTracking", 0, -5);
PlaySound("igMainMenuOptionCheckBoxOn");

PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON );
end
end)

Expand Down Expand Up @@ -256,7 +257,7 @@ function GetMinimapShape()

function GwMapTimeClick(self,button)
if button == "LeftButton" then
PlaySound("igMainMenuOptionCheckBoxOn")
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON );

if IsShiftKeyDown() then
TimeManager_ToggleLocalTime()
Expand All @@ -266,7 +267,7 @@ function GwMapTimeClick(self,button)
end
end
if button == "RightButton" then
PlaySound("igMainMenuQuit")
PlaySound(SOUNDKIT.IG_MAINMENU_QUIT );
Stopwatch_Toggle()
end
end
Expand Down
5 changes: 3 additions & 2 deletions objectives/achievement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ function gw_register_achievement()
local p = self:GetParent()
if p.collapsed==nil or p.collapsed==false then
p.collapsed = true
PlaySound("igMainMenuOptionCheckBoxOff");
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF );

else
p.collapsed = false
PlaySound("igMainMenuOptionCheckBoxOn");
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON );
end
updateAchievementLayout()
end)
Expand Down
11 changes: 8 additions & 3 deletions objectives/bonusObjective.lua
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ local function updateBonusObjective(self,event)
local simpleDesc = ''
local compassData = {}



if isOnMap then
local compassData = {}
Expand All @@ -104,6 +105,7 @@ local function updateBonusObjective(self,event)
if numObjectives==nil then numObjectives = 0 end
if isInArea then


compassData['TITLE']= text


Expand All @@ -112,7 +114,7 @@ local function updateBonusObjective(self,event)

if savedQuests[questID]==nil then
gwNewQuestAnimation(GwBonusObjectiveBlock)
PlaySound("UI_WorldQuest_Start");
PlaySound(SOUNDKIT['UI_WORLDQUEST_START']);
savedQuests[questID] = true
end

Expand All @@ -127,6 +129,7 @@ local function updateBonusObjective(self,event)


for objectiveIndex = 1,numObjectives do

local text, objectiveType, finished = GetQuestObjectiveInfo(questID, objectiveIndex, false);


Expand Down Expand Up @@ -225,10 +228,12 @@ function gw_register_bonusObjectiveFrame()
local p = self:GetParent()
if p.collapsed==nil or p.collapsed==false then
p.collapsed = true
PlaySound("igMainMenuOptionCheckBoxOff");

PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON);
else
p.collapsed = false
PlaySound("igMainMenuOptionCheckBoxOn");

PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF);
end
updateBonusObjective()
end)
Expand Down
8 changes: 5 additions & 3 deletions objectives/objectives.lua
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ end

local function quest_update_POI(questID,questLogIndex)

PlaySound("igMainMenuOptionCheckBoxOn");

PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON );

if ( IsQuestWatched(questLogIndex) ) then
if ( IsShiftKeyDown() ) then
Expand Down Expand Up @@ -725,10 +726,11 @@ function gw_load_questTracker()
local p = self:GetParent()
if p.collapsed==nil or p.collapsed==false then
p.collapsed = true
PlaySound("igMainMenuOptionCheckBoxOff");

PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_OFF );
else
p.collapsed = false
PlaySound("igMainMenuOptionCheckBoxOn");
PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON );
end
updateQuestLogLayout('COLLAPSE')
end)
Expand Down
3 changes: 2 additions & 1 deletion questview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ end
GwQuestviewFrameContainerDialogString:SetText(QUESTSTRING[QUESTSTRINGINT])
setQuestGiverAnimation()
GwQuestviewFrameContainerAcceptButton:SetText(GwLocalization['QUEST_VIEW_SKIP'])
PlaySoundKitID(906)

PlaySound(906);
else
questTextCompleted()
end
Expand Down
10 changes: 6 additions & 4 deletions toast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,12 @@ local function toastRecive(itemLink, quantity, rollType, roll, specID, isCurrenc
GwSetItemButtonQuality(frame, itemRarity,itemHyperLink)

if ( lessAwesome ) then
PlaySoundKitID(51402); --UI_Raid_Loot_Toast_Lesser_Item_Won
PlaySound(51402); --UI_Raid_Loot_Toast_Lesser_Item_Won
elseif ( isUpgraded ) then
PlaySoundKitID(51561); -- UI_Warforged_Item_Loot_Toast
PlaySound(51561); -- UI_Warforged_Item_Loot_Toast
else
PlaySoundKitID(31578); --UI_EpicLoot_Toast
PlaySound(31578); --UI_EpicLoot_Toast

end

end
Expand Down Expand Up @@ -236,7 +237,8 @@ local function goldWon(amount)
frame.title:SetText('Gold')
frame.sub:SetText(GetMoneyString(amount));

PlaySoundKitID(31578); --UI_EpicLoot_Toast
PlaySound(31578); --UI_EpicLoot_Toast

end

local function onEvent(self,event,...)
Expand Down

0 comments on commit e9cc9eb

Please sign in to comment.