Changeset 12 for trunk/src/game
- Timestamp:
- 11/19/08 13:22:59 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 5 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Object.cpp
r2 r12 1167 1167 } 1168 1168 1169 void 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 1169 1179 namespace MaNGOS 1170 1180 { -
trunk/src/game/Object.h
r2 r12 438 438 virtual bool isVisibleForInState(Player const* u, bool inVisibleList) const = 0; 439 439 440 // Low Level Packets 441 void SendPlaySound(uint32 Sound, bool OnlySelf); 442 440 443 Map * GetMap() const; 441 444 Map const* GetBaseMap() const; -
trunk/src/game/Player.cpp
r9 r12 15381 15381 } 15382 15382 15383 void Player::PlaySound(uint32 Sound, bool OnlySelf)15384 {15385 WorldPacket data(SMSG_PLAY_SOUND, 4);15386 data << Sound;15387 if (OnlySelf)15388 GetSession()->SendPacket( &data );15389 else15390 SendMessageToSet( &data, true );15391 }15392 15393 15383 void Player::SendExplorationExperience(uint32 Area, uint32 Experience) 15394 15384 { -
trunk/src/game/Player.h
r9 r12 1593 1593 void SendLogXPGain(uint32 GivenXP,Unit* victim,uint32 RestXP); 1594 1594 1595 //Low Level Packets1596 void PlaySound(uint32 Sound, bool OnlySelf);1597 1595 //notifiers 1598 1596 void SendAttackSwingCantAttack(); -
trunk/src/game/debugcmds.cpp
r9 r12 217 217 218 218 uint32 soundid = atoi(args); 219 m_session->GetPlayer()-> PlaySound(soundid, false);219 m_session->GetPlayer()->SendPlaySound(soundid, false); 220 220 return true; 221 221 }