Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "precompiled.h"
- enum
- {
- SPELL_SOULFLAY = 45442,
- SPELL_LEGION_LIGHTNING = 45664,
- SPELL_FIRE_BLOOM = 45641,
- SPELL_SINISTER_REFLECTION = 45892,
- SPELL_SHADOW_SPIKE = 46680,
- SPELL_FLAME_DART = 45737,
- SPELL_DARNKESS = 46605,
- SPELL_ARMAGEDDON = 45909,
- SAY_AGGRO = -1999950,
- SAY_SLAIN = -9233,
- SAY_REACTS_PHASE4 = -9240,
- SAY_FIRE_BLOOM = -1999951,
- SAY_LEGION = -1999953,
- SAY_KILJAEDEN_REACTS = -9243,
- SAY_KILJAEDEN_PHASE4 = -9242,
- SAY_KILJAEDEN_PHASE3 = -9241,
- SAY_SPELL_SHADOWSPIKE = -1999952,
- SAY_SPELL_DARKNESS1 = -9228,
- SAY_SPELL_DARNKESS2 = -9229,
- SAY_SPELL_DARNKESS3 = -9230,
- SAY_DEATH = -9245
- };
- struct MANGOS_DLL_DECL boss_kiljaedenAI : public ScriptedAI
- {
- boss_kiljaedenAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();}
- uint32 soulflay_timer;
- uint32 armageddon_timer;
- uint32 legionlightning_timer;
- uint32 firebloom_timer;
- uint32 sinisterreflection_timer;
- uint32 shadowspike_timer;
- uint32 flamedart_timer;
- uint32 darkness_timer;
- uint32 phase;
- void Reset ()
- {
- DespawnAll();
- armageddon_timer = 5000;
- soulflay_timer = 2000;
- legionlightning_timer = 10000;
- firebloom_timer = 43000;
- sinisterreflection_timer = 30000;
- shadowspike_timer = 30000;
- flamedart_timer = 8000;
- darkness_timer = 50000;
- phase = 1;
- }
- void DespawnAll()
- {
- std::list<Creature*> m_pCursed;
- GetCreatureListWithEntryInGrid(m_pCursed, m_creature, mob_shield_orb, DEFAULT_VISIBILITY_INSTANCE);
- if (!m_pCursed.empty())
- for(std::list<Creature*>::iterator itr = m_pCursed.begin(); itr != m_pCursed.end(); ++itr)
- {
- (*itr)->ForcedDespawn();
- }
- }
- void Aggro(Unit *Who)
- {
- m_creature->SetInCombatWithZone();
- DoScriptText(SAY_AGGRO, m_creature);
- SetCombatMovement(false);
- }
- void JustSummoned(Creature* pSummon)
- {
- pSummon->AI()->AttackStart(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)
- }
- void UpdateAI(const uint32 diff)
- {
- if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
- return;
- if (phase == 1)
- {
- if (soulflay_timer < diff)
- {
- DoCastSpellIfCan(m_creature->getVictim(),SPELL_SOULFLAY);
- soulflay_timer = 2000;
- } else soulflay_timer -=diff;
- if (legionlightning_timer < diff)
- {
- DoCastSpellIfCan(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0),SPELL_LEGION_LIGHTNING);
- legionlightning_timer = 10000;
- } else legionlightning_timer -=diff;
- if (firebloom_timer < diff)
- {
- DoScriptText(SAY_FIRE_BLOOM, m_creature);
- DoCast(m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0), SPELL_FIRE_BLOOM);
- firebloom_timer = 25000;
- } else firebloom_timer -=diff;
- }
- };
- CreatureAI* GetAI_boss_kiljaeden(Creature* pCreature)
- {
- return new boss_kiljaedenAI(pCreature);
- }
- void AddSC_boss_kiljaeden()
- {
- Script* NewScript;
- NewScript = new Script;
- NewScript->Name = "boss_kiljaeden";
- NewScript->GetAI = GetAI_boss_kiljaeden;
- NewScript->RegisterSelf();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement