Core/Packets: converted SMSG_PLAY_MUSIC to packet class and corrected packet structure

This commit is contained in:
Ovahlord committed 2020-04-07 15:59:33 +02:00
1 parent 77f94a456c
commit 113202ea48
5 files changed
+31 -24

No files matched your search

+3 -5
View File
@@ -2626,14 +2626,12 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= nullptr*/)
SendMessageToSet(packet.Write(), true);
}
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= nullptr*/)
void WorldObject::PlayDirectMusic(uint32 musicId, Player* target /*= nullptr*/)
{
WorldPacket data(SMSG_PLAY_MUSIC, 4);
data << uint32(music_id);
if (target)
target->SendDirectMessage(&data);
target->SendDirectMessage(WorldPackets::Misc::PlayMusic(musicId, GetGUID()).Write());
else
SendMessageToSet(&data, true);
SendMessageToSet(WorldPackets::Misc::PlayMusic(musicId, GetGUID()).Write(), true);
}
void WorldObject::DestroyForNearbyPlayers()