void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; events.Update(diff); while(uint32 eventId = events.ExecuteEvent()) { switch(eventId) { case EVENT_POISON: if (!me->HasAura(SPELL_WIDOWS_EMBRACE)) DoCastAOE(HEROIC(SPELL_POISON_BOLT_VOLLEY,H_SPELL_POISON_BOLT_VOLLEY)); events.ScheduleEvent(EVENT_POISON, urand(12000,15000)); return; case EVENT_FIRE: if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, HEROIC(SPELL_RAIN_OF_FIRE,H_SPELL_RAIN_OF_FIRE)); events.ScheduleEvent(EVENT_FIRE, urand(6000,18000)); return; case EVENT_FRENZY: DoCast(me,HEROIC(SPELL_FRENZY,H_SPELL_FRENZY)); delayFrenzy = false; return; case EVENT_AFTERENRAGE: events.ScheduleEvent(EVENT_FRENZY, urand(60000,80000)); } } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { //Return since we have no target if (!UpdateVictim()) return; if (uiArcaneBarrageVolley_Timer < uiDiff) { DoCast(m_creature, HEROIC(SPELL_ARCANE_BARRAGE_VOLLEY, SPELL_ARCANE_BARRAGE_VOLLEY_H)); uiArcaneBarrageVolley_Timer = urand(20000, 22000); } else uiArcaneBarrageVolley_Timer -= uiDiff; if (uiArcaneBuffet_Timer) if (uiArcaneBuffet_Timer < uiDiff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_ARCANE_BUFFET, SPELL_ARCANE_BUFFET_H)); uiArcaneBuffet_Timer = 0; } else uiArcaneBuffet_Timer -= uiDiff; if (uiSummonEtherealSphere_Timer < uiDiff) { DoScriptText(SAY_SPAWN, m_creature); DoCast(m_creature, SPELL_SUMMON_ETHEREAL_SPHERE_1); if (HeroicMode) // extra one for heroic m_creature->SummonCreature(NPC_ETHEREAL_SPHERE, m_creature->GetPositionX()-5+rand()%10, m_creature->GetPositionY()-5+rand()%10, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 40000); uiSummonEtherealSphere_Timer = urand(45000, 47000); uiArcaneBuffet_Timer = urand(5000, 6000); } else uiSummonEtherealSphere_Timer -= uiDiff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; events.Update(uiDiff); while (uint32 eventId = events.ExecuteEvent()) switch (eventId) { case EVENT_BERSERK: DoScriptText(SAY_STEEL_BERSERK, m_creature); DoCast(m_creature, SPELL_BERSERK); break; case EVENT_FUSION_PUNCH: DoCast(m_creature->getVictim(), HEROIC(SPELL_FUSION_PUNCH, SPELL_FUSION_PUNCH_H)); events.ScheduleEvent(EVENT_FUSION_PUNCH, urand(13, 22)*IN_MILLISECONDS); break; case EVENT_STATIC_DISRUPTION: if (Unit *Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM_PLAYER, 0)) DoCast(Target, HEROIC(SPELL_STATIC_DISRUPTION, SPELL_STATIC_DISRUPTION_H)); events.ScheduleEvent(EVENT_STATIC_DISRUPTION, urand(20, 40)*IN_MILLISECONDS); break; case EVENT_OVERWHELMING_POWER: DoScriptText(SAY_STEEL_SPECIAL, m_creature); DoCast(m_creature->getVictim(), HEROIC(SPELL_OVERWHELMING_POWER, SPELL_OVERWHELMING_POWER_H)); events.ScheduleEvent(EVENT_OVERWHELMING_POWER, HEROIC(60, 35)*IN_MILLISECONDS); break; default: break; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (SummonTimer <= diff) { Summon(); SummonTimer = 15000; } else SummonTimer -= diff; if (MindFlayTimer <= diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_MIND_FLAY, H_SPELL_MIND_FLAY)); MindFlayTimer = 15000; } else MindFlayTimer -= diff; if (CurseFatigueTimer <= diff) { //WowWiki say "Curse of Fatigue-Kirk'thir will cast Curse of Fatigue on 2-3 targets periodically. " Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); Unit *pTarget_1 = SelectUnit(SELECT_TARGET_RANDOM, 1); DoCast(pTarget, HEROIC(SPELL_CURSE_OF_FATIGUE, H_SPELL_CURSE_OF_FATIGUE)); DoCast(pTarget_1, HEROIC(SPELL_CURSE_OF_FATIGUE, H_SPELL_CURSE_OF_FATIGUE)); CurseFatigueTimer = 10000; } else CurseFatigueTimer -= diff; if (!m_creature->HasAura(SPELL_FRENZY) && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10) m_creature->CastSpell(m_creature,SPELL_FRENZY,true); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; events.Update(diff); while(uint32 eventId = events.ExecuteEvent()) { switch(eventId) { case EVENT_ENRAGE: DoCast(SPELL_BERSERK); break; case EVENT_FUSION_PUNCH: DoCast(me->getVictim(), HEROIC(SPELL_FUSION_PUNCH_H, SPELL_FUSION_PUNCH)); events.ScheduleEvent(EVENT_FUSION_PUNCH, 13000 + (rand()%9)*1000); break; case EVENT_STATIC_DISRUPTION: { Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM); DoCast(pTarget, HEROIC(SPELL_STATIC_DISRUPTION_H, SPELL_STATIC_DISRUPTION)); events.ScheduleEvent(EVENT_STATIC_DISRUPTION, 20000 + (rand()%20)*1000); } break; case EVENT_OVERWHELMING_POWER: DoCast(me->getVictim(), HEROIC(SPELL_OVERWHELMING_POWER, SPELL_OVERWHELMING_POWER_H)); events.ScheduleEvent(EVENT_OVERWHELMING_POWER, (HeroicMode) ? 35000 : 60000); break; } } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (CheckIntenseColdTimer < diff && !MoreThanTwoIntenseCold) { std::list<HostileReference*> ThreatList = m_creature->getThreatManager().getThreatList(); for (std::list<HostileReference*>::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); itr++) { Unit *pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()); if (!pTarget || pTarget->GetTypeId() != TYPEID_PLAYER) continue; Aura *AuraIntenseCold = pTarget->GetAura(SPELL_INTENSE_COLD_TRIGGERED); if (AuraIntenseCold && AuraIntenseCold->GetStackAmount() > 2) { MoreThanTwoIntenseCold = true; break; } } CheckIntenseColdTimer = 2000; } else CheckIntenseColdTimer -= diff; if (!Enrage && (m_creature->GetHealth() < m_creature->GetMaxHealth() * 0.25)) { DoScriptText(SAY_ENRAGE, m_creature); DoCast(m_creature, SPELL_ENRAGE); Enrage = true; } if (CRYSTALFIRE_BREATH_Timer <= diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_CRYSTALFIRE_BREATH_N, SPELL_CRYSTALFIRE_BREATH_H)); CRYSTALFIRE_BREATH_Timer = 14000; } else CRYSTALFIRE_BREATH_Timer -=diff; if (TAIL_SWEEP_Timer <= diff) { DoCast(m_creature, SPELL_TAIL_SWEEP); TAIL_SWEEP_Timer = 5000; } else TAIL_SWEEP_Timer -=diff; if (CRYSTAL_CHAINS_CRYSTALIZE_Timer <= diff) { DoScriptText(SAY_CRYSTAL_NOVA, m_creature); if (!RegularMode) DoCast(m_creature, SPELL_CRYSTALIZE); else if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_CRYSTAL_CHAINS); CRYSTAL_CHAINS_CRYSTALIZE_Timer = HEROIC(30000,11000); } else CRYSTAL_CHAINS_CRYSTALIZE_Timer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; if (uiSpawnTimer <= diff) { for (uint8 i = 0; i < urand(2,HEROIC(3,5)); ++i) DoSpawnCreature(RAND(NPC_DRAKKARI_INVADER_1,NPC_DRAKKARI_INVADER_2), AddSpawnPoint.GetPositionX(), AddSpawnPoint.GetPositionY(), AddSpawnPoint.GetPositionZ(), AddSpawnPoint.GetOrientation(), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000); uiSpawnTimer = urand(30000,40000); } else uiSpawnTimer -= diff; if (uiConsumeTimer <= diff) { DoScriptText(SAY_CONSUME, m_creature); DoCast(HEROIC(SPELL_CONSUME, H_SPELL_CONSUME)); uiConsumeTimer = 15000; } else uiConsumeTimer -= diff; if (bAchiev) { if (uiAuraCountTimer <= diff) { if (m_creature->HasAura(HEROIC(SPELL_CONSUME,H_SPELL_CONSUME))) { Aura *pConsumeAura = m_creature->GetAura(HEROIC(SPELL_CONSUME,H_SPELL_CONSUME)); if (pConsumeAura && pConsumeAura->GetStackAmount() > 9) bAchiev = false; } uiAuraCountTimer = 16000; } else uiAuraCountTimer -= diff; } if (uiCrushTimer <= diff) { DoCastVictim(SPELL_CRUSH); uiCrushTimer = urand(10000,15000); } else uiCrushTimer -= diff; if (uiInfectedWoundTimer <= diff) { DoCastVictim(SPELL_INFECTED_WOUND); uiInfectedWoundTimer = urand(25000,35000); } else uiInfectedWoundTimer -= diff; if (uiExplodeCorpseTimer <= diff) { DoCast(HEROIC(SPELL_CORPSE_EXPLODE, H_SPELL_CORPSE_EXPLODE)); DoScriptText(SAY_EXPLODE, m_creature); uiExplodeCorpseTimer = urand(15000,19000); } else uiExplodeCorpseTimer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; // Without he comes up through the air to players on the bridge after krikthir if players crossing this bridge! CheckDistance(MaxDistance, diff); if (m_creature->HasAura(SPELL_WEB_FRONT_DOORS) || m_creature->HasAura(SPELL_WEB_SIDE_DOORS)) { if (IsCombatMovement()) SetCombatMovement(false); } else if (!IsCombatMovement()) SetCombatMovement(true); if (piercetimer <= diff) { DoCast(m_creature->getVictim(), SPELL_PIERCE_ARMOR); piercetimer = 8000; } else piercetimer -= diff; if (acidtimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, HEROIC(SPELL_ACID_CLOUD, SPELL_ACID_CLOUD_H)); acidtimer = urand(20000,30000); } else acidtimer -= diff; if (leechtimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, HEROIC(SPELL_LEECH_POISON, SPELL_LEECH_POISON_H)); leechtimer = urand(11000,14000); } else leechtimer -= diff; if (grabtimer <= diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) // Draws all players (and attacking Mobs) to itself. DoCast(pTarget, HEROIC(SPELL_WEB_GRAB, SPELL_WEB_GRAB_H)); grabtimer = urand(15000,30000); } else grabtimer -= diff; if (doorstimer <= diff) {/* Debuff bleibt auf den Spielern bis zum Tod... DoCast(m_creature, RAND(SPELL_WEB_FRONT_DOORS, SPELL_WEB_SIDE_DOORS)); */ doorstimer = urand(30000,60000); } else doorstimer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!pInstance) return; if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) != IN_PROGRESS && pInstance->GetData(DATA_ALL_INITIAND_DEAD)) MoveDown(); if (bOpFerok && !bOnGround && !bCanDown) Opfern(); if (bOpFerokFail && !bOnGround && !bCanDown) bCanDown = true; if (bCanDown) { MoveDown(); bCanDown = false; } if (bOnGround) { if (!UpdateVictim()) return; if (uiCycloneTimer <= diff) { DoCast(m_creature, HEROIC(SPELL_CYCLONE_STRIKE, SPELL_CYCLONE_STRIKE_H), false); uiCycloneTimer = urand(15000,30000); } else uiCycloneTimer -= diff; if (uiBoltTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) m_creature->CastSpell(pTarget, HEROIC(SPELL_LIGHTNING_BOLT, SPELL_LIGHTNING_BOLT_H), false); uiBoltTimer = urand(15000,30000); } else uiBoltTimer -= diff; if (uiThunderTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) m_creature->CastSpell(pTarget, HEROIC(SPELL_THUNDERSHOCK, SPELL_THUNDERSHOCK_H), false); uiThunderTimer = urand(15000,30000); } else uiThunderTimer -= diff; if (uiOpFerTimer <= diff) MoveUp(); else uiOpFerTimer -= diff; DoMeleeAttackIfReady(); } }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; //spam stormstrike in hc mode if spawns are dead if (!RegularMode) { if (pGuard1 && !pGuard1->isAlive() && pGuard2 && !pGuard2->isAlive()) { DoCast(m_creature->getVictim(), SPELL_STORMSTRIKE); } } if (uiEarthShieldTimer <= diff) { DoCast(m_creature, HEROIC(SPELL_EARTH_SHIELD, H_SPELL_EARTH_SHIELD)); uiEarthShieldTimer = 20000; } else uiEarthShieldTimer -= diff; if (uiChainHealTimer <= diff) { if (Creature *pTarget = GetChainHealTarget()) { DoCast(pTarget, HEROIC(SPELL_CHAIN_HEAL,H_SPELL_CHAIN_HEAL)); //If one of the adds is dead spawn heals faster uiChainHealTimer = ((pGuard1 && !pGuard1->isAlive()) || (pGuard2 && !pGuard2->isAlive()) ? 3000 : 8000) + rand()%3000; } } else uiChainHealTimer -= diff; if (uiBloodlustTimer <= diff) { DoCast(m_creature,SPELL_BLOODLUST); uiBloodlustTimer = urand(35000,45000); } else uiBloodlustTimer -= diff; if (uiEarthShockTimer <= diff) { DoCast(m_creature->getVictim(), SPELL_EARTH_SHOCK); uiEarthShockTimer = urand(8000,13000); } else uiEarthShockTimer -= diff; if (uiLightningBoltTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM,0,100,true)) DoCast(pTarget, SPELL_LIGHTNING_BOLT); uiLightningBoltTimer = urand(18000,24000); } else uiLightningBoltTimer -= diff; DoMeleeAttackIfReady(); }
void EnterCombat(Unit *who) { DoZoneInCombat(); DoCast(m_creature, HEROIC(SPELL_HIGH_VOLTAGE, SPELL_HIGH_VOLTAGE_H)); events.ScheduleEvent(EVENT_ENRAGE, 900000); UpdatePhase(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; //Sand Breath if (SandBreath_Timer <= diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_SAND_BREATH, H_SPELL_SAND_BREATH)); SandBreath_Timer = 15000+rand()%10000; } else SandBreath_Timer -= diff; //Time Stop if (TimeStop_Timer <= diff) { DoCast(m_creature->getVictim(), SPELL_TIME_STOP); TimeStop_Timer = 20000+rand()%15000; } else TimeStop_Timer -= diff; //Frenzy if (Frenzy_Timer <= diff) { DoScriptText(EMOTE_FRENZY, m_creature); DoCast(m_creature, SPELL_ENRAGE); Frenzy_Timer = 20000+rand()%15000; } else Frenzy_Timer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim() || !CheckInRoom()) return; events.Update(diff); while(uint32 eventId = events.ExecuteEvent()) { switch(eventId) { case EVENT_WRAP: for (uint32 i = 0; i < HEROIC(1,2); ++i) { if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, -SPELL_WEB_WRAP)) { target->RemoveAura(SPELL_WEB_SPRAY); uint32 pos = rand()%MAX_POS_WRAP; target->GetMotionMaster()->MoveJump(PosWrap[pos][0], PosWrap[pos][1], PosWrap[pos][2], 20, 20); if (Creature *wrap = DoSummon(MOB_WEB_WRAP, target, 0, 60000)) { wrap->AI()->SetGUID(target->GetGUID()); wrap->GetMotionMaster()->MoveJump(PosWrap[pos][0], PosWrap[pos][1], PosWrap[pos][2], 20, 20); } } } events.ScheduleEvent(EVENT_WRAP, 40000); return; case EVENT_SPRAY: DoCastAOE(SPELL_WEB_SPRAY); events.ScheduleEvent(EVENT_SPRAY, 40000); return; case EVENT_SHOCK: DoCastAOE(SPELL_POISON_SHOCK); events.ScheduleEvent(EVENT_SHOCK, 10000); return; case EVENT_POISON: DoCast(me->getVictim(), SPELL_NECROTIC_POISON); events.ScheduleEvent(EVENT_POISON, 30000); return; case EVENT_SUMMON: { uint32 amount = 8+rand()%2; for (uint32 i = 0; i < amount; ++i) DoSummon(MOB_SPIDERLING, me); events.ScheduleEvent(EVENT_SUMMON, 40000); break; } } } if (!enraged && HealthBelowPct(30)) { DoCast(me, SPELL_FRENZY); enraged = true; } else DoMeleeAttackIfReady(); }
void EnterCombat(Unit *who) { if (pInstance) pInstance->SetData(DATA_NETHERMANCER_EVENT, IN_PROGRESS); DoScriptText(SAY_AGGRO, m_creature); DoCast(who, HEROIC(SPELL_SUMMON_RAGIN_FLAMES, H_SPELL_SUMMON_RAGIN_FLAMES)); DoScriptText(SAY_SUMMON, m_creature); }
void Aggro(Unit* pWho) { // Summon turrets for (size_t i = 0; i < HEROIC(2, 4); i++) Creature *Turret = DoSpawnCreature(NPC_DEFENSE_TURRET, Turret_Pos[i][0], Turret_Pos[i][1], 0, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5*IN_MILLISECONDS); DoScriptText(SAY_AGGRO, m_creature); if (m_pInstance) m_pInstance->SetData(m_uiBossEncounterId, IN_PROGRESS); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; if (uiMojoWaveTimer <= diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_MOJO_WAVE, H_SPELL_MOJO_WAVE)); uiMojoWaveTimer = 15000; } else uiMojoWaveTimer -= diff; if (uiMojoPuddleTimer <= diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_MOJO_PUDDLE, H_SPELL_MOJO_PUDDLE)); uiMojoPuddleTimer = 18000; } else uiMojoPuddleTimer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; if (uiArcaneVacuumTimer <= diff) { DoCast(SPELL_ARCANE_VACUUM); uiArcaneVacuumTimer = 10000; } else uiArcaneVacuumTimer -= diff; if (uiBlizzardTimer <= diff) { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, HEROIC(SPELL_BLIZZARD,H_SPELL_BLIZZARD)); uiBlizzardTimer = 15000; } else uiBlizzardTimer -= diff; if (uiTailSweepTimer <= diff) { DoCast(HEROIC(SPELL_TAIL_SWEEP,H_SPELL_TAIL_SWEEP)); uiTailSweepTimer = 20000; } else uiTailSweepTimer -= diff; if (uiUncontrollableEnergyTimer <= diff) { DoCastVictim(HEROIC(SPELL_UNCONTROLLABLE_ENERGY,H_SPELL_UNCONTROLLABLE_ENERGY)); uiUncontrollableEnergyTimer = 25000; } else uiUncontrollableEnergyTimer -= diff; if (!RegularMode) if (uiManaDestructionTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_MANA_DESTRUCTION); uiManaDestructionTimer = 30000; } else uiManaDestructionTimer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; //Arcane Blast if (ArcaneBlast_Timer <= diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_ARCANE_BLAST, H_SPELL_ARCANE_BLAST)); ArcaneBlast_Timer = 15000+rand()%10000; } else ArcaneBlast_Timer -= diff; //Arcane Discharge if (ArcaneDischarge_Timer <= diff) { Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); DoCast(pTarget, HEROIC(SPELL_ARCANE_DISCHARGE, H_SPELL_ARCANE_DISCHARGE)); ArcaneDischarge_Timer = 20000+rand()%10000; } else ArcaneDischarge_Timer -= diff; //Time Lapse if (TimeLapse_Timer <= diff) { DoScriptText(SAY_BANISH, m_creature); DoCast(m_creature, SPELL_TIME_LAPSE); TimeLapse_Timer = 15000+rand()%10000; } else TimeLapse_Timer -= diff; if (HeroicMode) { if (Attraction_Timer <= diff) { DoCast(m_creature, SPELL_ATTRACTION); Attraction_Timer = 25000+rand()%10000; } else Attraction_Timer -= diff; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; if(SpellSummonVoidTimer < diff) { m_creature->CastSpell(m_creature->getVictim(),SPELL_SUMMON_VOID_SENTRY,false); SpellSummonVoidTimer = 20000; } else SpellSummonVoidTimer -=diff; if(SpellVoidShiftedTimer < diff && shiftcast) { if (Shifted) m_creature->CastSpell(Shifted,SPELL_VOID_SHIFTED,false); shiftcast = false; } else SpellVoidShiftedTimer -=diff; if(SpellVoidShiftTimer < diff) { Shifted = SelectUnit(SELECT_TARGET_RANDOM, 0); if (Shifted) { DoCast(Shifted, HEROIC(SPELL_VOID_SHIFT, H_SPELL_VOID_SHIFT)); shiftcast = true; SpellVoidShiftTimer = 20000; } SpellVoidShiftedTimer = 5000; } else SpellVoidShiftTimer -=diff; if(SpellShroudOfDarknessTimer < diff) { DoCast(m_creature->getVictim(), HEROIC(SPELL_SHROUD_OF_DARKNESS, H_SPELL_SHROUD_OF_DARKNESS)); SpellShroudOfDarknessTimer = 20000; } else SpellShroudOfDarknessTimer -=diff; DoMeleeAttackIfReady(); }
//when Hadronox kills any enemy (that includes a party member) she will regain 10% of her HP if the target had Leech Poison on void KilledUnit(Unit* Victim) { // not sure if this aura check is correct, I think it is though if (!Victim || !Victim->HasAura(HEROIC(SPELL_LEECH_POISON, SPELL_LEECH_POISON_H)) || !m_creature->isAlive()) return; uint32 health = (m_creature->GetMaxHealth()/100)*10; if ((m_creature->GetHealth()+health) >= m_creature->GetMaxHealth()) m_creature->SetHealth(m_creature->GetMaxHealth()); else m_creature->SetHealth(m_creature->GetHealth()+health); }
void EnterCombat(Unit* who) { DoScriptText(SAY_AGGRO, m_creature); DoCast(m_creature, HEROIC(SPELL_EARTH_SHIELD, H_SPELL_EARTH_SHIELD)); if (pInstance) { if (pInstance->GetData(DATA_WAVE_COUNT) == 6) pInstance->SetData(DATA_1ST_BOSS_EVENT, IN_PROGRESS); else if (pInstance->GetData(DATA_WAVE_COUNT) == 12) pInstance->SetData(DATA_2ND_BOSS_EVENT, IN_PROGRESS); } }
void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_SPARK_OF_IONAR) { pSummoned->CastSpell(pSummoned, HEROIC(SPELL_SPARK_VISUAL_TRIGGER_N,SPELL_SPARK_VISUAL_TRIGGER_H), true); Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0); if (m_creature->getVictim()) pSummoned->AI()->AttackStart(pTarget ? pTarget : m_creature->getVictim()); m_lSparkGUIDList.push_back(pSummoned->GetGUID()); } }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (VoidBlast_Timer <= diff) { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { DoCast(pTarget, HEROIC(SPELL_VOID_BLAST, H_SPELL_VOID_BLAST)); VoidBlast_Timer = 500; ++VoidBlast_Counter; } if (VoidBlast_Counter == 5) { VoidBlast_Timer = 15000+rand()%10000; VoidBlast_Counter = 0; } } else VoidBlast_Timer -= diff; if (!VoidBlast_Counter) { if (DarkShell_Timer <= diff) { if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(true); DoScriptText(EMOTE_DARK_SHELL, m_creature); DoCast(m_creature, HEROIC(SPELL_DARK_SHELL, H_SPELL_DARK_SHELL)); DarkShell_Timer = 20000; } else DarkShell_Timer -= diff; } DoMeleeAttackIfReady(); }
void Aggro(Unit* pWho) { if (Creature* Brundir = GET_CREATURE(DATA_BRUNDIR)) if(Brundir->isAlive()) Brundir->AddThreat(pWho); if (Creature* Molgeim = GET_CREATURE(DATA_MOLGEIM)) if(Molgeim->isAlive()) Molgeim->AddThreat(pWho); DoCast(m_creature, HEROIC(SPELL_HIGH_VOLTAGE, SPELL_HIGH_VOLTAGE_H), true); events.RescheduleEvent(EVENT_BERSERK, BERSERK_TIMER); UpdatePhase(); DoScriptText(SAY_STEEL_AGGRO, m_creature); if (m_pInstance) m_pInstance->SetData(m_uiBossEncounterId, IN_PROGRESS); }
void SpellHit(Unit* caster, const SpellEntry *spell) { if (spell->Id == SPELL_WIDOWS_EMBRACE || spell->Id == H_SPELL_WIDOWS_EMBRACE) { if (m_creature->HasAura(HEROIC(SPELL_FRENZY,H_SPELL_FRENZY))) { if (!delayFrenzy) { events.DelayEvents(30000, 1); delayFrenzy = true; } } else events.ScheduleEvent(EVENT_AFTERENRAGE, 60000); } }
void UpdateAI(const uint32 diff) { if (!UpdateVictimWithGaze() || !CheckInRoom()) return; events.Update(diff); while(uint32 eventId = events.ExecuteEvent()) { switch(eventId) { case EVENT_WOUND: DoCast(me->getVictim(), SPELL_MORTAL_WOUND); events.ScheduleEvent(EVENT_WOUND, 10000); return; case EVENT_ENRAGE: DoCast(me, SPELL_ENRAGE); events.ScheduleEvent(EVENT_ENRAGE, 30000); return; case EVENT_DECIMATE: DoCastAOE(SPELL_DECIMATE); events.ScheduleEvent(EVENT_DECIMATE, 105000); return; case EVENT_BERSERK: DoCast(me, SPELL_BERSERK); return; case EVENT_SUMMON: for(uint32 i = 0; i < HEROIC(1,2); ++i) DoSummon(MOB_ZOMBIE, triggers[rand()%3]); events.ScheduleEvent(EVENT_SUMMON, 10000); return; } } if (me->getVictim()->GetEntry() == MOB_ZOMBIE) { if (me->IsWithinMeleeRange(me->getVictim())) { me->Kill(me->getVictim()); me->ModifyHealth(me->GetMaxHealth() * 0.05f); } } else DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (MortalWound_Timer <= diff) { DoCast(m_creature->getVictim(),HEROIC(SPELL_MORTAL_WOUND, H_SPELL_MORTAL_WOUND)); MortalWound_Timer = 5000+rand()%8000; } else MortalWound_Timer -= diff; if (Surge_Timer <= diff) { DoScriptText(SAY_SURGE, m_creature); if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(pTarget,SPELL_SURGE); Surge_Timer = 5000+rand()%8000; } else Surge_Timer -= diff; if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) { if (Retaliation_Timer <= diff) { DoCast(m_creature,SPELL_RETALIATION); Retaliation_Timer = 30000; } else Retaliation_Timer -= diff; } if (!YelledForHeal) { if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) { DoScriptText(SAY_HEAL, m_creature); YelledForHeal = true; } } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; //Curse of twisted flesh timer if (Curse_flesh_Timer <= diff) { DoCast(m_creature->getVictim(), SPELL_CURSE_OF_TWISTED_FLESH); Curse_flesh_Timer = 37000; } else Curse_flesh_Timer -= diff; //Shadow bolt timer if (Shadow_bolt_Timer <= diff) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, HEROIC(SPELL_SHADOW_BOLT, H_SPELL_SHADOW_BOLT)); Shadow_bolt_Timer = urand(8000,12000); } else Shadow_bolt_Timer -= diff; //Steal Flesh timer if (Steal_flesh_Timer <= diff) { DoScriptText(RAND(SAY_STEAL_FLESH_1,SAY_STEAL_FLESH_2,SAY_STEAL_FLESH_3), m_creature); if (Unit* random_pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(random_pTarget, SPELL_STEAL_FLESH); Steal_flesh_Timer = 10000; } else Steal_flesh_Timer -= diff; //Summon ghouls timer if (Summon_ghouls_Timer <= diff) { DoScriptText(RAND(SAY_SUMMON_GHOULS_1,SAY_SUMMON_GHOULS_2), m_creature); if (Unit* random_pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(random_pTarget, SPELL_SUMMON_GHOULS); Summon_ghouls_Timer = 10000; } else Summon_ghouls_Timer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (IsOutOfCombatArea(m_creature)) { EnterEvadeMode(); return; } events.Update(uiDiff); while (uint32 eventId = events.ExecuteEvent()) switch (eventId) { case EVENT_BERSERK: DoScriptText(SAY_BERSERK, m_creature); DoCast(m_creature, SPELL_BERSERK); break; case EVENT_CHAIN_LIGHTNING: DoCast(m_creature->getVictim(), HEROIC(SPELL_CHAIN_LIGHTNING, SPELL_CHAIN_LIGHTNING_H)); events.ScheduleEvent(EVENT_CHAIN_LIGHTNING, CHAIN_LIGHTNING_TIMER); break; case EVENT_UNBALANCING_STRIKE: DoCast(m_creature->getVictim(), SPELL_UNBALANCING_STRIKE); events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, UNBALANCING_STRIKE_TIMER); break; case EVENT_LIGHTNING_CHARGE: //DoCast(m_creature, SPELL_LIGHTNING_CHARGE_BUFF, true); //DoCast(m_creature->getVictim(), SPELL_LIGHTNING_CHARGE_DMG); events.ScheduleEvent(EVENT_LIGHTNING_CHARGE, LIGHTNING_CHARGE_TIMER); break; default: break; } DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (Phase == INTRO) { return; } //Return since we have no target if (!UpdateVictim()) return; if (uiCurseOfExertionTimer < diff) { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_CURSE_OF_EXERTION); uiCurseOfExertionTimer = 9300; } else uiCurseOfExertionTimer -= diff; if (uiWoundingStrikeTimer < diff) { DoCastVictim(HEROIC(SPELL_WOUNDING_STRIKE, H_SPELL_WOUNDING_STRIKE)); uiWoundingStrikeTimer = 5300; } else uiWoundingStrikeTimer -= diff; if (uiTimeStopTimer < diff) { DoCastAOE(SPELL_TIME_STOP); uiTimeStopTimer = 21300; } else uiTimeStopTimer -= diff; if (uiTimeWarpTimer < diff) { DoScriptText(RAND(SAY_TIME_WARP_1,SAY_TIME_WARP_2,SAY_TIME_WARP_3), m_creature); DoCastAOE(SPELL_TIME_WARP); uiTimeWarpTimer = 25300; } else uiTimeWarpTimer -= diff; DoMeleeAttackIfReady(); }