mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Merge pull request #8088 from Gacko/q13038
Core/DB: Quest 'Distortions in time' Closes #3011
This commit is contained in:
@@ -564,6 +564,53 @@ class npc_hyldsmeet_protodrake : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
enum CloseRift
|
||||
{
|
||||
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 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