- Timestamp:
- 11/19/08 13:22:59 (17 years ago)
- Location:
- trunk/src
- Files:
-
- 8 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/ScriptMgr.cpp
r6 r12 1854 1854 if(GetSoundEntriesStore()->LookupEntry((*i).second.SoundId)) 1855 1855 { 1856 WorldPacket data(4); 1857 data.SetOpcode(SMSG_PLAY_SOUND); 1858 data << uint32((*i).second.SoundId); 1859 pSource->SendMessageToSet(&data,false); 1856 pSource->SendPlaySound((*i).second.SoundId, false); 1860 1857 } 1861 1858 else -
trunk/src/bindings/scripts/include/sc_creature.cpp
r6 r12 6 6 #include "Item.h" 7 7 #include "Spell.h" 8 #include "WorldPacket.h"9 8 10 9 // Spell summary for ScriptedAI::SelectSpell … … 203 202 } 204 203 205 WorldPacket data(4); 206 data.SetOpcode(SMSG_PLAY_SOUND); 207 data << uint32(sound); 208 unit->SendMessageToSet(&data,false); 204 unit->SendPlaySound(sound, false); 209 205 } 210 206 -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
r6 r12 584 584 switch (rand()%8) 585 585 { 586 case 0: (*i)-> PlaySound(RND_WISPER_1, true); break;587 case 1: (*i)-> PlaySound(RND_WISPER_2, true); break;588 case 2: (*i)-> PlaySound(RND_WISPER_3, true); break;589 case 3: (*i)-> PlaySound(RND_WISPER_4, true); break;590 case 4: (*i)-> PlaySound(RND_WISPER_5, true); break;591 case 5: (*i)-> PlaySound(RND_WISPER_6, true); break;592 case 6: (*i)-> PlaySound(RND_WISPER_7, true); break;593 case 7: (*i)-> PlaySound(RND_WISPER_8, true); break;586 case 0: (*i)->SendPlaySound(RND_WISPER_1, true); break; 587 case 1: (*i)->SendPlaySound(RND_WISPER_2, true); break; 588 case 2: (*i)->SendPlaySound(RND_WISPER_3, true); break; 589 case 3: (*i)->SendPlaySound(RND_WISPER_4, true); break; 590 case 4: (*i)->SendPlaySound(RND_WISPER_5, true); break; 591 case 5: (*i)->SendPlaySound(RND_WISPER_6, true); break; 592 case 6: (*i)->SendPlaySound(RND_WISPER_7, true); break; 593 case 7: (*i)->SendPlaySound(RND_WISPER_8, true); break; 594 594 } 595 595 } -
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 }