mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
Wire SMSG_PLAY_SOUND to AudioEngine via SoundEntries.dbc lookup
Add PlaySoundCallback to GameHandler (same pattern as PlayMusicCallback). When SMSG_PLAY_SOUND arrives, resolve the soundId through SoundEntries.dbc (fields 3-12 = files, field 23 = DirectoryBase) and play the first found file as a 2-D sound effect via AudioEngine::playSound2D(). Previously the opcode was parsed and dropped.
This commit is contained in:
parent
55082a0925
commit
a2c2675039
3 changed files with 29 additions and 1 deletions
|
|
@ -3041,6 +3041,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
if (packet.getSize() - packet.getReadPos() >= 4) {
|
||||
uint32_t soundId = packet.readUInt32();
|
||||
LOG_DEBUG("SMSG_PLAY_SOUND id=", soundId);
|
||||
if (playSoundCallback_) playSoundCallback_(soundId);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue