Scripts/Spells: Added proc requirements to a few auras that have SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute

This commit is contained in:
Shauren
2023-06-05 22:48:31 +02:00
parent 4a508e1ff5
commit 43134cadf1
2 changed files with 46 additions and 0 deletions
@@ -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');
@@ -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);
}