Jump to content

play sound all command


Guest satex

Recommended Posts

In Level1.cpp:

Find (ctrl + F) WorldPacket data(SMSG_PLAY_OBJECT_SOUND,4+8); and replace that line with: WorldPacket data(SMSG_PLAY_SOUND, 4);

Two lines under that, replace: m_session->SendPacket(&data); with sWorld.SendGlobalMessage(&data);

This will change the .debug playsound command.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
Seems like it's moved to debugcmds.cpp and remade/cleaned up, i didn't know that. Code is different and more changes are needed, so here is a patch for new .sound command instead: link

This patch isn't working on rev 8057, can we get an update?

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I have no idea how to fix it now, but I have located it in the newer revisions of MaNGOS:

debugcmds.cpp

//Play sound
bool ChatHandler::HandleDebugPlaySoundCommand(const char* args)
{
   // USAGE: .debug playsound #soundid
   // #soundid - ID decimal number from SoundEntries.dbc (1st column)
   if( !*args )
   {
       SendSysMessage(LANG_BAD_VALUE);
       SetSentErrorMessage(true);
       return false;
   }

   uint32 dwSoundId = atoi((char*)args);

   if(!sSoundEntriesStore.LookupEntry(dwSoundId))
   {
       PSendSysMessage(LANG_SOUND_NOT_EXIST, dwSoundId);
       SetSentErrorMessage(true);
       return false;
   }

   Unit* unit = getSelectedUnit();
   if(!unit)
   {
       SendSysMessage(LANG_SELECT_CHAR_OR_CREATURE);
       SetSentErrorMessage(true);
       return false;
   }

   if(m_session->GetPlayer()->GetSelection())
       unit->PlayDistanceSound(dwSoundId,m_session->GetPlayer());
   else
       unit->PlayDirectSound(dwSoundId,m_session->GetPlayer());

   PSendSysMessage(LANG_YOU_HEAR_SOUND, dwSoundId);
   return true;
}

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use