diff --git a/sql/updates/world/4.3.4/2022_11_26_00_world.sql b/sql/updates/world/4.3.4/2022_11_26_00_world.sql new file mode 100644 index 0000000000..aba1decc1e --- /dev/null +++ b/sql/updates/world/4.3.4/2022_11_26_00_world.sql @@ -0,0 +1,9 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN +('spell_warl_fear', +'spell_warl_glyph_of_fear', +'spell_pri_psychic_scream'); + +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(5782, 'spell_warl_fear'), +(56244, 'spell_warl_glyph_of_fear'), +(8122, 'spell_pri_psychic_scream'); diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 2d3533b140..b1b13d830d 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1532,27 +1532,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b break; } break; - case SPELLFAMILY_WARLOCK: - if (!caster) - break; - // Improved Fear - if (GetSpellInfo()->SpellFamilyFlags[1] & 0x00000400) - { - if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_WARLOCK, 98, 0)) - { - uint32 spellId = 0; - switch (aurEff->GetId()) - { - case 53759: spellId = 60947; break; - case 53754: spellId = 60946; break; - default: - TC_LOG_ERROR("spells", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId()); - } - if (spellId) - caster->CastSpell(target, spellId, true); - } - } - break; case SPELLFAMILY_PRIEST: if (!caster) break; diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 411a60efc5..0fab88b9c0 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -116,6 +116,7 @@ enum PriestSpellIcons PRIEST_ICON_ID_IMPROVED_MIND_BLAST = 95, PRIEST_ICON_ID_MIND_MELT = 3139, PRIEST_ICON_ID_SHADOW_ORB = 4941, + PRIEST_ICON_ID_GLYPH_OF_PSYCHIC_SCREAM = 1488, PRIEST_ICON_ID_GLYPH_OF_SHADOW_WORD_DEATH = 1980, PRIEST_ICON_ID_IMPROVED_DEVOURING_PLAGUE = 3790 }; @@ -1804,6 +1805,21 @@ class spell_pri_devouring_plague : public AuraScript } }; +// 8122 - Psychic Scream +class spell_pri_psychic_scream : public SpellScript +{ + void FilterGlyphTargets(std::list& targets) + { + if (!GetCaster()->GetDummyAuraEffect(SPELLFAMILY_PRIEST, PRIEST_ICON_ID_GLYPH_OF_PSYCHIC_SCREAM, EFFECT_0)) + targets.clear(); + } + + void Register() override + { + OnObjectAreaTargetSelect.Register(&spell_pri_psychic_scream::FilterGlyphTargets, EFFECT_2, TARGET_UNIT_SRC_AREA_ENEMY); + } +}; + void AddSC_priest_spell_scripts() { RegisterSpellScript(spell_pri_archangel); @@ -1840,6 +1856,7 @@ void AddSC_priest_spell_scripts() RegisterSpellScript(spell_pri_pain_and_suffering_proc); RegisterSpellScript(spell_pri_penance); RegisterSpellScript(spell_pri_phantasm); + RegisterSpellScript(spell_pri_psychic_scream); RegisterSpellScript(spell_power_word_barrier); RegisterSpellAndAuraScriptPair(spell_pri_power_word_shield, spell_pri_power_word_shield_AuraScript); RegisterSpellScript(spell_pri_prayer_of_mending_heal); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 9fa206cc85..575ac00bec 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -113,11 +113,12 @@ enum WarlockSpellIcons { WARLOCK_ICON_ID_IMPROVED_LIFE_TAP = 208, WARLOCK_ICON_ID_MANA_FEED = 1982, - WARLOCK_ICON_ID_DEATHS_EMBRACE = 3223, - WARLOCK_ICON_ID_SOUL_SIPHON = 5001, + WARLOCK_ICON_ID_DEATHS_EMBRACE = 3223, + WARLOCK_ICON_ID_SOUL_SIPHON = 5001, WARLOCK_ICON_ID_SOULBURN_SEED_OF_CORRUPTION = 1932, WARLOCK_ICON_ID_FIRE_AND_BRIMSTONE = 3173, - WARLOCK_ICON_ID_JINX = 5002 + WARLOCK_ICON_ID_JINX = 5002, + WARLOCK_ICON_ID_GLYPH_OF_FEAR = 98 }; enum MiscSpells @@ -1658,6 +1659,43 @@ class spell_warl_decimation : public AuraScript } }; +// 5782 - Fear +class spell_warl_fear : public SpellScript +{ + void HandleGlyphEffect(WorldObject*& target) + { + if (!GetCaster()->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, WARLOCK_ICON_ID_GLYPH_OF_FEAR, EFFECT_0)) + target = nullptr; + } + + void Register() override + { + OnObjectTargetSelect.Register(&spell_warl_fear::HandleGlyphEffect, EFFECT_2, TARGET_UNIT_TARGET_ENEMY); + } +}; + +// 56244 - Glyph of Fear +class spell_warl_glyph_of_fear : public AuraScript +{ + void HandleCooldownMod(AuraEffect const* aurEff, SpellModifier*& spellMod) + { + if (!spellMod) + { + spellMod = new SpellModifier(GetAura()); + spellMod->op = SpellModOp::Cooldown; + spellMod->type = SPELLMOD_FLAT; + spellMod->spellId = GetId(); + spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask; + } + spellMod->value = aurEff->GetAmount() * IN_MILLISECONDS; + } + + void Register() override + { + DoEffectCalcSpellMod.Register(&spell_warl_glyph_of_fear::HandleCooldownMod, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + void AddSC_warlock_spell_scripts() { RegisterSpellScript(spell_warl_aftermath); @@ -1676,9 +1714,11 @@ void AddSC_warlock_spell_scripts() RegisterSpellScript(spell_warl_drain_life); RegisterSpellScript(spell_warl_drain_soul); RegisterSpellScript(spell_warl_everlasting_affliction); + RegisterSpellScript(spell_warl_fear); RegisterSpellScript(spell_warl_fel_flame); RegisterSpellScript(spell_warl_fel_synergy); RegisterSpellScript(spell_warl_fel_armor); + RegisterSpellScript(spell_warl_glyph_of_fear); RegisterSpellScript(spell_warl_glyph_of_shadowflame); RegisterSpellAndAuraScriptPair(spell_warl_haunt, spell_warl_haunt_AuraScript); RegisterSpellScript(spell_warl_health_funnel);