fix(DB/SAI): Outland Basilisks. (#15578)

* fix(DB/SAI): Outland Basilisks.

* update

* update

* sniff for 20283 (Marshrock Stomper)

Co-Authored-By: Gultask <100873791+Gultask@users.noreply.github.com>

---------

Co-authored-by: Gultask <100873791+Gultask@users.noreply.github.com>
This commit is contained in:
avarishd
2023-04-09 21:54:53 +03:00
committed by GitHub
parent 619c9384d4
commit 971e2f538e
2 changed files with 154 additions and 0 deletions

View File

@@ -4792,6 +4792,41 @@ class spell_freezing_circle : public SpellScript
}
};
enum Threshalisk
{
SPELL_THRESHALISK_CHARGE = 35385,
SPELL_RUSHING_CHARGE = 35382,
};
class spell_gen_threshalisk_charge : public SpellScript
{
PrepareSpellScript(spell_gen_threshalisk_charge);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_THRESHALISK_CHARGE });
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Creature* caster = GetCaster()->ToCreature())
{
if (Unit* victim = caster->GetVictim())
{
if (caster->GetReactState() != REACT_PASSIVE)
{
caster->CastSpell(victim, GetSpellInfo()->Effects[EFFECT_1].TriggerSpell, true);
}
}
}
}
void Register() override
{
OnEffectHit += SpellEffectFn(spell_gen_threshalisk_charge::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
void AddSC_generic_spell_scripts()
{
RegisterSpellScript(spell_silithyst);
@@ -4934,4 +4969,5 @@ void AddSC_generic_spell_scripts()
RegisterSpellScriptWithArgs(spell_gen_apply_aura_after_expiration, "spell_itch_aq40", SPELL_VEKNISS_CATALYST, EFFECT_0, SPELL_AURA_DUMMY);
RegisterSpellScript(spell_gen_basic_campfire);
RegisterSpellScript(spell_freezing_circle);
RegisterSpellScript(spell_gen_threshalisk_charge);
}