mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +01:00
Core/Spells: Proper implementation of SPELL_EFFECT_PLAYER_NOTIFICATION (131) - should send SMSG_PLAY_SOUND with EffectMiscValue as soundId.
Research by Kaelima
This commit is contained in:
@@ -195,7 +195,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
|
||||
&Spell::EffectApplyAreaAura, //128 SPELL_EFFECT_APPLY_AREA_AURA_FRIEND
|
||||
&Spell::EffectApplyAreaAura, //129 SPELL_EFFECT_APPLY_AREA_AURA_ENEMY
|
||||
&Spell::EffectRedirectThreat, //130 SPELL_EFFECT_REDIRECT_THREAT
|
||||
&Spell::EffectPlayerNotification, //131 SPELL_EFFECT_PLAYER_NOTIFICATION
|
||||
&Spell::EffectPlayerNotification, //131 SPELL_EFFECT_PLAYER_NOTIFICATION sound id in misc value (SoundEntries.dbc)
|
||||
&Spell::EffectPlayMusic, //132 SPELL_EFFECT_PLAY_MUSIC sound id in misc value (SoundEntries.dbc)
|
||||
&Spell::EffectUnlearnSpecialization, //133 SPELL_EFFECT_UNLEARN_SPECIALIZATION unlearn profession specialization
|
||||
&Spell::EffectKillCredit, //134 SPELL_EFFECT_KILL_CREDIT misc value is creature entry
|
||||
@@ -7037,7 +7037,7 @@ void Spell::EffectActivateSpec(SpellEffIndex /*effIndex*/)
|
||||
unitTarget->ToPlayer()->ActivateSpec(damage-1); // damage is 1 or 2, spec is 0 or 1
|
||||
}
|
||||
|
||||
void Spell::EffectPlayerNotification(SpellEffIndex /*effIndex*/)
|
||||
void Spell::EffectPlayerNotification(SpellEffIndex effIndex)
|
||||
{
|
||||
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
@@ -7049,6 +7049,18 @@ void Spell::EffectPlayerNotification(SpellEffIndex /*effIndex*/)
|
||||
unitTarget->ToPlayer()->GetSession()->SendNotification(LANG_ZONE_NOFLYZONE);
|
||||
break;
|
||||
}
|
||||
|
||||
uint32 soundid = m_spellInfo->EffectMiscValue[effIndex];
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundid))
|
||||
{
|
||||
sLog->outError("EffectPlayerNotification: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_PLAY_SOUND, 4);
|
||||
data << uint32(soundid);
|
||||
unitTarget->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Spell::EffectRemoveAura(SpellEffIndex effIndex)
|
||||
|
||||
Reference in New Issue
Block a user