void JustDied(Unit *victim) { DoScriptText(SAY_DEATH, me); _JustDied(); me->setFaction(35); if (pInstance) { // Kill credit pInstance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 65074); // Knock on Wood if (EldersCount == 1) pInstance->DoCompleteAchievement(ACHIEVEMENT_KNOCK_ON_WOOD_1); // Knock, Knock on Wood if (EldersCount == 2) pInstance->DoCompleteAchievement(ACHIEVEMENT_KNOCK_ON_WOOD_2); // Knock, Knock, Knock on Wood if (EldersCount == 3) pInstance->DoCompleteAchievement(ACHIEVEMENT_KNOCK_ON_WOOD_3); // Getting Back to Nature if (me->HasAura(SPELL_ATTUNED_TO_NATURE)) if (me->GetAura(SPELL_ATTUNED_TO_NATURE, 0)->GetStackAmount() >= 25) pInstance->DoCompleteAchievement(ACHIEVEMENT_BACK_TO_NATURE); } // Hard mode chest // Summon spells not works correctly, chest respawn is infinite Position pos; me->GetRandomNearPosition(pos, 10); switch (EldersCount) { case 0: //DoCast(RAID_MODE(RAID_10_0_SPELL_FREYA_CHEST, RAID_25_0_SPELL_FREYA_CHEST)); me->SummonGameObject(RAID_MODE(194324, 194328), pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0, 0, 0, 1, 0, 0); break; case 1: //DoCast(RAID_MODE(RAID_10_1_SPELL_FREYA_CHEST, RAID_25_1_SPELL_FREYA_CHEST)); me->SummonGameObject(RAID_MODE(194325, 194329), pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0, 0, 0, 1, 0, 0); break; case 2: //DoCast(RAID_MODE(RAID_10_2_SPELL_FREYA_CHEST, RAID_25_2_SPELL_FREYA_CHEST)); me->SummonGameObject(RAID_MODE(194326, 194330), pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0, 0, 0, 1, 0, 0); break; case 3: //DoCast(RAID_MODE(RAID_10_3_SPELL_FREYA_CHEST, RAID_25_3_SPELL_FREYA_CHEST)); me->SummonGameObject(RAID_MODE(194327, 194331), pos.m_positionX, pos.m_positionY, pos.m_positionZ, 0, 0, 0, 1, 0, 0); break; } }
void JustDied(Unit *victim) { _JustDied(); DoScriptText(SAY_DEATH, me); // Achievements if (pInstance) { // Shattered if (Shattered) pInstance->DoCompleteAchievement(ACHIEVEMENT_SHATTERED); // Stokin' the Furnace if (EncounterTime <= MAX_ENCOUNTER_TIME) pInstance->DoCompleteAchievement(ACHIEVEMENT_STOKIN_THE_FURNACE); } }
void JustDied(Unit* /*killer*/) { Position spawnPoint = { 5618.139, 2451.873, 705.854 }; DoScriptText(RAND(SAY_FACE_SORROW_DEATH,SAY_FACE_DESIRE_DEATH), me); if (pInstance) { pInstance->SetData(DATA_DEVOURER_EVENT, DONE); if (bThreeFaceAchievement && IsHeroic()) pInstance->DoCompleteAchievement(ACHIEV_THREE_FACED); int32 entryIndex; if (pInstance->GetData(DATA_TEAM_IN_INSTANCE) == TEAM_ALLIANCE) entryIndex = 0; else entryIndex = 1; for (int8 i = 0; outroPositions[i].entry[entryIndex] != 0; ++i) { if (Creature *pSummon = me->SummonCreature(outroPositions[i].entry[entryIndex], spawnPoint, TEMPSUMMON_DEAD_DESPAWN)) { pSummon->GetMotionMaster()->MovePoint(0, outroPositions[i].movePosition); if (pSummon->GetEntry() == NPC_JAINA_PART2) DoScriptText(SAY_JAINA_OUTRO, pSummon); else if (pSummon->GetEntry() == NPC_SYLVANAS_PART2) DoScriptText(SAY_SYLVANAS_OUTRO, pSummon); } } } }
void KilledUnit(Unit* pVictim) { switch(urand(0, 1)) { case 0: DoScriptText(SAY_KILL1, me); break; case 1: DoScriptText(SAY_KILL2, me); break; } switch(0) { case 0: if (pVictim->HasAura(72293)) { DoCast(me, SPELL_FALLEN_CHAMPION_AURA); if(!Achievement) m_pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_MESS_10,ACHIEV_MESS_25)); Achievement = true; } break; } }
void JustDied(Unit *victim) { if (m_pInstance) m_pInstance->SetData(TYPE_VEZAX, DONE); DoScriptText(SAY_UR_Vezax_Death01, me); if (m_pInstance && Hardmode == 1 && TYPE_SARONITE_ANIMUS == DONE) m_pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_I_LOVE_THE_SMELL_OF_SARONITE_IN_THE_MORNING, ACHIEV_I_LOVE_THE_SMELL_OF_SARONITE_IN_THE_MORNING_H)); }
void JustDied(Unit *victim) { DoScriptText(SAY_DEATH, me); _JustDied(); // Achievements if (pInstance) { // Heartbreaker if (hardMode) pInstance->DoCompleteAchievement(ACHIEVEMENT_HEARTBREAKER); // Must Deconstruct Faster if (EncounterTime <= MAX_ENCOUNTER_TIME) pInstance->DoCompleteAchievement(ACHIEVEMENT_DECONSTRUCT_FASTER); // Nerf Engineering if (achievement_nerf) pInstance->DoCompleteAchievement(ACHIEVEMENT_NERF_ENG); } }
void JustDied(Unit* /*killer*/) { if (pInstance) { pInstance->SetData(DATA_DRED_EVENT,DONE); if (IsHeroic() && pInstance->GetData(DATA_KING_DRED_ACHIEV) == 6) pInstance->DoCompleteAchievement(ACHIEV_BETTER_OFF_DRED); } }
void JustDied(Unit* /*killer*/) { DoScriptText(SAY_SLAY_3,me); //SAY_SLAY_3 on death? if (pInstance) { pInstance->SetData(DATA_ELDER_NADOX_EVENT, DONE); if (IsHeroic() && !DeadAhnkaharGuardian) pInstance->DoCompleteAchievement(ACHIEV_RESPECT_YOUR_ELDERS); } }
void JustDied(Unit* killer) { if (pInstance) { pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GRIEVOUS_BITE); pInstance->SetData(DATA_DRED_EVENT,DONE); if (IsHeroic() && pInstance->GetData(DATA_KING_DRED_ACHIEV) == 6) pInstance->DoCompleteAchievement(ACHIEV_BETTER_OFF_DRED); } }
void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (pInstance) { if (IsHeroic() && uiAchievementProgress == 2) pInstance->DoCompleteAchievement(ACHIEV_SPLIT_PERSONALITY); pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE); } }
void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); lSummons.DespawnAll(); if (pInstance) { pInstance->SetData(DATA_SJONNIR_EVENT, DONE); if (IsHeroic() && uiKilledIronSludges > 4) pInstance->DoCompleteAchievement(ACHIEV_ABUSE_THE_OOZE); } }
void JustDied(Unit* Killer) { _JustDied(); // Achievements if (pInstance) { // A Quick Shave if (FlyCount <= 2) pInstance->DoCompleteAchievement(ACHIEVEMENT_QUICK_SHAVE); } }
void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); if (pInstance) { pInstance->SetData(DATA_NOVOS_EVENT, DONE); if (IsHeroic() && bAchiev) pInstance->DoCompleteAchievement(ACHIEV_OH_NOVOS); } lSummons.DespawnAll(); }
void JustDied(Unit *victim) { _JustDied(); DoScriptText(SAY_DEATH, me); // Achievements if (pInstance) { // Kill credit pInstance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET2, 64899); // Getting Cold in Here if (!bMoreThanTwoIntenseCold) pInstance->DoCompleteAchievement(ACHIEVEMENT_COLD_IN_HERE); // I Could Say That This Cache Was Rare if (RareCache) { pInstance->DoCompleteAchievement(ACHIEVEMENT_THIS_CACHE_WAS_RARE); pInstance->SetData(DATA_HODIR_RARE_CHEST, GO_STATE_READY); } } }
void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); lSummons.DespawnAll(); if (pInstance) { if (bAchiev) pInstance->DoCompleteAchievement(ACHIEV_CONSUMPTION_JUNCTION); pInstance->SetData(DATA_TROLLGORE_EVENT, DONE); } }
void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); if (pInstance) { if (Creature *pTyrannus = m_creature->GetCreature(*m_creature, pInstance->GetData64(DATA_TYRANNUS))) DoScriptText(SAY_TYRANNUS_DEATH, pTyrannus); pInstance->SetData(DATA_GARFROST_EVENT, DONE); if (IsHeroic() && bAchievement) pInstance->DoCompleteAchievement(ACHIEV_DOESNT_GO_TO_ELEVEN); } }
void JustDied(Unit* killer) { DoScriptText(SAY_DEATH, m_creature); if (pInstance) { pInstance->SetData(DATA_KRIKTHIR_THE_GATEWATCHER_EVENT, DONE); //Achievement: Watch him die Creature *pAdd1, *pAdd2, *pAdd3; if ((pAdd1 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_WATCHER_GASHRA))) && pAdd1->isAlive() && (pAdd2 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_WATCHER_SILTHIK))) && pAdd2->isAlive() && (pAdd3 = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_WATCHER_NARJIL))) && pAdd3->isAlive() && IsHeroic()) pInstance->DoCompleteAchievement(ACHIEV_WATH_HIM_DIE); } }
void DamageTaken(Unit *done_by, uint32 &damage) { if (damage >= me->GetHealth()) { damage = 0; EnterEvadeMode(); me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NON_ATTACKABLE); me->SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_NOT_SELECTABLE); DoScriptText(SAY_START_7, me); me->setFaction(35); bDone = true; if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE))) pInstance->HandleGameObject(pGO->GetGUID(),true); if (GameObject* pGO = GameObject::GetGameObject(*me, pInstance->GetData64(DATA_MAIN_GATE1))) pInstance->HandleGameObject(pGO->GetGUID(),true); pInstance->SetData(BOSS_ARGENT_CHALLENGE_P, DONE); if (IsHeroic()) pInstance->DoCompleteAchievement(ACHIEV_CONF); } }
void KilledUnit(Unit *victim) { switch(urand(0, 1)) { case 0: DoScriptText(SAY_KILL_1, me); break; case 1: DoScriptText(SAY_KILL_2, me); break; } switch(0) { case 0: if (victim->HasAura(72103)) { if(!Achievements) m_pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_INOCULATE_10,ACHIEV_INOCULATE_25)); Achievements = true; } break; } }
void JustDied(Unit* /*killer*/) { DoScriptText(SAY_DEATH, me); if (pInstance) { if (IsHeroic()) { if (lImpaledPlayers.size() == 5) pInstance->DoCompleteAchievement(ACHIEV_SHARE_THE_LOVE); AchievementEntry const *achievWhatTheEck = GetAchievementStore()->LookupEntry(ACHIEV_WHAT_THE_ECK); if (achievWhatTheEck) { Map::PlayerList const &players = pInstance->instance->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) if (itr->getSource()->HasAura(SPELL_ECK_RESIDUE)) itr->getSource()->CompletedAchievement(achievWhatTheEck); } } pInstance->SetData(DATA_GAL_DARAH_EVENT, DONE); } }
void UpdateEscortAI(const uint32 uiDiff) { if (uiPhaseTimer <= uiDiff) { switch (uiStep) { case 1: if (pInstance) { if (pInstance->GetData(DATA_BRANN_EVENT) != NOT_STARTED) return; pInstance->SetData(DATA_BRANN_EVENT, IN_PROGRESS); } bIsBattle = false; DoScriptText(SAY_ESCORT_START, m_creature); SetRun(true); JumpToNextStep(0); break; case 3: SetEscortPaused(false); JumpToNextStep(0); break; case 5: if (pInstance) if (Creature* pTemp = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM)))) DoScriptText(SAY_EVENT_INTRO_3_ABED, pTemp); JumpToNextStep(8500); break; case 6: DoScriptText(SAY_EVENT_A_1, m_creature); JumpToNextStep(6500); break; case 7: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_A_2_KADD, pTemp); JumpToNextStep(12500); break; case 8: DoScriptText(SAY_EVENT_A_3, m_creature); if (pInstance) pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),true); if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) CAST_AI(mob_tribuna_controllerAI, pTemp->AI())->bKaddrakActivated = true; JumpToNextStep(5000); break; case 9: m_creature->SetReactState(REACT_PASSIVE); SpawnDwarf(1); JumpToNextStep(20000); break; case 10: DoScriptText(SAY_EVENT_B_1, m_creature); JumpToNextStep(6000); break; case 11: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_B_2_MARN, pTemp); SpawnDwarf(1); JumpToNextStep(20000); break; case 12: DoScriptText(SAY_EVENT_B_3, m_creature); if (pInstance) pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),true); if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) CAST_AI(mob_tribuna_controllerAI, pTemp->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, m_creature); SpawnDwarf(1); JumpToNextStep(10000); break; case 16: SpawnDwarf(2); JumpToNextStep(20000); break; case 17: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_C_2_ABED, pTemp); SpawnDwarf(1); JumpToNextStep(20000); break; case 18: DoScriptText(SAY_EVENT_C_3, m_creature); if (pInstance) pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),true); if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) CAST_AI(mob_tribuna_controllerAI, pTemp->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, m_creature); SpawnDwarf(3); JumpToNextStep(20000); break; case 22: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_D_2_ABED, pTemp); SpawnDwarf(1); JumpToNextStep(5000); break; case 23: SpawnDwarf(2); JumpToNextStep(15000); break; case 24: DoScriptText(SAY_EVENT_D_3, m_creature); SpawnDwarf(3); JumpToNextStep(5000); break; case 25: SpawnDwarf(1); JumpToNextStep(5000); break; case 26: SpawnDwarf(2); JumpToNextStep(10000); break; case 27: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_D_4_ABED, pTemp); SpawnDwarf(1); JumpToNextStep(10000); break; case 28: m_creature->SetReactState(REACT_DEFENSIVE); DoScriptText(SAY_EVENT_END_01, m_creature); m_creature->SetStandState(UNIT_STAND_STATE_STAND); if (pInstance) pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),true); if (Creature* pTemp = Unit::GetCreature(*m_creature, uiControllerGUID)) pTemp->DealDamage(pTemp, pTemp->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); bIsBattle = true; SetEscortPaused(false); JumpToNextStep(6500); break; case 29: DoScriptText(SAY_EVENT_END_02, m_creature); if (pInstance) { pInstance->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. pInstance->DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, 59046); if (!bHasBeenDamaged) pInstance->DoCompleteAchievement(ACHIEV_BRANN_SPANKIN_NEW); } JumpToNextStep(5500); break; case 30: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_03_ABED, pTemp); JumpToNextStep(8500); break; case 31: DoScriptText(SAY_EVENT_END_04, m_creature); JumpToNextStep(11500); break; case 32: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_05_ABED, pTemp); JumpToNextStep(11500); break; case 33: DoScriptText(SAY_EVENT_END_06, m_creature); JumpToNextStep(4500); break; case 34: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_07_ABED, pTemp); JumpToNextStep(22500); break; case 35: DoScriptText(SAY_EVENT_END_08, m_creature); JumpToNextStep(7500); break; case 36: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_END_09_KADD, pTemp); JumpToNextStep(18500); break; case 37: DoScriptText(SAY_EVENT_END_10, m_creature); JumpToNextStep(5500); break; case 38: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_END_11_KADD, pTemp); JumpToNextStep(20500); break; case 39: DoScriptText(SAY_EVENT_END_12, m_creature); JumpToNextStep(2500); break; case 40: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_KADDRAK))) DoScriptText(SAY_EVENT_END_13_KADD, pTemp); JumpToNextStep(19500); break; case 41: DoScriptText(SAY_EVENT_END_14, m_creature); JumpToNextStep(10500); break; case 42: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_END_15_MARN, pTemp); JumpToNextStep(6500); break; case 43: DoScriptText(SAY_EVENT_END_16, m_creature); JumpToNextStep(6500); break; case 44: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_END_17_MARN, pTemp); JumpToNextStep(25500); break; case 45: DoScriptText(SAY_EVENT_END_18, m_creature); JumpToNextStep(23500); break; case 46: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_MARNAK))) DoScriptText(SAY_EVENT_END_19_MARN, pTemp); JumpToNextStep(3500); break; case 47: DoScriptText(SAY_EVENT_END_20, m_creature); JumpToNextStep(8500); break; case 48: if (pInstance) if (Creature* pTemp = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ABEDNEUM))) DoScriptText(SAY_EVENT_END_21_ABED, pTemp); JumpToNextStep(5500); break; case 49: { if (pInstance) { pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_KADDRAK),false); pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_MARNAK),false); pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_ABEDNEUM),false); pInstance->HandleGameObject(pInstance->GetData64(DATA_GO_SKY_FLOOR),false); } Player* pPlayer = GetPlayerForEscort(); if (pPlayer) pPlayer->GroupEventHappens(QUEST_HALLS_OF_STONE, m_creature); m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); JumpToNextStep(180000); break; } case 50: SetEscortPaused(false); break; } } else uiPhaseTimer -= uiDiff; if (!bIsLowHP && HealthBelowPct(30)) { DoScriptText(SAY_LOW_HEALTH, m_creature); bIsLowHP = true; } else if (bIsLowHP && !HealthBelowPct(30)) bIsLowHP = false; if (!UpdateVictim()) return; DoMeleeAttackIfReady(); }