mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
feat(Core/Script): Playing music from GameObjects and added holiday zones music script (#3307)
This commit is contained in:
@@ -2894,6 +2894,21 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
|
||||
void WorldObject::PlayDirectMusic(uint32 music_id, Player* target /*= NULL*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << uint32(music_id);
|
||||
if (target)
|
||||
{
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
else
|
||||
{
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldObject::DestroyForNearbyPlayers()
|
||||
{
|
||||
if (!IsInWorld())
|
||||
|
||||
Reference in New Issue
Block a user