fix(Script/Quest): Improve A Spirit Ally? (#16893)

* fix(db/Quest): Improve A Spirit Ally?

* Update spell_quest.cpp

* improvement in position
This commit is contained in:
Grimgravy
2023-11-12 13:52:49 -03:00
committed by GitHub
parent ae5bf57dba
commit 6486f72740
2 changed files with 48 additions and 0 deletions

View File

@@ -2472,6 +2472,29 @@ class spell_q10651_q10692_book_of_fel_names : public SpellScript
}
};
enum Feralfen
{
NPC_FERALFEN_TOTEM = 18186
};
class spell_q9847_a_spirit_ally : public SpellScript
{
PrepareSpellScript(spell_q9847_a_spirit_ally);
void HandleSendEvent(SpellEffIndex /*effIndex*/)
{
float dist = 5.0f;
float angle = GetCaster()->GetOrientation() - 1.25f;
Position pos = GetCaster()->GetNearPosition(dist, angle);
GetCaster()->SummonCreature(NPC_FERALFEN_TOTEM, pos, TEMPSUMMON_TIMED_DESPAWN, 1 * MINUTE * IN_MILLISECONDS);
}
void Register() override
{
OnEffectHit += SpellEffectFn(spell_q9847_a_spirit_ally::HandleSendEvent, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
}
};
void AddSC_quest_spell_scripts()
{
RegisterSpellAndAuraScriptPair(spell_q11065_wrangle_some_aether_rays, spell_q11065_wrangle_some_aether_rays_aura);
@@ -2544,4 +2567,5 @@ void AddSC_quest_spell_scripts()
RegisterSpellScript(spell_q5056_summon_shy_rotam);
RegisterSpellScript(spell_q4735_collect_rookery_egg);
RegisterSpellScript(spell_q10651_q10692_book_of_fel_names);
RegisterSpellScript(spell_q9847_a_spirit_ally);
}