Quantcast

Fix: Error when playing sounds

Alar of Runetotem [08-30-17 - 08:55]
Fix: Error when playing sounds
Filename
MissionCompletion.lua
MissionControl.lua
RelNotes.lua
ShipControl.lua
Widgets.lua
diff --git a/MissionCompletion.lua b/MissionCompletion.lua
index f23b2a6..df66d5e 100644
--- a/MissionCompletion.lua
+++ b/MissionCompletion.lua
@@ -311,10 +311,10 @@ function module:GetMissionResults(success,currentMission)
 	stopTimer()
 	if (success) then
 		report:AddMissionResult(currentMission.missionID,true)
-		PlaySound("UI_Garrison_Mission_Complete_Mission_Success")
+		PlaySound(SOUNDKIT.UI_GARRISON_MISSION_COMPLETE_MISSION_SUCCESS)
 	else
 		report:AddMissionResult(currentMission.missionID,false)
-		PlaySound("UI_Garrison_Mission_Complete_Encounter_Fail")
+		PlaySound(SOUNDKIT.UI_GARRISON_MISSION_COMPLETE_MISSION_FAIL_STINGER)
 	end
 	if success then
 		local resourceMultiplier=currentMission.resourceMultiplier or {}
diff --git a/MissionControl.lua b/MissionControl.lua
index dc922e0..c30d8c8 100644
--- a/MissionControl.lua
+++ b/MissionControl.lua
@@ -146,7 +146,7 @@ function module:RunMission(missionID,start)
 	local GMC=GMF.MissionControlTab
 	if (start) then
 		G.StartMission(missionID)
-		PlaySound("UI_Garrison_CommandTable_MissionStart")
+		PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
 		addon:RefreshFollowerStatus()
 		return
 	end
@@ -162,7 +162,7 @@ function module:RunMission(missionID,start)
 				if (not missionID) then
 					coroutine.yield(true)
 					G.StartMission(party.missionID)
-					PlaySound("UI_Garrison_CommandTable_MissionStart")
+					PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
 					coroutine.yield(true)
 				else
 					self:ScheduleTimer("RunMission",0.25,party.missionID,true)
diff --git a/RelNotes.lua b/RelNotes.lua
index 21aa6db..24e0e69 100644
--- a/RelNotes.lua
+++ b/RelNotes.lua
@@ -22,6 +22,9 @@ self:Wiki([[
 == Silent mode ==
 typing /gac silent in chat will eliminate every chat message from GarrisonCommander
 ]])
+self:RelNotes(2,18,4,[[
+Fix: Error when playing sounds
+]])
 self:RelNotes(2,18,2,[[
 Fix: Message: Interface\AddOns\GarrisonCommander\FollowerCache.lua:25: attempt to perform arithmetic on local 'GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY' (a table value)
 ]])
diff --git a/ShipControl.lua b/ShipControl.lua
index 33c2007..cd1d834 100644
--- a/ShipControl.lua
+++ b/ShipControl.lua
@@ -178,7 +178,8 @@ function module:RunMission(missionID,start)
 	local GMC=GSF.MissionControlTab
 	if (start) then
 		G.StartMission(missionID)
-		PlaySound("UI_Garrison_CommandTable_MissionStart")
+		PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
+
 		addon:RefreshFollowerStatus()
 		return
 	end
@@ -197,7 +198,7 @@ function module:RunMission(missionID,start)
 				if (not missionID) then
 					coroutine.yield(true)
 					G.StartMission(party.missionID)
-					PlaySound("UI_Garrison_CommandTable_MissionStart")
+					PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_MISSION_START)
 					coroutine.yield(true)
 				else
 					self:ScheduleTimer("RunMission",0.25,party.missionID,true)
diff --git a/Widgets.lua b/Widgets.lua
index 71359d4..e9f4274 100644
--- a/Widgets.lua
+++ b/Widgets.lua
@@ -127,7 +127,7 @@ print(follower)
 		local quality=G.GetFollowerQuality(followerID) or follower.quality
 		local level=G.GetFollowerLevel(followerID) or follower.level
 		if levelup then
-			PlaySound("UI_Garrison_CommandTable_Follower_LevelUp");
+			PlaySound(SOUNDKIT.UI_GARRISON_COMMAND_TABLE_FOLLOWER_LEVEL_UP);
 		end
 		return self:AddFollowerIcon(followerType,
 			addon:GetFollowerTexture(follower),