aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-06-05 22:48:31 +0200
committerShauren <shauren.trinity@gmail.com>2023-06-05 22:48:31 +0200
commit43134cadf192a468508605a62b2b56242a8311c8 (patch)
tree286d7d69360804f13568911034e15dd6a7ba11a2 /src
parent4a508e1ff5461e9033018dda324fc3caa01c73b9 (diff)
Scripts/Spells: Added proc requirements to a few auras that have SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Shadowlands/spell_covenant.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/server/scripts/Shadowlands/spell_covenant.cpp b/src/server/scripts/Shadowlands/spell_covenant.cpp
index e0090db5903..b4fe51752b6 100644
--- a/src/server/scripts/Shadowlands/spell_covenant.cpp
+++ b/src/server/scripts/Shadowlands/spell_covenant.cpp
@@ -17,6 +17,7 @@
#include "ScriptMgr.h"
#include "SpellAuraEffects.h"
+#include "SpellMgr.h"
#include "SpellScript.h"
#include "Unit.h"
@@ -49,7 +50,38 @@ class spell_soulbind_sulfuric_emission : public AuraScript
}
};
+// 332753 - Superior Tactics
+class spell_soulbind_superior_tactics : public AuraScript
+{
+ PrepareAuraScript(spell_soulbind_superior_tactics);
+
+ static constexpr uint32 SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA = 332926;
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA });
+ }
+
+ bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& procInfo)
+ {
+ if (GetTarget()->HasAura(SPELL_SUPERIOR_TACTICS_COOLDOWN_AURA))
+ return false;
+
+ // only dispels from friendly targets count
+ if (procInfo.GetHitMask() & PROC_HIT_DISPEL && !(procInfo.GetTypeMask() & (PROC_FLAG_DEAL_HELPFUL_ABILITY | PROC_FLAG_DEAL_HELPFUL_SPELL | PROC_FLAG_DEAL_HELPFUL_PERIODIC)))
+ return false;
+
+ return true;
+ }
+
+ void Register() override
+ {
+ DoCheckEffectProc += AuraCheckEffectProcFn(spell_soulbind_superior_tactics::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
+ }
+};
+
void AddSC_covenant_spell_scripts()
{
RegisterSpellScript(spell_soulbind_sulfuric_emission);
+ RegisterSpellScript(spell_soulbind_superior_tactics);
}