void KilledUnit(Unit* /*victim*/) { if (pInstance) if (Creature* pNeptulon = ObjectAccessor::GetCreature(*me, pInstance->GetData64(DATA_NEPTULON))) pNeptulon->AI()->Talk(SAY_KILL); }
void JustDied(Unit* /*killer*/) { if (instance) instance->SetData(TYPE_FENRUS, instance->GetData(TYPE_FENRUS) + 1); }
void EnterCombat(Unit* /*who*/) override { Talk(SAY_AGGRO); instance->SetData(DATA_SALRAMM_EVENT, IN_PROGRESS); }
void JustDied(Unit* /*pKiller*/) { if(Creature* pAnomalus = Unit::GetCreature(*me, pInstance ? pInstance->GetData64(DATA_ANOMALUS) : 0)) if(pInstance && pInstance->GetData(DATA_ANOMALUS_EVENT) == IN_PROGRESS) CAST_AI(boss_anomalus::boss_anomalusAI,pAnomalus->AI())->bDeadChaoticRift = true; }
void UpdateAI(const uint32 uiDiff) { if (!pInstance) 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, pInstance->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) { pInstance->SetData (DATA_MINIONS, IN_PROGRESS); uiWallMinionTimer = 10000; } else uiWallMinionTimer -= uiDiff; //If we are <66 summon the guardians if (!bGuardiansAwake && !HealthAbovePct(66)) { ActivateMinion(pInstance->GetData64(5), true); // EarthenGuardian1 ActivateMinion(pInstance->GetData64(6), true); // EarthenGuardian2 ActivateMinion(pInstance->GetData64(7), true); // EarthenGuardian3 ActivateMinion(pInstance->GetData64(8), true); // EarthenGuardian4 ActivateMinion(pInstance->GetData64(9), true); // EarthenGuardian5 ActivateMinion(pInstance->GetData64(10), false); // EarthenGuardian6 me->MonsterYell(SAY_SUMMON, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_SUMMON); bGuardiansAwake = true; } //If we are <33 summon the vault walkers if (!bVaultWalkersAwake && !HealthAbovePct(33)) { ActivateMinion(pInstance->GetData64(1), true); // VaultWalker1 ActivateMinion(pInstance->GetData64(2), true); // VaultWalker2 ActivateMinion(pInstance->GetData64(3), true); // VaultWalker3 ActivateMinion(pInstance->GetData64(4), false); // VaultWalker4 me->MonsterYell(SAY_SUMMON2, LANG_UNIVERSAL, NULL); 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 Reset() override { Initialize(); m_uiEventId = instance->GetData(DATA_OPERA_PERFORMANCE); }
void EnterCombat(Unit * /*who*/) { if (pInstance) pInstance->SetData(DATA_RAJAXX_EVENT, IN_PROGRESS); }
void IsSummonedBy(Unit* summoner) { targetGUID = summoner->GetGUID(); me->SetInCombatWith(summoner); me->AddThreat(summoner, 250.0f); if (Unit* target = ObjectAccessor::GetUnit(*me, targetGUID)) { DoCast(target, SPELL_BLOCK_OF_ICE, true); // Prevents to have Ice Block on other place than target is me->NearTeleportTo(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), target->GetOrientation()); if (target->GetTypeId() == TYPEID_PLAYER) if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0)) Hodir->AI()->DoAction(ACTION_CHEESE_THE_FREEZE); } }
void DamageTaken(Unit* who, uint32& /*damage*/) { if (Creature* Helper = ObjectAccessor::GetCreature(*me, targetGUID)) { Helper->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED); if (Creature* Hodir = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(BOSS_HODIR) : 0)) { if (!Hodir->isInCombat()) { Hodir->SetReactState(REACT_AGGRESSIVE); Hodir->AI()->DoZoneInCombat(); Hodir->AI()->AttackStart(who); } Helper->AI()->AttackStart(Hodir); } } }
void JustDied(Unit* /*pKiller*/) { if (m_pInstance) m_pInstance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE); }
void DoSummonGrandChampion(uint32 uiBoss) { ++uiSummonTimes; uint32 VEHICLE_TO_SUMMON1 = 0; uint32 VEHICLE_TO_SUMMON2 = 0; switch (uiBoss) { case 0: VEHICLE_TO_SUMMON1 = VEHICLE_MOKRA_SKILLCRUSHER_MOUNT; VEHICLE_TO_SUMMON2 = VEHICLE_ORGRIMMAR_WOLF; break; case 1: VEHICLE_TO_SUMMON1 = VEHICLE_ERESSEA_DAWNSINGER_MOUNT; VEHICLE_TO_SUMMON2 = VEHICLE_SILVERMOON_HAWKSTRIDER; break; case 2: VEHICLE_TO_SUMMON1 = VEHICLE_RUNOK_WILDMANE_MOUNT; VEHICLE_TO_SUMMON2 = VEHICLE_THUNDER_BLUFF_KODO; break; case 3: VEHICLE_TO_SUMMON1 = VEHICLE_ZUL_TORE_MOUNT; VEHICLE_TO_SUMMON2 = VEHICLE_DARKSPEAR_RAPTOR; break; case 4: VEHICLE_TO_SUMMON1 = VEHICLE_DEATHSTALKER_VESCERI_MOUNT; VEHICLE_TO_SUMMON2 = VEHICLE_FORSAKE_WARHORSE; break; default: return; } if (Creature* pBoss = me->SummonCreature(VEHICLE_TO_SUMMON1, SpawnPosition)) { switch (uiSummonTimes) { case 1: { uiVehicle1GUID = pBoss->GetGUID(); uint64 uiGrandChampionBoss1 = 0; if (Vehicle* pVehicle = pBoss->GetVehicleKit()) if (Unit* unit = pVehicle->GetPassenger(0)) uiGrandChampionBoss1 = unit->GetGUID(); if (instance) { instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_1, uiVehicle1GUID); instance->SetData64(DATA_GRAND_CHAMPION_1, uiGrandChampionBoss1); } pBoss->AI()->SetData(1, 0); break; } case 2: { uiVehicle2GUID = pBoss->GetGUID(); uint64 uiGrandChampionBoss2 = 0; if (Vehicle* pVehicle = pBoss->GetVehicleKit()) if (Unit* unit = pVehicle->GetPassenger(0)) uiGrandChampionBoss2 = unit->GetGUID(); if (instance) { instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_2, uiVehicle2GUID); instance->SetData64(DATA_GRAND_CHAMPION_2, uiGrandChampionBoss2); } pBoss->AI()->SetData(2, 0); break; } case 3: { uiVehicle3GUID = pBoss->GetGUID(); uint64 uiGrandChampionBoss3 = 0; if (Vehicle* pVehicle = pBoss->GetVehicleKit()) if (Unit* unit = pVehicle->GetPassenger(0)) uiGrandChampionBoss3 = unit->GetGUID(); if (instance) { instance->SetData64(DATA_GRAND_CHAMPION_VEHICLE_3, uiVehicle3GUID); instance->SetData64(DATA_GRAND_CHAMPION_3, uiGrandChampionBoss3); } pBoss->AI()->SetData(3, 0); break; } default: return; } for (uint8 i = 0; i < 3; ++i) { if (Creature* pAdd = me->SummonCreature(VEHICLE_TO_SUMMON2, SpawnPosition, TEMPSUMMON_CORPSE_DESPAWN)) { switch (uiSummonTimes) { case 1: Champion1List.push_back(pAdd->GetGUID()); break; case 2: Champion2List.push_back(pAdd->GetGUID()); break; case 3: Champion3List.push_back(pAdd->GetGUID()); break; } switch (i) { case 0: pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, M_PI); break; case 1: pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, M_PI / 2); break; case 2: pAdd->GetMotionMaster()->MoveFollow(pBoss, 2.0f, M_PI / 2 + M_PI); break; } } } } }
void JustDied(Unit * /*who*/) { if (pInstance) pInstance->SetData(DATA_GHOSTKILL, 1); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; if (Phase == 1 && HealthBelowPct(20)) { Phase = 2; DoScriptText(SAY_PHASE_2, me); } if (HealthBelowPct(2)) { me->SummonGameObject(GAMEOBJECT_GIVE_OF_THE_OBSERVER, 1634.258667f, -295.101166f, 417.321381f, 0, 0, 0, 0, 0, 0); // All of them. or random? DoScriptText(SAY_DEATH_1, me); DoScriptText(SAY_DEATH_2, me); DoScriptText(SAY_DEATH_3, me); DoScriptText(SAY_DEATH_4, me); DoScriptText(SAY_DEATH_5, me); me->DisappearAndDie(); if (pInstance) pInstance->SetData(BOSS_ALGALON, DONE); return; } if (Phase == 1) { if (!Summon) { if (uiPhase_timer <= diff) { switch (uiStep) { case 1: DoScriptText(SAY_SUMMON_1, me); JumpToNextStep(3000); break; case 2: DoScriptText(SAY_SUMMON_2, me); JumpToNextStep(3000); break; case 3: DoScriptText(SAY_SUMMON_3, me); JumpToNextStep(3000); break; case 4: DoScriptText(SAY_ENGADED_FOR_FIRTS_TIME, me); JumpToNextStep(3000); break; case 5: me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); me->SetReactState(REACT_AGGRESSIVE); Summon = true; break; } } else uiPhase_timer -= diff; return; } if (QuantumStrike_Timer <= diff) { DoCast(me->getVictim(), RAID_MODE(SPELL_QUANTUM_STRIKE, H_SPELL_QUANTUM_STRIKE), true); QuantumStrike_Timer = urand(4000, 14000); } else QuantumStrike_Timer -= diff; if (BigBang_Timer <= diff) { DoScriptText(RAND(SAY_BIG_BANG_1, SAY_BIG_BANG_2), me); DoCast(me->getVictim(), RAID_MODE(SPELL_BIG_BANG, H_SPELL_BIG_BANG), true); BigBang_Timer = 90000; } else BigBang_Timer -= diff; if (Ascend_Timer <= diff) { DoCast(me->getVictim(), SPELL_ASCEND, true); Ascend_Timer = 480000; } else Ascend_Timer -= diff; if (PhasePunch_Timer <= diff) { DoCast(me->getVictim(), SPELL_PHASE_PUNCH, true); PhasePunch_Timer = 8000; } else PhasePunch_Timer -= diff; if (CosmicSmash_Timer <= diff) { DoCast(SelectTarget(SELECT_TARGET_RANDOM, 0), RAID_MODE(SPELL_COSMIC_SMASH, H_SPELL_COSMIC_SMASH), true); CosmicSmash_Timer = urand(30000, 60000); } else CosmicSmash_Timer -= diff; if (Berserk_Timer <= diff) { DoScriptText(SAY_BERSERK, me); DoCast(me->getVictim(), SPELL_BERSERK, true); Berserk_Timer = 360000; } else Berserk_Timer -= diff; DoMeleeAttackIfReady(); EnterEvadeIfOutOfCombatArea(diff); } if (Phase == 2) { if (Enrage) { if (Ascend_Timer <= diff) { DoCast(me, SPELL_ASCEND); DoScriptText(SAY_BERSERK, me); Ascend_Timer = urand(360000, 365000); Enrage = false; } else Ascend_Timer -= diff; } } DoMeleeAttackIfReady(); }
void UpdateAI(uint32 diff) { if (!IsRunning) return; if (EventProgress_Timer <= diff) { if (instance) { if (instance->GetData(TYPE_HARBINGERSKYRISS) == FAIL) { Reset(); return; } } if (CanSpawn) { //continue beam omega pod, unless we are about to summon skyriss if (Phase != 7) DoCast(me, SPELL_TARGET_OMEGA); switch (Phase) { case 2: switch (urand(0, 1)) { case 0: me->SummonCreature(ENTRY_TRICKSTER, 478.326f, -148.505f, 42.56f, 3.19f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 1: me->SummonCreature(ENTRY_PH_HUNTER, 478.326f, -148.505f, 42.56f, 3.19f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; } break; case 3: me->SummonCreature(ENTRY_MILLHOUSE, 413.292f, -148.378f, 42.56f, 6.27f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 4: Talk(YELL_RELEASE2B); break; case 5: switch (urand(0, 1)) { case 0: me->SummonCreature(ENTRY_AKKIRIS, 420.179f, -174.396f, 42.58f, 0.02f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 1: me->SummonCreature(ENTRY_SULFURON, 420.179f, -174.396f, 42.58f, 0.02f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; } break; case 6: switch (urand(0, 1)) { case 0: me->SummonCreature(ENTRY_TW_DRAK, 471.795f, -174.58f, 42.58f, 3.06f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; case 1: me->SummonCreature(ENTRY_BL_DRAK, 471.795f, -174.58f, 42.58f, 3.06f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); break; } break; case 7: me->SummonCreature(ENTRY_SKYRISS, 445.763f, -191.639f, 44.64f, 1.60f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000); Talk(YELL_WELCOME); break; } CanSpawn = false; ++Phase; } if (CanProgress()) { switch (Phase) { case 1: Talk(YELL_INTRO2); EventProgress_Timer = 10000; ++Phase; break; case 2: Talk(YELL_RELEASE1); DoPrepareForPhase(); EventProgress_Timer = 7000; break; case 3: Talk(YELL_RELEASE2A); DoPrepareForPhase(); EventProgress_Timer = 10000; break; case 4: DoPrepareForPhase(); EventProgress_Timer = 15000; break; case 5: Talk(YELL_RELEASE3); DoPrepareForPhase(); EventProgress_Timer = 15000; break; case 6: Talk(YELL_RELEASE4); DoPrepareForPhase(); EventProgress_Timer = 15000; break; case 7: DoPrepareForPhase(); EventProgress_Timer = 15000; break; } } } else EventProgress_Timer -= diff; }
void UpdateAI(const uint32 uiDiff) { if (bDone && uiResetTimer <= uiDiff) { me->GetMotionMaster()->MovePoint(0, 746.843f, 695.68f, 412.339f); bDone = false; if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE))) pInstance->HandleGameObject(pGO->GetGUID(), true); } else uiResetTimer -= uiDiff; if (!UpdateVictim()) return; if (uiHolyFireTimer <= uiDiff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true)) { if (pTarget && pTarget->isAlive()) DoCast(pTarget, SPELL_HOLY_FIRE); } if (me->HasAura(SPELL_SHIELD)) uiHolyFireTimer = 13000; else uiHolyFireTimer = urand(9000, 12000); } else uiHolyFireTimer -= uiDiff; if (uiHolySmiteTimer <= uiDiff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 250, true)) { if (pTarget && pTarget->isAlive()) DoCast(pTarget, SPELL_SMITE); } if (me->HasAura(SPELL_SHIELD)) uiHolySmiteTimer = 9000; else uiHolySmiteTimer = urand(5000, 7000); } else uiHolySmiteTimer -= uiDiff; if (me->HasAura(SPELL_SHIELD)) if (uiRenewTimer <= uiDiff) { me->InterruptNonMeleeSpells(true); uint8 uiTarget = urand(0, 1); switch(uiTarget) { case 0: DoCast(me, SPELL_RENEW); break; case 1: if (Creature *pMemory = Unit::GetCreature(*me, MemoryGUID)) if (pMemory->isAlive()) DoCast(pMemory, SPELL_RENEW); break; } uiRenewTimer = urand(15000, 17000); } else uiRenewTimer -= uiDiff; if (!bHealth && me->GetHealth()*100 / me->GetMaxHealth() <= 35) { DoScriptText(SAY_START_6, me); me->InterruptNonMeleeSpells(true); DoCastAOE(SPELL_HOLY_NOVA, false); DoCast(me, SPELL_SHIELD); DoCastAOE(SPELL_CONFESS, false); bHealth = true; switch(urand(0, 24)) { case 0: me->SummonCreature(MEMORY_ALGALON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 1: me->SummonCreature(MEMORY_CHROMAGGUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 2: me->SummonCreature(MEMORY_CYANIGOSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 3: me->SummonCreature(MEMORY_DELRISSA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 4: me->SummonCreature(MEMORY_ECK, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 5: me->SummonCreature(MEMORY_ENTROPIUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 6: me->SummonCreature(MEMORY_GRUUL, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 7: me->SummonCreature(MEMORY_HAKKAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 8: me->SummonCreature(MEMORY_HEIGAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 9: me->SummonCreature(MEMORY_HEROD, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 10: me->SummonCreature(MEMORY_HOGGER, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 11: me->SummonCreature(MEMORY_IGNIS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 12: me->SummonCreature(MEMORY_ILLIDAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 13: me->SummonCreature(MEMORY_INGVAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 14: me->SummonCreature(MEMORY_KALITHRESH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 15: me->SummonCreature(MEMORY_LUCIFRON, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 16: me->SummonCreature(MEMORY_MALCHEZAAR, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 17: me->SummonCreature(MEMORY_MUTANUS, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 18: me->SummonCreature(MEMORY_ONYXIA, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 19: me->SummonCreature(MEMORY_THUNDERAAN, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 20: me->SummonCreature(MEMORY_VANCLEEF, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 21: me->SummonCreature(MEMORY_VASHJ, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 22: me->SummonCreature(MEMORY_VEKNILASH, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 23: me->SummonCreature(MEMORY_VEZAX, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 24: me->SummonCreature(MEMORY_ARCHIMONDE, 0.0f, 0.0f, 0.0f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; } } DoMeleeAttackIfReady(); }
void DelayEventStart() { if (instance) instance->SetData(DATA_ANUBARAK_EVENT, IN_PROGRESS); }
void JustDied(Unit* pKiller) { if (pInstance) pInstance->SetData(DATA_ARGENT_SOLDIER_DEFEATED, pInstance->GetData(DATA_ARGENT_SOLDIER_DEFEATED) + 1); }
void UpdateEscortAI(const uint32 uiDiff) { if (uiPhase) { if (uiTimer <= uiDiff) { switch (uiPhase) { case 1: DoScriptText(SAY_BLASTMASTER_1, me); NextStep(1500, true); break; case 2: SetEscortPaused(false); NextStep(0, false, 0); break; case 3: DoScriptText(SAY_BLASTMASTER_2, me); SetEscortPaused(false); NextStep(0, false, 0); break; case 4: DoScriptText(SAY_BLASTMASTER_3, me); NextStep(3000, true); break; case 5: DoScriptText(SAY_BLASTMASTER_4, me); NextStep(3000, true); break; case 6: SetInFace(true); DoScriptText(SAY_BLASTMASTER_5, me); Summon(1); if (instance) if (GameObject* go = GameObject::GetGameObject((*me), instance->GetData64(DATA_GO_CAVE_IN_RIGHT))) instance->HandleGameObject(0, true, go); NextStep(3000, true); break; case 7: DoScriptText(SAY_BLASTMASTER_6, me); SetEscortPaused(false); NextStep(0, false, 0); break; case 8: me->HandleEmoteCommand(EMOTE_STATE_WORK); NextStep(25000, true); break; case 9: Summon(2); NextStep(0, false); break; case 10: Summon(4); NextStep(0, false); break; case 11: DoScriptText(SAY_BLASTMASTER_17, me); NextStep(5000, true); break; case 12: DoScriptText(SAY_BLASTMASTER_18, me); NextStep(5000, true); break; case 13: DoScriptText(SAY_BLASTMASTER_20, me); CaveDestruction(true); NextStep(8000, true); break; case 14: DoScriptText(SAY_BLASTMASTER_21, me); NextStep(8500, true); break; case 15: DoScriptText(SAY_BLASTMASTER_22, me); NextStep(2000, true); break; case 16: DoScriptText(SAY_BLASTMASTER_23, me); SetInFace(false); if (instance) if (GameObject* go = GameObject::GetGameObject((*me), instance->GetData64(DATA_GO_CAVE_IN_LEFT))) instance->HandleGameObject(0, true, go); NextStep(2000, true); break; case 17: SetEscortPaused(false); DoScriptText(SAY_BLASTMASTER_24, me); Summon(6); NextStep(0, false); break; case 18: Summon(7); NextStep(0, false); break; case 19: SetInFace(false); Summon(8); DoScriptText(SAY_BLASTMASTER_25, me); NextStep(0, false); break; case 20: DoScriptText(SAY_BLASTMASTER_27, me); NextStep(2000, true); break; case 21: Summon(9); NextStep(0, false); break; case 22: CaveDestruction(false); DoScriptText(SAY_BLASTMASTER_20, me); NextStep(0, false); break; } } else uiTimer -= uiDiff; } if (!UpdateVictim()) return; DoMeleeAttackIfReady(); }
void Reset() { if (pInstance) pInstance->SetData(DATA_RAJAXX_EVENT, NOT_STARTED); }
void JustDied(Unit* /*killer*/) { if (Creature* pNovos = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_NOVOS) : 0)) CAST_AI(boss_novos::boss_novosAI, pNovos->AI())->RemoveCrystal(); }
void JustDied(Unit * /*killer*/) { if (pInstance) pInstance->SetData(DATA_RAJAXX_EVENT, DONE); }
void WaypointReached(uint32 i) { if (!instance) return; switch (i) { case 8: SetRun(false); me->SummonCreature(18764, 2181.87f, 112.46f, 89.45f, 0.26f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 9: DoScriptText(SAY_TH_ARMORY, me); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, THRALL_WEAPON_MODEL); //me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO, THRALL_WEAPON_INFO); //me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+1, 781); me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID+1, THRALL_SHIELD_MODEL); //me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+2, THRALL_SHIELD_INFO); //me->SetUInt32Value(UNIT_VIRTUAL_ITEM_INFO+3, 1038); break; case 10: me->SetDisplayId(THRALL_MODEL_EQUIPPED); break; case 11: SetRun(); break; case 15: me->SummonCreature(MOB_ENTRY_RIFLE, 2200.28f, 137.37f, 87.93f, 5.07f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_WARDEN, 2197.44f, 131.83f, 87.93f, 0.78f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_VETERAN, 2203.62f, 135.40f, 87.93f, 3.70f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_VETERAN, 2200.75f, 130.13f, 87.93f, 1.48f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 21: me->SummonCreature(MOB_ENTRY_RIFLE, 2135.80f, 154.01f, 67.45f, 4.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_WARDEN, 2144.36f, 151.87f, 67.74f, 4.46f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_VETERAN, 2142.12f, 154.41f, 67.12f, 4.56f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_VETERAN, 2138.08f, 155.38f, 67.24f, 4.60f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 25: me->SummonCreature(MOB_ENTRY_RIFLE, 2102.98f, 192.17f, 65.24f, 6.02f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_WARDEN, 2108.48f, 198.75f, 65.18f, 5.15f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_VETERAN, 2106.11f, 197.29f, 65.18f, 5.63f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_VETERAN, 2104.18f, 194.82f, 65.18f, 5.75f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 29: DoScriptText(SAY_TH_SKARLOC_MEET, me); me->SummonCreature(ENTRY_SCARLOC, 2036.48f, 271.22f, 63.43f, 5.27f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); //temporary, skarloc should rather be triggered to walk up to thrall break; case 30: SetEscortPaused(true); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); SetRun(false); break; case 31: DoScriptText(SAY_TH_MOUNTS_UP, me); DoMount(); SetRun(); break; case 37: //possibly regular patrollers? If so, remove this and let database handle them me->SummonCreature(MOB_ENTRY_WATCHMAN, 2124.26f, 522.16f, 56.87f, 3.99f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_WATCHMAN, 2121.69f, 525.37f, 57.11f, 4.01f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_SENTRY, 2124.65f, 524.55f, 56.63f, 3.98f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 59: me->SummonCreature(SKARLOC_MOUNT, 2488.64f, 625.77f, 58.26f, 4.71f, TEMPSUMMON_TIMED_DESPAWN, 10000); DoUnmount(); HadMount = false; SetRun(false); break; case 60: me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); //make horsie run off SetEscortPaused(true); me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); instance->SetData(TYPE_THRALL_PART2, DONE); SetRun(); break; case 64: SetRun(false); break; case 68: me->SummonCreature(MOB_ENTRY_BARN_PROTECTOR, 2500.22f, 692.60f, 55.50f, 2.84f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_BARN_LOOKOUT, 2500.13f, 696.55f, 55.51f, 3.38f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_BARN_GUARDSMAN, 2500.55f, 693.64f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_BARN_GUARDSMAN, 2500.94f, 695.81f, 55.50f, 3.14f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 71: SetRun(); break; case 81: SetRun(false); break; case 83: me->SummonCreature(MOB_ENTRY_CHURCH_PROTECTOR, 2627.33f, 646.82f, 56.03f, 4.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); me->SummonCreature(MOB_ENTRY_CHURCH_LOOKOUT, 2624.14f, 648.03f, 56.03f, 4.50f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); me->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN, 2625.32f, 649.60f, 56.03f, 4.38f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); me->SummonCreature(MOB_ENTRY_CHURCH_GUARDSMAN, 2627.22f, 649.00f, 56.03f, 4.34f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000); break; case 84: DoScriptText(SAY_TH_CHURCH_END, me); SetRun(); break; case 91: me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); SetRun(false); break; case 93: me->SummonCreature(MOB_ENTRY_INN_PROTECTOR, 2652.71f, 660.31f, 61.93f, 1.67f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_INN_LOOKOUT, 2648.96f, 662.59f, 61.93f, 0.79f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_INN_GUARDSMAN, 2657.36f, 662.34f, 61.93f, 2.68f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); me->SummonCreature(MOB_ENTRY_INN_GUARDSMAN, 2656.39f, 659.77f, 61.93f, 2.61f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); break; case 94: if (uint64 TarethaGUID = instance->GetData64(DATA_TARETHA)) { if (Unit* Taretha = Unit::GetUnit((*me), TarethaGUID)) DoScriptText(SAY_TA_ESCAPED, Taretha, me); } break; case 95: DoScriptText(SAY_TH_MEET_TARETHA, me); instance->SetData(TYPE_THRALL_PART3, DONE); SetEscortPaused(true); break; case 96: DoScriptText(SAY_TH_EPOCH_WONDER, me); break; case 97: DoScriptText(SAY_TH_EPOCH_KILL_TARETHA, me); SetRun(); break; case 98: //trigger epoch Yell("Thrall! Come outside and face your fate! ....") //from here, thrall should not never be allowed to move to point 106 which he currently does. break; case 106: { //trigger taretha to run down outside if (Creature* Taretha = instance->instance->GetCreature(instance->GetData64(DATA_TARETHA))) { if (Player* player = GetPlayerForEscort()) CAST_AI(npc_escortAI, (Taretha->AI()))->Start(false, true, player->GetGUID()); } //kill credit Creature for quest Map* map = me->GetMap(); Map::PlayerList const& players = map->GetPlayers(); if (!players.isEmpty() && map->IsDungeon()) { for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { if (Player* player = itr->getSource()) player->KilledMonsterCredit(20156, 0); } } //alot will happen here, thrall and taretha talk, erozion appear at spot to explain me->SummonCreature(EROZION_ENTRY, 2646.47f, 680.416f, 55.38f, 4.16f, TEMPSUMMON_TIMED_DESPAWN, 120000); } break; case 108: //last waypoint, just set Thrall invisible, respawn is turned off me->SetVisible(false); break; } }
void JustReachedHome() { pInstance->SetBossState(DATA_SHA_VIOLENCE, FAIL); summons.DespawnAll(); }
void JustDied(Unit* /*pKiller*/) { if (pInstance) pInstance->SetData(TYPE_FENRUS, pInstance->GetData(TYPE_FENRUS) + 1); }
void JustDied(Unit * /*attacker*/) { DoCast (me, SPELL_SELF_DESTRUCT, true); if (pInstance) pInstance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper }
void Reset() { if (pInstance) pInstance->SetData(dataId, NOT_STARTED); }
void JustDied(Unit* /*killer*/) override { Talk(SAY_DEATH); instance->SetData(DATA_SALRAMM_EVENT, DONE); }
void JustDied(Unit* /*killer*/) { if (pInstance) pInstance->SetData(dataId, DONE); me->SaveRespawnTime(); }
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 HandleDoors(bool open) // Massive Door switcher { if (GameObject* Door = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_MASSIVE_DOOR) )) Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY); }