diff --git a/include/audio/ui_sound_manager.hpp b/include/audio/ui_sound_manager.hpp index 241014ae..6423d460 100644 --- a/include/audio/ui_sound_manager.hpp +++ b/include/audio/ui_sound_manager.hpp @@ -75,6 +75,9 @@ public: void playTargetSelect(); void playTargetDeselect(); + // Chat notifications + void playWhisperReceived(); + private: struct UISample { std::string path; @@ -122,6 +125,7 @@ private: std::vector errorSounds_; std::vector selectTargetSounds_; std::vector deselectTargetSounds_; + std::vector whisperSounds_; // State tracking float volumeScale_ = 1.0f; diff --git a/src/audio/ui_sound_manager.cpp b/src/audio/ui_sound_manager.cpp index f32f0d9b..8ef800f0 100644 --- a/src/audio/ui_sound_manager.cpp +++ b/src/audio/ui_sound_manager.cpp @@ -122,6 +122,14 @@ bool UiSoundManager::initialize(pipeline::AssetManager* assets) { deselectTargetSounds_.resize(1); loadSound("Sound\\Interface\\iDeselectTarget.wav", deselectTargetSounds_[0], assets); + // Whisper notification (falls back to iSelectTarget if the dedicated file is absent) + whisperSounds_.resize(1); + if (!loadSound("Sound\\Interface\\Whisper_TellMale.wav", whisperSounds_[0], assets)) { + if (!loadSound("Sound\\Interface\\Whisper_TellFemale.wav", whisperSounds_[0], assets)) { + whisperSounds_ = selectTargetSounds_; + } + } + LOG_INFO("UISoundManager: Window sounds - Bag: ", (bagOpenLoaded && bagCloseLoaded) ? "YES" : "NO", ", QuestLog: ", (questLogOpenLoaded && questLogCloseLoaded) ? "YES" : "NO", ", CharSheet: ", (charSheetOpenLoaded && charSheetCloseLoaded) ? "YES" : "NO"); @@ -225,5 +233,8 @@ void UiSoundManager::playError() { playSound(errorSounds_); } void UiSoundManager::playTargetSelect() { playSound(selectTargetSounds_); } void UiSoundManager::playTargetDeselect() { playSound(deselectTargetSounds_); } +// Chat notifications +void UiSoundManager::playWhisperReceived() { playSound(whisperSounds_); } + } // namespace audio } // namespace wowee diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index db6402c8..0da74826 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -6325,6 +6325,7 @@ void GameScreen::renderRaidWarningOverlay(game::GameHandler& gameHandler) { // Walk only the new messages (deque — iterate from back by skipping old ones) size_t toScan = newCount - raidWarnChatSeenCount_; size_t startIdx = newCount > toScan ? newCount - toScan : 0; + auto* renderer = core::Application::getInstance().getRenderer(); for (size_t i = startIdx; i < newCount; ++i) { const auto& msg = chatHistory[i]; if (msg.type == game::ChatType::RAID_WARNING || @@ -6338,6 +6339,11 @@ void GameScreen::renderRaidWarningOverlay(game::GameHandler& gameHandler) { if (raidWarnEntries_.size() > 3) raidWarnEntries_.erase(raidWarnEntries_.begin()); } + // Whisper audio notification + if (msg.type == game::ChatType::WHISPER && renderer) { + if (auto* ui = renderer->getUiSoundManager()) + ui->playWhisperReceived(); + } } raidWarnChatSeenCount_ = newCount; }