More work on scripts.

This commit is contained in:
hondacrx
2023-10-13 20:25:10 -04:00
parent b2ac8035f2
commit 50cda96b45
16 changed files with 1073 additions and 732 deletions
+11 -11
View File
@@ -1,4 +1,4 @@
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
using Framework.Constants;
@@ -11,11 +11,11 @@ namespace Scripts.Shadowlands
[Script] // 323916 - Sulfuric Emission
class spell_soulbind_sulfuric_emission : AuraScript
{
static uint SPELL_SULFURIC_EMISSION_COOLDOWN_AURA = 347684;
uint SpellSulfuricEmissionCooldownAura = 347684;
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SPELL_SULFURIC_EMISSION_COOLDOWN_AURA);
return ValidateSpellInfo(SpellSulfuricEmissionCooldownAura);
}
bool CheckProc(AuraEffect aurEff, ProcEventInfo procInfo)
@@ -23,7 +23,7 @@ namespace Scripts.Shadowlands
if (!procInfo.GetProcTarget().HealthBelowPct(aurEff.GetAmount()))
return false;
if (procInfo.GetProcTarget().HasAura(SPELL_SULFURIC_EMISSION_COOLDOWN_AURA))
if (procInfo.GetProcTarget().HasAura(SpellSulfuricEmissionCooldownAura))
return false;
return true;
@@ -31,27 +31,27 @@ namespace Scripts.Shadowlands
public override void Register()
{
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckProc, 0, AuraType.ProcTriggerSpell));
DoCheckEffectProc.Add(new(CheckProc, 0, AuraType.ProcTriggerSpell));
}
}
[Script] // 332753 - Superior Tactics
class spell_soulbind_superior_tactics : AuraScript
{
static uint SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA = 332926;
uint SpellSuperiorTacticsCooldownAura = 332926;
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo(SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA);
return ValidateSpellInfo(SpellSuperiorTacticsCooldownAura);
}
bool CheckProc(AuraEffect aurEff, ProcEventInfo procInfo)
{
if (GetTarget().HasAura(SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA))
if (GetTarget().HasAura(SpellSuperiorTacticsCooldownAura))
return false;
// only dispels from friendly targets count
if (procInfo.GetHitMask().HasFlag(ProcFlagsHit.Dispel) && !procInfo.GetTypeMask().HasFlag(ProcFlags.DealHelpfulAbility | ProcFlags.DealHelpfulSpell | ProcFlags.DealHelpfulPeriodic))
if ((procInfo.GetHitMask() & ProcFlagsHit.Dispel) != 0 && !(procInfo.GetTypeMask() & new ProcFlagsInit(ProcFlags.DealHelpfulAbility | ProcFlags.DealHelpfulSpell | ProcFlags.DealHelpfulPeriodic)))
return false;
return true;
@@ -59,7 +59,7 @@ namespace Scripts.Shadowlands
public override void Register()
{
DoCheckEffectProc.Add(new CheckEffectProcHandler(CheckProc, 0, AuraType.ProcTriggerSpell));
DoCheckEffectProc.Add(new(CheckProc, 0, AuraType.ProcTriggerSpell));
}
}
}
}