From 0913146f546d751cef161a22a506ff00f26fd9eb Mon Sep 17 00:00:00 2001 From: Kelsi Date: Mon, 9 Mar 2026 16:12:52 -0700 Subject: [PATCH] Play SMSG_PLAY_OBJECT_SOUND and SMSG_PLAY_SPELL_IMPACT audio via DBC lookup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both opcodes send uint32 soundId as first field. Extend PlaySoundCallback to cover them so environmental object sounds and spell impact sounds are audible in-game (resolved through SoundEntries.dbc → AudioEngine::playSound2D). --- src/game/game_handler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 706e8cb7..6eab2fb5 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -4507,6 +4507,11 @@ void GameHandler::handlePacket(network::Packet& packet) { // ---- Play object/spell sounds ---- case Opcode::SMSG_PLAY_OBJECT_SOUND: case Opcode::SMSG_PLAY_SPELL_IMPACT: + if (packet.getSize() - packet.getReadPos() >= 4) { + uint32_t soundId = packet.readUInt32(); + LOG_DEBUG("SMSG_PLAY_OBJECT_SOUND/SPELL_IMPACT id=", soundId); + if (playSoundCallback_) playSoundCallback_(soundId); + } packet.setReadPos(packet.getSize()); break;