feat(Core/Script): Playing music from GameObjects and added holiday zones music script (#3307)
This commit is contained in:
parent
e2f9a080f2
commit
29f2c2aeda
4 changed files with 399 additions and 0 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue