aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts/include
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-09 23:17:24 +0200
committerQAston <none@none>2009-04-09 23:17:24 +0200
commitfc040ef111f9190f52c31137ce38cc13fff6484d (patch)
tree5293606e06ff8834f56ab82ff9d472759d8fdefc /src/bindings/scripts/include
parente0e39f26b4f2faa0a34b297ef4f6518749fd2a9f (diff)
parenta011612e3febf8057d8a174f31e0c94fe8bbd966 (diff)
*Merge
--HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts/include')
-rw-r--r--src/bindings/scripts/include/sc_creature.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp
index 2c0ab471bda..a31418419bb 100644
--- a/src/bindings/scripts/include/sc_creature.cpp
+++ b/src/bindings/scripts/include/sc_creature.cpp
@@ -233,21 +233,18 @@ void ScriptedAI::DoWhisper(const char* text, Unit* reciever, bool IsBossWhisper)
m_creature->MonsterWhisper(text, reciever->GetGUID(), IsBossWhisper);
}
-void ScriptedAI::DoPlaySoundToSet(Unit* unit, uint32 sound)
+void ScriptedAI::DoPlaySoundToSet(Unit* pSource, uint32 uiSoundId)
{
- if (!unit)
+ if (!pSource)
return;
- if (!GetSoundEntriesStore()->LookupEntry(sound))
+ if (!GetSoundEntriesStore()->LookupEntry(uiSoundId))
{
- error_log("SD2: Invalid soundId %u used in DoPlaySoundToSet (by unit TypeId %u, guid %u)", sound, unit->GetTypeId(), unit->GetGUID());
+ error_log("SD2: Invalid soundId %u used in DoPlaySoundToSet (by unit TypeId %u, guid %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUID());
return;
}
- WorldPacket data(4);
- data.SetOpcode(SMSG_PLAY_SOUND);
- data << uint32(sound);
- unit->SendMessageToSet(&data,false);
+ pSource->PlayDirectSound(uiSoundId);
}
Creature* ScriptedAI::DoSpawnCreature(uint32 id, float x, float y, float z, float angle, uint32 type, uint32 despawntime)