mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/DB: Quest 'Distortions in time'
This commit is contained in:
@@ -564,6 +564,53 @@ class npc_hyldsmeet_protodrake : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
enum eCloseRift
|
||||
{
|
||||
SPELL_DESPAWN_RIFT = 61665
|
||||
};
|
||||
|
||||
class spell_close_rift : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_close_rift() : SpellScriptLoader("spell_close_rift") { }
|
||||
|
||||
class spell_close_rift_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_close_rift_AuraScript);
|
||||
|
||||
bool Load()
|
||||
{
|
||||
counter = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
return (bool) sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT);
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* /* aurEff */)
|
||||
{
|
||||
if (++counter == 5)
|
||||
GetTarget()->CastSpell((Unit*)NULL, SPELL_DESPAWN_RIFT, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_close_rift_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 counter;
|
||||
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
{
|
||||
return new spell_close_rift_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_storm_peaks()
|
||||
{
|
||||
new npc_agnetta_tyrsdottar();
|
||||
@@ -574,4 +621,5 @@ void AddSC_storm_peaks()
|
||||
new npc_freed_protodrake();
|
||||
new npc_icefang();
|
||||
new npc_hyldsmeet_protodrake();
|
||||
new spell_close_rift();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user