mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Packets: converted SMSG_PLAY_MUSIC to packet class and corrected packet structure
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "LootMgr.h"
|
||||
#include "MiscPackets.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ObjectMgr.h"
|
||||
@@ -5405,18 +5406,15 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex)
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
uint32 soundid = m_spellInfo->Effects[effIndex].MiscValue;
|
||||
uint32 soundId = m_spellInfo->Effects[effIndex].MiscValue;
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundid))
|
||||
if (!sSoundEntriesStore.LookupEntry(soundId))
|
||||
{
|
||||
TC_LOG_ERROR("spells", "EffectPlayMusic: Sound (Id: %u) does not exist in spell %u.", soundid, m_spellInfo->Id);
|
||||
TC_LOG_ERROR("spells", "EffectPlayMusic: Sound (Id: %u) does not exist in spell %u.", soundId, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << uint32(soundid);
|
||||
data << uint64(unitTarget->GetGUID());
|
||||
unitTarget->ToPlayer()->SendDirectMessage(&data);
|
||||
unitTarget->ToPlayer()->SendDirectMessage(WorldPackets::Misc::PlayMusic(soundId, unitTarget->GetGUID()).Write());
|
||||
}
|
||||
|
||||
void Spell::EffectSpecCount(SpellEffIndex /*effIndex*/)
|
||||
|
||||
Reference in New Issue
Block a user