fix(Core/Spells): Implement SPELL_EFFECT_ACTIVATE_OBJECT (#11648)

Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
Nefertumm
2022-06-13 21:10:31 -03:00
committed by GitHub
parent 16d27f3449
commit 396fd35ed5
9 changed files with 182 additions and 39 deletions

View File

@@ -783,37 +783,9 @@ public:
}
};
class spell_banging_the_gong : public SpellScriptLoader
{
public:
spell_banging_the_gong() : SpellScriptLoader("spell_banging_the_gong") { }
class spell_banging_the_gong_SpellScript : public SpellScript
{
PrepareSpellScript(spell_banging_the_gong_SpellScript);
void Activate(SpellEffIndex index)
{
PreventHitDefaultEffect(index);
GetHitGObj()->SendCustomAnim(0);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_banging_the_gong_SpellScript::Activate, EFFECT_1, SPELL_EFFECT_ACTIVATE_OBJECT);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_banging_the_gong_SpellScript();
}
};
void AddSC_zulaman()
{
new npc_forest_frog();
new npc_zulaman_hostage();
new npc_harrison_jones();
new spell_banging_the_gong();
}