fix(Scripts/Spells): Windfury Weapon should not consume Flurry stacks. (#7151)

* fix(Scripts/Spells): Windfury Weapon should not consume Flurry stacks.

Fixed #6234

* Update src/server/scripts/Spells/spell_shaman.cpp
This commit is contained in:
UltraNix
2021-08-07 00:28:07 +02:00
committed by GitHub
parent 8ca9da6421
commit 5831c336df
4 changed files with 61 additions and 3 deletions

View File

@@ -1354,6 +1354,42 @@ public:
}
};
// -16257 - SpellName
class spell_sha_flurry_proc : public SpellScriptLoader
{
public:
spell_sha_flurry_proc() : SpellScriptLoader("spell_sha_flurry_proc") {}
class spell_sha_flurry_proc_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_flurry_proc_AuraScript);
bool CheckProc(ProcEventInfo& eventInfo)
{
// Should not proc from Windfury Attack
if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
{
if (spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN && (spellInfo->SpellFamilyFlags[0] & 0x00800000) != 0)
{
return false;
}
}
return true;
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_sha_flurry_proc_AuraScript::CheckProc);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_flurry_proc_AuraScript();
}
};
void AddSC_shaman_spell_scripts()
{
// ours
@@ -1387,4 +1423,5 @@ void AddSC_shaman_spell_scripts()
new spell_sha_mana_tide_totem();
new spell_sha_sentry_totem();
new spell_sha_thunderstorm();
new spell_sha_flurry_proc();
}