mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Core/Chat: Send broadcast text id in sound packets to allow playing encrypted sound files
This commit is contained in:
@@ -2686,7 +2686,9 @@ public:
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 soundId = atoul(args);
|
||||
char const* soundIdToken = strtok((char*)args, " ");
|
||||
|
||||
uint32 soundId = atoul(soundIdToken);
|
||||
|
||||
if (!sSoundKitStore.LookupEntry(soundId))
|
||||
{
|
||||
@@ -2695,7 +2697,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
sWorld->SendGlobalMessage(WorldPackets::Misc::PlaySound(handler->GetSession()->GetPlayer()->GetGUID(), soundId).Write());
|
||||
uint32 broadcastTextId = 0;
|
||||
char const* broadcastTextIdToken = strtok(nullptr, " ");
|
||||
if (broadcastTextIdToken)
|
||||
broadcastTextId = atoul(broadcastTextIdToken);
|
||||
|
||||
sWorld->SendGlobalMessage(WorldPackets::Misc::PlaySound(handler->GetSession()->GetPlayer()->GetGUID(), soundId, broadcastTextId).Write());
|
||||
|
||||
handler->PSendSysMessage(LANG_COMMAND_PLAYED_TO_ALL, soundId);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user