ignis scorch
This commit is contained in:
@@ -426,35 +426,29 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class spell_ignis_scorch : public SpellScriptLoader
|
||||
class spell_ignis_scorch_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_ignis_scorch() : SpellScriptLoader("spell_ignis_scorch") { }
|
||||
PrepareAuraScript(spell_ignis_scorch_aura);
|
||||
|
||||
class spell_ignis_scorch_AuraScript : public AuraScript
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
PrepareAuraScript(spell_ignis_scorch_AuraScript)
|
||||
return ValidateSpellInfo( { SPELL_SCORCHED_GROUND_10, SPELL_SCORCHED_GROUND_25 });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
if (aurEff->GetTotalTicks() >= 0 && aurEff->GetTickNumber() == uint32(aurEff->GetTotalTicks()))
|
||||
if (Unit* c = GetCaster())
|
||||
if (Creature* s = c->SummonCreature(NPC_SCORCHED_GROUND, c->GetPositionX() + 20.0f * cos(c->GetOrientation()), c->GetPositionY() + 20.0f * std::sin(c->GetOrientation()), 361.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000))
|
||||
{
|
||||
if (!s->FindNearestCreature(NPC_WATER_TRIGGER, 25.0f, true)) // must be away from the water
|
||||
s->CastSpell(s, (aurEff->GetId() == 62546 ? SPELL_SCORCHED_GROUND_10 : SPELL_SCORCHED_GROUND_25), true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ignis_scorch_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
return new spell_ignis_scorch_AuraScript();
|
||||
if (aurEff->GetTotalTicks() >= 0 && aurEff->GetTickNumber() == uint32(aurEff->GetTotalTicks()))
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* summon = caster->SummonCreature(NPC_SCORCHED_GROUND, caster->GetPositionX() + 20.0f * cos(caster->GetOrientation()), caster->GetPositionY() + 20.0f * std::sin(caster->GetOrientation()), 361.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 30000))
|
||||
{
|
||||
if (!summon->FindNearestCreature(NPC_WATER_TRIGGER, 25.0f, true)) // must be away from the water
|
||||
summon->CastSpell(summon, (aurEff->GetId() == SPELL_SCORCH_10 ? SPELL_SCORCHED_GROUND_10 : SPELL_SCORCHED_GROUND_25), true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_ignis_scorch_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -552,7 +546,7 @@ void AddSC_boss_ignis()
|
||||
{
|
||||
new boss_ignis();
|
||||
new npc_ulduar_iron_construct();
|
||||
new spell_ignis_scorch();
|
||||
RegisterSpellScript(spell_ignis_scorch_aura);
|
||||
new spell_ignis_grab_initial();
|
||||
new spell_ignis_slag_pot();
|
||||
new achievement_ignis_shattered();
|
||||
|
||||
Reference in New Issue
Block a user