Core/Spells: fixed Glyph of Fear and Glyph of Psychic Scream

closes #385
closes #217
This commit is contained in:
Ovahlord committed 2022-11-26 14:04:55 +01:00
1 parent dd43ca3e6a
commit 3a451a3519
4 files changed
+69 -24

No files matched your search

@@ -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<WorldObject*>& 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);
+43 -3
View File
@@ -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);