Show
Ignore:
Timestamp:
11/19/08 13:22:59 (17 years ago)
Author:
yumileroy
Message:

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

Original author: Neo2003
Date: 2008-10-05 11:38:24-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Object.cpp

    r2 r12  
    11671167} 
    11681168 
     1169void WorldObject::SendPlaySound(uint32 Sound, bool OnlySelf) 
     1170{ 
     1171    WorldPacket data(SMSG_PLAY_SOUND, 4); 
     1172    data << Sound; 
     1173    if (OnlySelf && GetTypeId() == TYPEID_PLAYER ) 
     1174        ((Player*)this)->GetSession()->SendPacket( &data ); 
     1175    else 
     1176        SendMessageToSet( &data, true ); // ToSelf ignored in this case 
     1177} 
     1178 
    11691179namespace MaNGOS 
    11701180{