Core/PacketIO: Fixed SMSG_PLAY_SOUND structure
This commit is contained in:
1 parent
09190c7e23
commit
7d64b56db1
7 files changed
+10
-2
No files matched your search
@@ -357,6 +357,7 @@ void Battlefield::DoPlaySoundToAll(uint32 SoundID)
|
||||
WorldPacket data;
|
||||
data.Initialize(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(SoundID);
|
||||
data << uint64(0);
|
||||
|
||||
for (int team = 0; team < BG_TEAMS_COUNT; team++)
|
||||
for (GuidSet::const_iterator itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr)
|
||||
|
||||
@@ -659,6 +659,7 @@ void BattlegroundMgr::BuildPlaySoundPacket(WorldPacket* data, uint32 soundid)
|
||||
{
|
||||
data->Initialize(SMSG_PLAY_SOUND, 4);
|
||||
*data << uint32(soundid);
|
||||
*data << uint64(0);
|
||||
}
|
||||
|
||||
void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket(WorldPacket* data, uint64 guid)
|
||||
|
||||
@@ -2348,7 +2348,8 @@ bool WorldObject::CanDetectStealthOf(WorldObject const* obj) const
|
||||
void WorldObject::SendPlaySound(uint32 Sound, bool OnlySelf)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << Sound;
|
||||
data << uint32(Sound);
|
||||
data << uint64(GetGUID());
|
||||
if (OnlySelf && GetTypeId() == TYPEID_PLAYER)
|
||||
this->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
else
|
||||
@@ -3294,6 +3295,7 @@ void WorldObject::PlayDirectSound(uint32 sound_id, Player* target /*= NULL*/)
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(sound_id);
|
||||
data << uint64(GetGUID());
|
||||
if (target)
|
||||
target->SendDirectMessage(&data);
|
||||
else
|
||||
|
||||
@@ -5699,6 +5699,7 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
|
||||
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(soundId);
|
||||
data << uint64(m_caster->GetGUID());
|
||||
unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
|
||||
@@ -353,6 +353,7 @@ void CreatureTextMgr::SendSound(Creature* source, uint32 sound, ChatMsg msgType,
|
||||
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(sound);
|
||||
data << uint64(source->GetGUID());
|
||||
SendNonChatPacket(source, &data, msgType, whisperGuid, range, team, gmOnly);
|
||||
}
|
||||
|
||||
|
||||
@@ -242,6 +242,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(sound);
|
||||
data << uint64(unit->GetGUID());
|
||||
unit->SendMessageToSet(&data, false);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -222,7 +222,8 @@ public:
|
||||
i->getSource()->GetSession()->SendPacket(&packet);
|
||||
|
||||
WorldPacket data2(SMSG_PLAY_SOUND, 4);
|
||||
data2 << 10986;
|
||||
data2 << uint32(10986);
|
||||
data2 << uint64(unit->GetGUID());
|
||||
i->getSource()->GetSession()->SendPacket(&data2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user