mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
[svn] * PlaySound changed to SendPlaySound, moved to WorldObject and used everywhere instead of hard-coding packet
--HG-- branch : trunk
This commit is contained in:
@@ -1166,6 +1166,16 @@ void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossW
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldObject::SendPlaySound(uint32 Sound, bool OnlySelf)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << Sound;
|
||||
if (OnlySelf && GetTypeId() == TYPEID_PLAYER )
|
||||
((Player*)this)->GetSession()->SendPacket( &data );
|
||||
else
|
||||
SendMessageToSet( &data, true ); // ToSelf ignored in this case
|
||||
}
|
||||
|
||||
namespace MaNGOS
|
||||
{
|
||||
class MessageChatLocaleCacheDo
|
||||
|
||||
Reference in New Issue
Block a user