Core/Packets: converted SMSG_PLAY_SOUND and SMSG_PLAY_OBJECT_SOUND to packet class and corrected packet structure of
SMSG_PLAY_OBJECT_SOUND
This commit is contained in:
1 parent
c7f5732571
commit
9bf01799f0
11 files changed
+74
-48
No files matched your search
@@ -24,6 +24,7 @@
|
||||
#include "DBCStores.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Log.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "World.h"
|
||||
|
||||
@@ -305,13 +306,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 << uint64(source->GetGUID()); Todo: find out why some maps prevent the sound from appearing
|
||||
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) const
|
||||
void CreatureTextMgr::SendNonChatPacket(WorldObject* source, WorldPacket const* data, ChatMsg msgType, WorldObject const* whisperTarget, CreatureTextRange range, Team team, bool gmOnly) const
|
||||
{
|
||||
switch (msgType)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user