aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/ScriptMgr.cpp5
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp16
3 files changed, 10 insertions, 17 deletions
diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp
index 4dff1b7c374..e382b62e2e3 100644
--- a/src/bindings/scripts/ScriptMgr.cpp
+++ b/src/bindings/scripts/ScriptMgr.cpp
@@ -1853,10 +1853,7 @@ void ProcessScriptText(uint32 id, WorldObject* pSource, Unit* target)
{
if(GetSoundEntriesStore()->LookupEntry((*i).second.SoundId))
{
- WorldPacket data(4);
- data.SetOpcode(SMSG_PLAY_SOUND);
- data << uint32((*i).second.SoundId);
- pSource->SendMessageToSet(&data,false);
+ pSource->SendPlaySound((*i).second.SoundId, false);
}
else
error_log("TSCR: ProcessScriptText id %u tried to process invalid soundid %u.",id,(*i).second.SoundId);
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 2663f4585b5..9910eafc5b2 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -5,7 +5,6 @@
#include "precompiled.h"
#include "Item.h"
#include "Spell.h"
-#include "WorldPacket.h"
// Spell summary for ScriptedAI::SelectSpell
struct TSpellSummary {
@@ -202,10 +201,7 @@ void ScriptedAI::DoPlaySoundToSet(Unit* unit, uint32 sound)
return;
}
- WorldPacket data(4);
- data.SetOpcode(SMSG_PLAY_SOUND);
- data << uint32(sound);
- unit->SendMessageToSet(&data,false);
+ unit->SendPlaySound(sound, false);
}
Creature* ScriptedAI::DoSpawnCreature(uint32 id, float x, float y, float z, float angle, uint32 type, uint32 despawntime)
diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
index 17d159451f4..805dc187bbb 100644
--- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
+++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
@@ -583,14 +583,14 @@ struct MANGOS_DLL_DECL cthunAI : public Scripted_NoMovementAI
//Play random sound to the zone
switch (rand()%8)
{
- case 0: (*i)->PlaySound(RND_WISPER_1, true); break;
- case 1: (*i)->PlaySound(RND_WISPER_2, true); break;
- case 2: (*i)->PlaySound(RND_WISPER_3, true); break;
- case 3: (*i)->PlaySound(RND_WISPER_4, true); break;
- case 4: (*i)->PlaySound(RND_WISPER_5, true); break;
- case 5: (*i)->PlaySound(RND_WISPER_6, true); break;
- case 6: (*i)->PlaySound(RND_WISPER_7, true); break;
- case 7: (*i)->PlaySound(RND_WISPER_8, true); break;
+ case 0: (*i)->SendPlaySound(RND_WISPER_1, true); break;
+ case 1: (*i)->SendPlaySound(RND_WISPER_2, true); break;
+ case 2: (*i)->SendPlaySound(RND_WISPER_3, true); break;
+ case 3: (*i)->SendPlaySound(RND_WISPER_4, true); break;
+ case 4: (*i)->SendPlaySound(RND_WISPER_5, true); break;
+ case 5: (*i)->SendPlaySound(RND_WISPER_6, true); break;
+ case 6: (*i)->SendPlaySound(RND_WISPER_7, true); break;
+ case 7: (*i)->SendPlaySound(RND_WISPER_8, true); break;
}
}