mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: play minimap ping sound when party members ping the map
Add playMinimapPing() to UiSoundManager with MapPing.wav (falls back to target select sound). Play the ping sound in MSG_MINIMAP_PING handler when the sender is not the local player. Provides audio feedback for party member map pings, matching WoW behavior.
This commit is contained in:
parent
f03ed8551b
commit
180990b9f1
3 changed files with 20 additions and 0 deletions
|
|
@ -78,6 +78,9 @@ public:
|
||||||
// Chat notifications
|
// Chat notifications
|
||||||
void playWhisperReceived();
|
void playWhisperReceived();
|
||||||
|
|
||||||
|
// Minimap ping
|
||||||
|
void playMinimapPing();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct UISample {
|
struct UISample {
|
||||||
std::string path;
|
std::string path;
|
||||||
|
|
@ -126,6 +129,7 @@ private:
|
||||||
std::vector<UISample> selectTargetSounds_;
|
std::vector<UISample> selectTargetSounds_;
|
||||||
std::vector<UISample> deselectTargetSounds_;
|
std::vector<UISample> deselectTargetSounds_;
|
||||||
std::vector<UISample> whisperSounds_;
|
std::vector<UISample> whisperSounds_;
|
||||||
|
std::vector<UISample> minimapPingSounds_;
|
||||||
|
|
||||||
// State tracking
|
// State tracking
|
||||||
float volumeScale_ = 1.0f;
|
float volumeScale_ = 1.0f;
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,12 @@ bool UiSoundManager::initialize(pipeline::AssetManager* assets) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Minimap ping sound
|
||||||
|
minimapPingSounds_.resize(1);
|
||||||
|
if (!loadSound("Sound\\Interface\\MapPing.wav", minimapPingSounds_[0], assets)) {
|
||||||
|
minimapPingSounds_ = selectTargetSounds_; // fallback to target select sound
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO("UISoundManager: Window sounds - Bag: ", (bagOpenLoaded && bagCloseLoaded) ? "YES" : "NO",
|
LOG_INFO("UISoundManager: Window sounds - Bag: ", (bagOpenLoaded && bagCloseLoaded) ? "YES" : "NO",
|
||||||
", QuestLog: ", (questLogOpenLoaded && questLogCloseLoaded) ? "YES" : "NO",
|
", QuestLog: ", (questLogOpenLoaded && questLogCloseLoaded) ? "YES" : "NO",
|
||||||
", CharSheet: ", (charSheetOpenLoaded && charSheetCloseLoaded) ? "YES" : "NO");
|
", CharSheet: ", (charSheetOpenLoaded && charSheetCloseLoaded) ? "YES" : "NO");
|
||||||
|
|
@ -236,5 +242,8 @@ void UiSoundManager::playTargetDeselect() { playSound(deselectTargetSounds_); }
|
||||||
// Chat notifications
|
// Chat notifications
|
||||||
void UiSoundManager::playWhisperReceived() { playSound(whisperSounds_); }
|
void UiSoundManager::playWhisperReceived() { playSound(whisperSounds_); }
|
||||||
|
|
||||||
|
// Minimap ping
|
||||||
|
void UiSoundManager::playMinimapPing() { playSound(minimapPingSounds_); }
|
||||||
|
|
||||||
} // namespace audio
|
} // namespace audio
|
||||||
} // namespace wowee
|
} // namespace wowee
|
||||||
|
|
|
||||||
|
|
@ -3544,6 +3544,13 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
||||||
ping.wowY = pingX; // canonical WoW Y = west = server's posX
|
ping.wowY = pingX; // canonical WoW Y = west = server's posX
|
||||||
ping.age = 0.0f;
|
ping.age = 0.0f;
|
||||||
minimapPings_.push_back(ping);
|
minimapPings_.push_back(ping);
|
||||||
|
// Play ping sound for other players' pings (not our own)
|
||||||
|
if (senderGuid != playerGuid) {
|
||||||
|
if (auto* renderer = core::Application::getInstance().getRenderer()) {
|
||||||
|
if (auto* sfx = renderer->getUiSoundManager())
|
||||||
|
sfx->playMinimapPing();
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Opcode::SMSG_ZONE_UNDER_ATTACK: {
|
case Opcode::SMSG_ZONE_UNDER_ATTACK: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue