fix(Script/Spells): Validate Warlock spells (#9181)
This commit is contained in:
@@ -803,6 +803,11 @@ class spell_warl_demonic_circle_summon : public AuraScript
|
|||||||
{
|
{
|
||||||
PrepareAuraScript(spell_warl_demonic_circle_summon);
|
PrepareAuraScript(spell_warl_demonic_circle_summon);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ SPELL_WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST, SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT });
|
||||||
|
}
|
||||||
|
|
||||||
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes mode)
|
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes mode)
|
||||||
{
|
{
|
||||||
// If effect is removed by expire remove the summoned demonic circle too.
|
// If effect is removed by expire remove the summoned demonic circle too.
|
||||||
@@ -844,6 +849,11 @@ class spell_warl_demonic_circle_teleport : public AuraScript
|
|||||||
{
|
{
|
||||||
PrepareAuraScript(spell_warl_demonic_circle_teleport);
|
PrepareAuraScript(spell_warl_demonic_circle_teleport);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({ SPELL_WARLOCK_DEMONIC_CIRCLE_SUMMON });
|
||||||
|
}
|
||||||
|
|
||||||
void HandleTeleport(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
void HandleTeleport(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
{
|
{
|
||||||
if (Player* player = GetTarget()->ToPlayer())
|
if (Player* player = GetTarget()->ToPlayer())
|
||||||
@@ -1010,6 +1020,16 @@ class spell_warl_health_funnel : public AuraScript
|
|||||||
{
|
{
|
||||||
PrepareAuraScript(spell_warl_health_funnel);
|
PrepareAuraScript(spell_warl_health_funnel);
|
||||||
|
|
||||||
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return ValidateSpellInfo({
|
||||||
|
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R2,
|
||||||
|
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2,
|
||||||
|
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_R1,
|
||||||
|
SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R1
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
{
|
{
|
||||||
Unit* caster = GetCaster();
|
Unit* caster = GetCaster();
|
||||||
|
|||||||
Reference in New Issue
Block a user