Skip to content

Commit b1a5b30

Browse files
cscoder69claude
andcommitted
Sound menu rebuilt from sounds picked in game: coins, auction house open/close, world quest, bell, quest
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 3fe74bf commit b1a5b30

2 files changed

Lines changed: 26 additions & 31 deletions

File tree

‎CSCoder_QuestIndicator.lua‎

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ local DEFAULTS = {
4545
minimap = true, -- minimap button
4646
minimapAngle = 220, -- its position around the minimap (degrees)
4747
sound = true, -- play a sound when a quest objective completes
48-
soundChoice = "quest", -- key in QUEST_SOUNDS
48+
soundChoice = "coins", -- key in QUEST_SOUNDS
4949
}
5050
-- Saved layout: CSCoderQuestIndicatorDB = { version, language, profiles = { name = settings },
5151
-- chars = { "Name - Realm" = profile name }, savedCVars }.
@@ -587,39 +587,16 @@ end
587587
local objectiveTexts = {} -- { text = lower case objective, kind = quest kind }
588588
local objectiveStates = {} -- questID -> { [objective index] = finished }, to hear one complete
589589

590-
-- Sounds for "objective complete": sound kit IDs that every client has.
591-
local QUEST_SOUNDS = { quest = 878, ping = 3175, ready = 8960, warning = 8959, levelup = 888 }
592-
local QUEST_SOUND_ORDER = { "quest", "ping", "ready", "warning", "levelup" }
590+
-- Sounds for "objective complete" (sound kit IDs), picked by ear in game on 2026-11-09 from a
591+
-- longer list. The old choices (ping, ready, warning, level up) fall back to the default.
592+
local QUEST_SOUNDS = { coins = 120, auction = 5274, auctionclose = 1204, worldquest = 44295, bell = 6674, quest = 878 }
593+
local QUEST_SOUND_ORDER = { "coins", "auction", "auctionclose", "worldquest", "bell", "quest" }
593594

594595
local function PlayQuestSound()
595-
local id = QUEST_SOUNDS[db.soundChoice] or QUEST_SOUNDS.quest
596+
local id = QUEST_SOUNDS[db.soundChoice] or QUEST_SOUNDS[DEFAULTS.soundChoice]
596597
if PlaySound then pcall(PlaySound, id, "Master") end
597598
end
598599

599-
-- TEMPORARY: /cqi sound plays candidate sounds one by one, to pick a better list for the menu
600-
-- (some may not exist on this client and stay silent). Remove once the list is chosen.
601-
local SoundAudition
602-
do
603-
local candidates = {
604-
{ 878, "Quest complete" }, { 875, "Quest log open" }, { 847, "Quest failed" }, { 888, "Level up" },
605-
{ 8960, "Ready check" }, { 8959, "Raid warning" }, { 3175, "Map ping" }, { 3081, "Whisper" },
606-
{ 12867, "Alarm clock 2" }, { 12889, "Alarm clock 3" }, { 416, "Murloc" }, { 120, "Coins" },
607-
{ 5274, "Auction house open" }, { 8458, "PvP queue" }, { 8459, "PvP queue ready" }, { 880, "Group invite" },
608-
{ 18019, "Battle.net toast" }, { 31578, "Epic loot toast" }, { 44295, "World quest complete" },
609-
{ 23404, "Dig site complete" }, { 12891, "Achievement" }, { 3337, "Mail" }, { 1204, "Auction close" },
610-
{ 6674, "Bell toll" },
611-
}
612-
local index = 0
613-
function SoundAudition(arg)
614-
index = tonumber(arg) or (index % #candidates + 1)
615-
local c = candidates[index]
616-
if not c then return end
617-
if PlaySound then pcall(PlaySound, c[1], "Master") end
618-
print(string.format("|cffffd200%s|r sound %d/%d: %s (%d). Type /cqi sound for the next one, or /cqi sound <number>.",
619-
TITLE, index, #candidates, c[2], c[1]))
620-
end
621-
end
622-
623600
local function RebuildObjectiveTexts()
624601
wipe(objectiveTexts)
625602
if not (C_QuestLog and C_QuestLog.GetQuestObjectives) then return end
@@ -769,6 +746,7 @@ local function FillDefaults(profile)
769746
profile.cursor = nil -- removed option
770747
profile.style = OLD_STYLES[profile.style] or profile.style
771748
if not VALID_STYLE[profile.style] then profile.style = DEFAULT_STYLE end
749+
if not QUEST_SOUNDS[profile.soundChoice] then profile.soundChoice = DEFAULTS.soundChoice end
772750
for _, key in ipairs({ "anchor", "objectAnchor" }) do
773751
if not ICON_ANCHORS[profile[key]] then profile[key] = "top" end
774752
end
@@ -2434,8 +2412,6 @@ SlashCmdList.CSCODERQUESTINDICATOR = function(msg)
24342412
ApplySettings()
24352413
RefreshControls()
24362414
print("|cffffd200" .. TITLE .. "|r " .. (db.active and L.ON or L.OFF))
2437-
elseif cmd == "sound" then
2438-
SoundAudition((msg or ""):match("^%S+%s+(%d+)"))
24392415
elseif cmd == "setup" then
24402416
ShowWizard()
24412417
elseif cmd == "plate" then

‎Locales.lua‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -809,3 +809,22 @@ local wizardText = {
809809
for code, keys in pairs(wizardText) do
810810
for k, v in pairs(keys) do locales[code][k] = v end
811811
end
812+
813+
-- Objective-complete sounds (the menu was rebuilt from sounds picked by ear in game).
814+
local soundNames = {
815+
enUS = { SOUND_coins = "Coins", SOUND_auction = "Auction house (open)", SOUND_auctionclose = "Auction house (close)",
816+
SOUND_worldquest = "World quest complete", SOUND_bell = "Bell" },
817+
ptBR = { SOUND_coins = "Moedas", SOUND_auction = "Casa de leilões (abrir)", SOUND_auctionclose = "Casa de leilões (fechar)",
818+
SOUND_worldquest = "Missão mundial concluída", SOUND_bell = "Sino" },
819+
esES = { SOUND_coins = "Monedas", SOUND_auction = "Casa de subastas (abrir)", SOUND_auctionclose = "Casa de subastas (cerrar)",
820+
SOUND_worldquest = "Misión de mundo completada", SOUND_bell = "Campana" },
821+
deDE = { SOUND_coins = "Münzen", SOUND_auction = "Auktionshaus (öffnen)", SOUND_auctionclose = "Auktionshaus (schließen)",
822+
SOUND_worldquest = "Weltquest abgeschlossen", SOUND_bell = "Glocke" },
823+
frFR = { SOUND_coins = "Pièces", SOUND_auction = "Hôtel des ventes (ouvrir)", SOUND_auctionclose = "Hôtel des ventes (fermer)",
824+
SOUND_worldquest = "Expédition terminée", SOUND_bell = "Cloche" },
825+
itIT = { SOUND_coins = "Monete", SOUND_auction = "Casa d'aste (apri)", SOUND_auctionclose = "Casa d'aste (chiudi)",
826+
SOUND_worldquest = "Missione mondiale completata", SOUND_bell = "Campana" },
827+
}
828+
for code, keys in pairs(soundNames) do
829+
for k, v in pairs(keys) do locales[code][k] = v end
830+
end

0 commit comments

Comments
 (0)