diff options
-rw-r--r-- | sql/updates/world/master/2023_06_05_01_world.sql | 14 | ||||
-rw-r--r-- | src/server/scripts/Shadowlands/spell_covenant.cpp | 32 |
2 files changed, 46 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_06_05_01_world.sql b/sql/updates/world/master/2023_06_05_01_world.sql new file mode 100644 index 00000000000..4905ffe73b4 --- /dev/null +++ b/sql/updates/world/master/2023_06_05_01_world.sql @@ -0,0 +1,14 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (328725,329756,331011,331283,331622,331726,332201,332753); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(328725,0x00,107,0x00001000,0x00000040,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Mortal Dance +(329756,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Caustic Liquid +(331011,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Poxstorm +(331283,0x00,9,0x00000000,0x00000010,0x00000000,0x00000000,0x0,0x0,0x5,0x2,0x403,0x0,0x0,0,0,0,0), -- Peltsman's Grit +(331622,0x00,53,0x00000010,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Hit Scheme +(331726,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x2,0x0,0x3,0x0,0x0,0,0,0,0), -- Regenerating Materials +(332201,0x00,5,0x00000000,0x00000000,0x00008000,0x40000000,0x0,0x0,0x4,0x1,0x0,0x0,0x0,0,0,0,0), -- Smoking Shard of Teleportation +(332753,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x255510,0x0,0x4,0x4,0x5000,0x0,0x0,0,0,0,0); -- Superior Tactics + +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_soulbind_superior_tactics'); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(332753,'spell_soulbind_superior_tactics'); 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); } |