*Note some script id are changed. DB change may be needed.
[7518] Implement new script command SCRIPT_COMMAND_PLAY_SOUND (look in World.h for args) Author: VladimirMangos
* Also rewrite use SMSG_PLAY_OBJECT_SOUND/SMSG_PLAY_SOUND
Now WorldObject have 2 function for sound level dependent from distance (PlayDistanceSound)
and for not depednet (PlayDirectSound)
* Old Player::PlaySound function removed and uses need to be updated to WorldObject functions
Note: function called for _source_ of sound in different from old function.
* chat command .debug ps removed and .debug playsound can used for bother packects test:
if no selection used SMSG_PLAY_SOUND, if selection exist including self then SMSG_PLAY_OBJECT_SOUND.
--HG--
branch : trunk
This commit is contained in:
1 parent
ce71c0e798
commit
a47d2e1c22
11 files changed
+102
-62
No files matched your search
@@ -2383,35 +2383,6 @@ bool ChatHandler::HandleWhispersCommand(const char* args)
|
||||
return false;
|
||||
}
|
||||
|
||||
//Play sound
|
||||
bool ChatHandler::HandleDebugPlaySoundCommand(const char* args)
|
||||
{
|
||||
// USAGE: .debug playsound #soundid
|
||||
// #soundid - ID decimal number from SoundEntries.dbc (1st column)
|
||||
// this file have about 5000 sounds.
|
||||
// In this realization only caller can hear this sound.
|
||||
if( *args )
|
||||
{
|
||||
uint32 dwSoundId = atoi((char*)args);
|
||||
|
||||
if( !sSoundEntriesStore.LookupEntry(dwSoundId) )
|
||||
{
|
||||
PSendSysMessage(LANG_SOUND_NOT_EXIST, dwSoundId);
|
||||
SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_PLAY_OBJECT_SOUND,4+8);
|
||||
data << uint32(dwSoundId) << m_session->GetPlayer()->GetGUID();
|
||||
m_session->SendPacket(&data);
|
||||
|
||||
PSendSysMessage(LANG_YOU_HEAR_SOUND, dwSoundId);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//Save all players in the world
|
||||
bool ChatHandler::HandleSaveAllCommand(const char* /*args*/)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user