Core/Chat: Send broadcast text id in sound packets to allow playing encrypted sound files

This commit is contained in:
Shauren
2020-12-27 22:43:36 +01:00
parent 88301ec3be
commit 2e4609f6e1
10 changed files with 26 additions and 15 deletions
+3 -3
View File
@@ -2212,12 +2212,12 @@ void WorldObject::PlayDistanceSound(uint32 soundId, Player* target /*= nullptr*/
SendMessageToSet(WorldPackets::Misc::PlaySpeakerbotSound(GetGUID(), soundId).Write(), true);
}
void WorldObject::PlayDirectSound(uint32 soundId, Player* target /*= nullptr*/)
void WorldObject::PlayDirectSound(uint32 soundId, Player* target /*= nullptr*/, uint32 broadcastTextId /*= 0*/)
{
if (target)
target->SendDirectMessage(WorldPackets::Misc::PlaySound(GetGUID(), soundId).Write());
target->SendDirectMessage(WorldPackets::Misc::PlaySound(GetGUID(), soundId, broadcastTextId).Write());
else
SendMessageToSet(WorldPackets::Misc::PlaySound(GetGUID(), soundId).Write(), true);
SendMessageToSet(WorldPackets::Misc::PlaySound(GetGUID(), soundId, broadcastTextId).Write(), true);
}
void WorldObject::PlayDirectMusic(uint32 musicId, Player* target /*= nullptr*/)