[svn] * PlaySound changed to SendPlaySound, moved to WorldObject and used everywhere instead of hard-coding packet

--HG--
branch : trunk
This commit is contained in:
Neo2003
2008-10-05 11:38:24 -05:00
parent 9245de8138
commit 1fc73ff41b
8 changed files with 24 additions and 30 deletions

View File

@@ -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