Play SMSG_PLAY_OBJECT_SOUND and SMSG_PLAY_SPELL_IMPACT audio via DBC lookup

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).
This commit is contained in:
Kelsi 2026-03-09 16:12:52 -07:00
parent a2c2675039
commit 0913146f54

View file

@ -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;