mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
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:
parent
a2c2675039
commit
0913146f54
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue