mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: play audio notification when a whisper is received
Adds UiSoundManager::playWhisperReceived() which uses the dedicated Whisper_TellMale/Female.wav files (or falls back to iSelectTarget.wav if absent). The sound is triggered once per new incoming CHAT_MSG_WHISPER message by scanning new chat history entries in the raid warning overlay update loop.
This commit is contained in:
parent
bcd984c1c5
commit
39bf8fb01e
3 changed files with 21 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue