void UpdateAI(const uint32 uiDiff) { if (!instance) return; // we're still doing awaken animation if (bWakingUp && iAwakenTimer >= 0) { iAwakenTimer -= uiDiff; return; // dont do anything until we are done } else if (bWakingUp && iAwakenTimer <= 0) { bWakingUp = false; AttackStart(Unit::GetUnit(*me, instance->GetData64(0))); return; // dont want to continue until we finish the AttackStart method } //Return since we have no target if (!UpdateVictim()) return; // wake a wall minion if (uiWallMinionTimer <= uiDiff) { instance->SetData(DATA_MINIONS, IN_PROGRESS); uiWallMinionTimer = 10000; } else uiWallMinionTimer -= uiDiff; //If we are <66 summon the guardians if (!bGuardiansAwake && !HealthAbovePct(66)) { ActivateMinion(instance->GetData64(5), true); // EarthenGuardian1 ActivateMinion(instance->GetData64(6), true); // EarthenGuardian2 ActivateMinion(instance->GetData64(7), true); // EarthenGuardian3 ActivateMinion(instance->GetData64(8), true); // EarthenGuardian4 ActivateMinion(instance->GetData64(9), true); // EarthenGuardian5 ActivateMinion(instance->GetData64(10), false); // EarthenGuardian6 me->MonsterYell(SAY_SUMMON, LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, SOUND_SUMMON); bGuardiansAwake = true; } //If we are <33 summon the vault walkers if (!bVaultWalkersAwake && !HealthAbovePct(33)) { ActivateMinion(instance->GetData64(1), true); // VaultWalker1 ActivateMinion(instance->GetData64(2), true); // VaultWalker2 ActivateMinion(instance->GetData64(3), true); // VaultWalker3 ActivateMinion(instance->GetData64(4), false); // VaultWalker4 me->MonsterYell(SAY_SUMMON2, LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, SOUND_SUMMON2); bVaultWalkersAwake = true; } if (uiTremorTimer <= uiDiff) { //Cast DoCast(me->getVictim(), SPELL_GROUND_TREMOR); //45 seconds until we should cast this agian uiTremorTimer = 45000; } else uiTremorTimer -= uiDiff; DoMeleeAttackIfReady(); }
void EnterCombat(Unit* /*who*/) { DoScriptText(SAY_AGGRO, me); if (instance) instance->SetData(TYPE_KELRIS, IN_PROGRESS); }
void SummonedCreatureDies(Creature* cr, Unit*) { if (pInstance) pInstance->SetData(DATA_SPORE_KILLED, 0); }
void EnterCombat(Unit* /*who*/) { me->SetInCombatWithZone(); m_instance->SetData(TYPE_NORTHREND_BEASTS, GORMOK_IN_PROGRESS); }
void EnterCombat(Unit* /*who*/) { if (m_instance) m_instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_IN_PROGRESS); me->SetInCombatWithZone(); }
void EnterCombat(Unit* /*who*/) { if (pInstance) pInstance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, IN_PROGRESS); }
void JustDied(Unit* /*killer*/) override { instance->SetData(DATA_HALAZZIEVENT, DONE); Talk(SAY_DEATH); }
void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(DATA_GHOSTKILL, 1); }
void JustDied(Unit* /*pKiller*/) { Summons.DespawnAll(); DoScriptText(SAY_DEATH, me); if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, DONE); }
void UpdateAI(const uint32 diff) { if (!Init) { if (EventProgress_Timer <= diff) { if (Phase < 8) { switch(Phase) { case 1: DoScriptText(SAY_INTRO_1, me); EventProgress_Timer = 18000; break; case 2: DoScriptText(SAY_INTRO_2, me); EventProgress_Timer = 18000; break; case 3: DoScriptText(SAY_WATER, me); DoCast(me, SPELL_CONJURE_WATER); EventProgress_Timer = 7000; break; case 4: DoScriptText(SAY_BUFFS, me); DoCast(me, SPELL_ICE_ARMOR); EventProgress_Timer = 7000; break; case 5: DoScriptText(SAY_DRINK, me); DoCast(me, SPELL_ARCANE_INTELLECT); EventProgress_Timer = 7000; break; case 6: DoScriptText(SAY_READY, me); EventProgress_Timer = 6000; break; case 7: if (pInstance) pInstance->SetData(TYPE_WARDEN_2, DONE); Init = true; break; } ++Phase; } } else EventProgress_Timer -= diff; } if (!UpdateVictim()) return; if (!LowHp && HealthBelowPct(20)) { DoScriptText(SAY_LOWHP, me); LowHp = true; } if (Pyroblast_Timer <= diff) { if (me->IsNonMeleeSpellCasted(false)) return; DoScriptText(SAY_PYRO, me); DoCast(me->getVictim(), SPELL_PYROBLAST); Pyroblast_Timer = 40000; } else Pyroblast_Timer -=diff; if (Fireball_Timer <= diff) { DoCast(me->getVictim(), SPELL_FIREBALL); Fireball_Timer = 4000; } else Fireball_Timer -=diff; DoMeleeAttackIfReady(); }
void JustReachedHome() { if (m_pInstance) m_pInstance->SetData(TYPE_NORTHREND_BEASTS, FAIL); me->ForcedDespawn(); }
void UpdateAI(const uint32 uiDiff) { if(!m_pInstance) return; if (m_pInstance->GetData(TYPE_FALRIC) == SPECIAL) { if(!m_bIsCall) { m_bIsCall = true; Summon(); } } if(m_pInstance->GetData(TYPE_MARWYN) == SPECIAL) { if(m_uiSummonTimer < uiDiff) { ++SummonCount; if(SummonCount == 1) DoScriptText(SAY_MARWYN_INTRO, me); if(SummonCount > 4) { m_pInstance->SetData(TYPE_MARWYN, IN_PROGRESS); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetInCombatWithZone(); } else CallFallSoldier(); m_uiSummonTimer = 60000; } else m_uiSummonTimer -= uiDiff; } if(!UpdateVictim()) return; if(m_uiObliterateTimer < uiDiff) { DoCast(me->getVictim(), Regular ? SPELL_OBLITERATE_N : SPELL_OBLITERATE_H); m_uiObliterateTimer = urand(8000, 12000); } else m_uiObliterateTimer -= uiDiff; if (m_uiWellTimer < uiDiff) { DoScriptText(SAY_MARWYN_SP02, me); if(Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM)) DoCast(pTarget, SPELL_WELL_OF_CORRUPTION); m_uiWellTimer= urand(25000, 30000); } else m_uiWellTimer -= uiDiff; if (m_uiSharedSufferingTimer < uiDiff) { if(Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM)) DoCast(pTarget, Regular ? SPELL_SHARED_SUFFERING_N : SPELL_SHARED_SUFFERING_H); m_uiSharedSufferingTimer = urand(15000, 20000); } else m_uiSharedSufferingTimer -= uiDiff; if (m_uiFleshTimer < uiDiff) { DoScriptText(SAY_MARWYN_SP01, me); if(Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM)) DoCast(pTarget, Regular ? SPELL_CORRUPTED_FLESH_N : SPELL_CORRUPTED_FLESH_H); m_uiFleshTimer = urand(10000, 16000); } else m_uiFleshTimer -= uiDiff; if(m_uiBerserkTimer < uiDiff) { DoCast(me, SPELL_BERSERK); m_uiBerserkTimer = 180000; } else m_uiBerserkTimer -= uiDiff; DoMeleeAttackIfReady(); return; }
void JustDied(Unit* /*Killer*/) { if (pInstance) pInstance->SetData(TYPE_PALLID, IN_PROGRESS); }
void JustDied(Unit* /*attacker*/) { DoCast (me, SPELL_SELF_DESTRUCT, true); if (instance) instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper }
void JustDied(Unit* /*who*/) { if (pInstance) pInstance->SetData(DATA_CHANNELER_EVENT, DONE); }
void EnterCombat(Unit* /*pWho*/) { me->SetInCombatWithZone(); if (m_pInstance) m_pInstance->SetData(TYPE_JARAXXUS, IN_PROGRESS); DoScriptText(SAY_AGGRO, me); }
void JustDied(Unit* /*killer*/) { if (pInstance) pInstance->SetData(DATA_ECK_THE_FEROCIOUS_EVENT, DONE); }
void JustDied(Unit* /*pKiller*/) { if (m_pInstance) m_pInstance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE); }
void EnterCombat(Unit* /*who*/) override { instance->SetData(DATA_HALAZZIEVENT, IN_PROGRESS); Talk(SAY_AGGRO); EnterPhase(PHASE_LYNX); }
void JustDied(Unit* /*Kill*/) { Summons.DespawnAll(); if (instance) instance->SetData(DATA_LOCKMAW_EVENT, DONE); }
void EnterCombat(Unit* /*who*/) { if (instance) instance->SetData(DATA_THELURKERBELOWEVENT, IN_PROGRESS); }
void UpdateEscortAI(const uint32 uiDiff) { if (uiPhaseTimer <= uiDiff) { switch (uiStep) { case 1: if (instance) { if (instance->GetData(DATA_BRANN_EVENT) != NOT_STARTED) return; instance->SetData(DATA_BRANN_EVENT, IN_PROGRESS); } bIsBattle = false; DoScriptText(SAY_ESCORT_START, me); SetRun(true); JumpToNextStep(0); break; case 3: SetEscortPaused(false); JumpToNextStep(0); break; case 5: if (instance) if (Creature* temp = (Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM)))) DoScriptText(SAY_EVENT_INTRO_3_ABED, temp); JumpToNextStep(8500); break; case 6: DoScriptText(SAY_EVENT_A_1, me); JumpToNextStep(6500); break; case 7: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_A_2_KADD, temp); JumpToNextStep(12500); break; case 8: DoScriptText(SAY_EVENT_A_3, me); if (instance) if (GameObject* goKaddrak = instance->instance->GetGameObject(instance->GetData64(DATA_GO_KADDRAK))) { goKaddrak->SetGoAnimProgress(0); goKaddrak->SendCustomAnim(goKaddrak->GetGoAnimProgress()); } if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->bKaddrakActivated = true; JumpToNextStep(5000); break; case 9: me->SetReactState(REACT_PASSIVE); SpawnDwarf(1); JumpToNextStep(20000); break; case 10: DoScriptText(SAY_EVENT_B_1, me); JumpToNextStep(6000); break; case 11: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_B_2_MARN, temp); SpawnDwarf(1); JumpToNextStep(20000); break; case 12: DoScriptText(SAY_EVENT_B_3, me); if (instance) if (GameObject* goMarnak = instance->instance->GetGameObject(instance->GetData64(DATA_GO_MARNAK))) { goMarnak->SetGoAnimProgress(0); goMarnak->SendCustomAnim(goMarnak->GetGoAnimProgress()); } if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->bMarnakActivated = true; JumpToNextStep(10000); break; case 13: SpawnDwarf(1); JumpToNextStep(10000); break; case 14: SpawnDwarf(2); JumpToNextStep(20000); break; case 15: DoScriptText(SAY_EVENT_C_1, me); SpawnDwarf(1); JumpToNextStep(10000); break; case 16: SpawnDwarf(2); JumpToNextStep(20000); break; case 17: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_C_2_ABED, temp); SpawnDwarf(1); JumpToNextStep(20000); break; case 18: DoScriptText(SAY_EVENT_C_3, me); if (instance) if (GameObject* goAbedneum = instance->instance->GetGameObject(instance->GetData64(DATA_GO_ABEDNEUM))) { goAbedneum->SetGoAnimProgress(0); goAbedneum->SendCustomAnim(goAbedneum->GetGoAnimProgress()); } if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->bAbedneumActivated = true; JumpToNextStep(5000); break; case 19: SpawnDwarf(2); JumpToNextStep(10000); break; case 20: SpawnDwarf(1); JumpToNextStep(15000); break; case 21: DoScriptText(SAY_EVENT_D_1, me); SpawnDwarf(3); JumpToNextStep(20000); break; case 22: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_D_2_ABED, temp); SpawnDwarf(1); JumpToNextStep(5000); break; case 23: SpawnDwarf(2); JumpToNextStep(15000); break; case 24: DoScriptText(SAY_EVENT_D_3, me); SpawnDwarf(3); JumpToNextStep(5000); break; case 25: SpawnDwarf(1); JumpToNextStep(5000); break; case 26: SpawnDwarf(2); JumpToNextStep(10000); break; case 27: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_D_4_ABED, temp); SpawnDwarf(1); JumpToNextStep(10000); break; case 28: me->SetReactState(REACT_DEFENSIVE); DoScriptText(SAY_EVENT_END_01, me); me->SetStandState(UNIT_STAND_STATE_STAND); DespawnDwarf(); if (instance) { instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), true); instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), true); instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), true); instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), true); } if (Creature* temp = Unit::GetCreature(*me, uiControllerGUID)) { CAST_AI(mob_tribuna_controller::mob_tribuna_controllerAI, temp->AI())->activatedByBrann = false; temp->DealDamage(temp, temp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } bIsBattle = true; SetEscortPaused(false); JumpToNextStep(6500); break; case 29: { DoScriptText(SAY_EVENT_END_02, me); if (instance) { instance->SetData(DATA_BRANN_EVENT, DONE); // Achievement criteria is with spell 59046 which does not exist. // There is thus no way it can be given by casting the spell on the players. instance->UpdateEncounterState(ENCOUNTER_CREDIT_CAST_SPELL, 59046, me); } me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); Player* player = GetPlayerForEscort(); if (player) player->GroupEventHappens(QUEST_HALLS_OF_STONE, me); JumpToNextStep(5500); break; } case 30: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_03_ABED, temp); JumpToNextStep(8500); break; case 31: DoScriptText(SAY_EVENT_END_04, me); JumpToNextStep(11500); break; case 32: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_05_ABED, temp); JumpToNextStep(11500); break; case 33: DoScriptText(SAY_EVENT_END_06, me); JumpToNextStep(4500); break; case 34: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_07_ABED, temp); JumpToNextStep(22500); break; case 35: DoScriptText(SAY_EVENT_END_08, me); JumpToNextStep(7500); break; case 36: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_END_09_KADD, temp); JumpToNextStep(18500); break; case 37: DoScriptText(SAY_EVENT_END_10, me); JumpToNextStep(5500); break; case 38: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_END_11_KADD, temp); JumpToNextStep(20500); break; case 39: DoScriptText(SAY_EVENT_END_12, me); JumpToNextStep(2500); break; case 40: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_END_13_KADD, temp); JumpToNextStep(19500); break; case 41: DoScriptText(SAY_EVENT_END_14, me); JumpToNextStep(10500); break; case 42: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_END_15_MARN, temp); JumpToNextStep(6500); break; case 43: DoScriptText(SAY_EVENT_END_16, me); JumpToNextStep(6500); break; case 44: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_END_17_MARN, temp); JumpToNextStep(25500); break; case 45: DoScriptText(SAY_EVENT_END_18, me); JumpToNextStep(23500); break; case 46: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_END_19_MARN, temp); JumpToNextStep(3500); break; case 47: DoScriptText(SAY_EVENT_END_20, me); JumpToNextStep(8500); break; case 48: if (instance) if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_21_ABED, temp); JumpToNextStep(5500); break; case 49: { if (instance) { instance->HandleGameObject(instance->GetData64(DATA_GO_TRIBUNAL_CONSOLE), false); instance->HandleGameObject(instance->GetData64(DATA_GO_KADDRAK), false); instance->HandleGameObject(instance->GetData64(DATA_GO_MARNAK), false); instance->HandleGameObject(instance->GetData64(DATA_GO_ABEDNEUM), false); instance->HandleGameObject(instance->GetData64(DATA_GO_SKY_FLOOR), false); } JumpToNextStep(180000); break; } case 50: SetEscortPaused(false); break; } } else uiPhaseTimer -= uiDiff; if (!bIsLowHP && HealthBelowPct(30)) { DoScriptText(SAY_LOW_HEALTH, me); bIsLowHP = true; } else if (bIsLowHP && !HealthBelowPct(30)) bIsLowHP = false; if (!UpdateVictim()) return; DoMeleeAttackIfReady(); }
void JustDied(Unit* /*killer*/) { if (m_instance) m_instance->SetData(TYPE_NORTHREND_BEASTS, ICEHOWL_DONE); }
void KilledUnit(Unit* victim) { DoScriptText(urand(0, 1) ? SAY_KILL1_P : SAY_KILL2_P, me); if (pInstance) pInstance->SetData(BOSS_ARGENT_CHALLENGE_P,IN_PROGRESS); }
void UpdateAI(const uint32 diff) { if (!instance) return; if (SpellCorrupt_Timer) { if (SpellCorrupt_Timer <= diff) { instance->SetData(TYPE_MEDIVH, SPECIAL); if (me->HasAura(SPELL_CORRUPT_AEONUS)) SpellCorrupt_Timer = 1000; else if (me->HasAura(SPELL_CORRUPT)) SpellCorrupt_Timer = 3000; else SpellCorrupt_Timer = 0; } else SpellCorrupt_Timer -= diff; } if (Check_Timer) { if (Check_Timer <= diff) { uint32 pct = instance->GetData(DATA_SHIELD); Check_Timer = 5000; if (Life25 && pct <= 25) { DoScriptText(SAY_WEAK25, me); Life25 = false; } else if (Life50 && pct <= 50) { DoScriptText(SAY_WEAK50, me); Life50 = false; } else if (Life75 && pct <= 75) { DoScriptText(SAY_WEAK75, me); Life75 = false; } //if we reach this it means event was running but at some point reset. if (instance->GetData(TYPE_MEDIVH) == NOT_STARTED) { me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); me->RemoveCorpse(); me->Respawn(); return; } if (instance->GetData(TYPE_RIFT) == DONE) { DoScriptText(SAY_WIN, me); Check_Timer = 0; if (me->HasAura(SPELL_CHANNEL)) me->RemoveAura(SPELL_CHANNEL); //TODO: start the post-event here instance->SetData(TYPE_MEDIVH, DONE); } } else Check_Timer -= diff; } //if (!UpdateVictim()) //return; //DoMeleeAttackIfReady(); }
void JustDied(Unit* /*killer*/) { if (pInstance) pInstance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, pInstance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1); }
void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (instance) instance->SetData(TYPE_KELRIS, DONE); }
void UpdateAI(const uint32 diff) { if (!me->isInCombat()) { if (RandChat_Timer <= diff) { DoScriptText(RandomTaunt[rand()%6].id, me); RandChat_Timer = 90000; } else RandChat_Timer -= diff; } if (!UpdateVictim()) return; if (NeedCheckCube) NeedCheckCubeStatus(); if (Berserk_Timer <= diff) { DoCast(me, SPELL_BERSERK, true); DoScriptText(EMOTE_BERSERK, me); Berserk_Timer = 60000; } else Berserk_Timer -= diff; if (Cleave_Timer <= diff) { DoCast(me->getVictim(), SPELL_CLEAVE); Cleave_Timer = 10000; } else Cleave_Timer -= diff; if (BlastNova_Timer <= diff) { // to avoid earthquake interruption if (!me->HasUnitState(UNIT_STAT_STUNNED)) { DoScriptText(EMOTE_BLASTNOVA, me); DoCast(me, SPELL_BLASTNOVA); BlastNova_Timer = 60000; } } else BlastNova_Timer -= diff; if (Quake_Timer <= diff) { // to avoid blastnova interruption if (!me->IsNonMeleeSpellCasted(false)) { DoCast(me, SPELL_QUAKE_TRIGGER, true); Quake_Timer = 50000; } } else Quake_Timer -= diff; if (Blaze_Timer <= diff) { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { float x, y, z; pTarget->GetPosition(x, y, z); Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); if (summon) { CAST_AI(mob_abyssal::mob_abyssalAI, summon->AI())->SetTrigger(2); DoCast(summon, SPELL_BLAZE_TARGET, true); summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } } Blaze_Timer = 20000 + rand()%20000; } else Blaze_Timer -= diff; if (!Phase3 && HealthBelowPct(30) && !me->IsNonMeleeSpellCasted(false) // blast nova && !me->HasUnitState(UNIT_STAT_STUNNED)) // shadow cage and earthquake { Phase3 = true; DoScriptText(SAY_CHAMBER_DESTROY, me); DoCast(me, SPELL_CAMERA_SHAKE, true); DoCast(me, SPELL_DEBRIS_KNOCKDOWN, true); if (pInstance) pInstance->SetData(DATA_COLLAPSE, true); } if (Phase3) { if (Debris_Timer <= diff) { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { float x, y, z; pTarget->GetPosition(x, y, z); Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); if (summon) CAST_AI(mob_abyssal::mob_abyssalAI, summon->AI())->SetTrigger(1); } Debris_Timer = 10000; } else Debris_Timer -= diff; } DoMeleeAttackIfReady(); }
void KilledUnit(Unit* who) { if (who->GetTypeId() == TYPEID_PLAYER && pInstance) pInstance->SetData(DATA_IMMORTAL_FAIL, 0); }
void JustDied(Unit* /*killer*/) { Talk(SAY_DEATH); if (instance) instance->SetData(DATA_BLACKHEARTTHEINCITEREVENT, DONE); }