aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Texts/CreatureTextMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Texts/CreatureTextMgr.cpp')
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 71b96c3d5bc..281504b9aaf 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -25,6 +25,7 @@
#include "GridNotifiersImpl.h"
#include "CreatureTextMgr.h"
#include "ChatPackets.h"
+#include "MiscPackets.h"
class CreatureTextBuilder
{
@@ -334,13 +335,10 @@ void CreatureTextMgr::SendSound(Creature* source, uint32 sound, ChatMsg msgType,
if (!sound || !source)
return;
- WorldPacket data(SMSG_PLAY_SOUND, 4 + 8);
- data << uint32(sound);
- data << source->GetGUID();
- SendNonChatPacket(source, &data, msgType, whisperTarget, range, team, gmOnly);
+ SendNonChatPacket(source, WorldPackets::Misc::PlaySound(source->GetGUID(), sound).Write(), msgType, whisperTarget, range, team, gmOnly);
}
-void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket* data, ChatMsg msgType, WorldObject const* whisperTarget, CreatureTextRange range, Team team, bool gmOnly)
+void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const* data, ChatMsg msgType, WorldObject const* whisperTarget, CreatureTextRange range, Team team, bool gmOnly)
{
switch (msgType)
{