void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; DoSpecialThings(diff, DO_COMBAT_N_SPEED, 200.0f, 1.6f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_HEAL: { AddSpellToCast(SPELL_HEAL, CAST_SELF); events.ScheduleEvent(eventId, urand(10000, 35000)); break; } case EVENT_SHIELD: { AddSpellToCast(SPELL_GREATER_PW_SHIELD, CAST_SELF); AddSpellToCast(SPELL_PRAYEROFHEALING, CAST_SELF); events.ScheduleEvent(eventId, urand(30000, 40000)); break; } } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (ShadowfuryTimer < diff) { if (me->IsWithinMeleeRange(me->getVictim()) && roll_chance_f(15)) { AddSpellToCast(SPELL_SHADOW_FURY, CAST_NULL); ShadowfuryTimer = 5000; } ShadowfuryTimer = 1500; } else ShadowfuryTimer -= diff; if (DarkstrikeTimer < diff) { if (!me->IsNonMeleeSpellCasted(false)) { //If we are within range melee the target if (me->IsWithinMeleeRange(me->getVictim())) AddSpellToCast(SPELL_DARK_STRIKE, CAST_TANK); } DarkstrikeTimer = 1000; } else DarkstrikeTimer -= diff; CastNextSpellIfAnyAndReady(); }
void UpdateAI(const uint32 diff) { if (IntroStepCounter < 10) { if (IntroYellTimer < diff) { IntroYellTimer = IntroStep(++IntroStepCounter); } else IntroYellTimer -= diff; } if (!UpdateVictim()) return; if (SpecialTimer < diff) { if (pInstance->GetData(DATA_SACROLASH) == DONE) { AddSpellToCastWithScriptText(SPELL_SHADOW_NOVA, CAST_RANDOM_WITHOUT_TANK, EMOTE_SHADOW_NOVA, false, true); SpecialTimer = urand(14000, 16000); } else { if(Unit* target = GetConflagTarget()) AddSpellToCastWithScriptText(target , SPELL_CONFLAGRATION, EMOTE_CONFLAGRATION, false, true); DoScriptText(YELL_CANFLAGRATION, me); SpecialTimer = urand(30000,35000); } } else SpecialTimer -= diff; if (FlamesearTimer < diff) { AddSpellToCast(SPELL_FLAME_SEAR, CAST_SELF); FlamesearTimer = 10000; } else FlamesearTimer -=diff; if (PyrogenicsTimer < diff) { AddSpellToCast(SPELL_PYROGENICS, CAST_SELF); PyrogenicsTimer = 15000; } else PyrogenicsTimer -= diff; if (EnrageTimer < diff) { AddSpellToCastWithScriptText(SPELL_ENRAGE, CAST_SELF, YELL_BERSERK); EnrageTimer = 360000; } else EnrageTimer -= diff; CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->isInCombat()) if(yelltimer < diff) { me->Yell(RAND(YELL_OOC1,YELL_OOC2,YELL_OOC3,YELL_OOC4,YELL_OOC5,YELL_OOC6),0,0); yelltimer = urand(60000,120000); } else yelltimer -=diff; if(!UpdateVictim()) return; if(hamstringtimer < diff) { AddSpellToCast(SPELL_HAMSTRING); hamstringtimer = 9000; } else hamstringtimer -= diff; if(headcracktimer < diff) { AddSpellToCast(SPELL_HEAD_CRACK,CAST_RANDOM); headcracktimer = urand(20000,25000); } else headcracktimer -= diff; DoMeleeAttackIfReady(); CastNextSpellIfAnyAndReady(diff); }
void UpdateAI(const uint32 diff) { if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat()) { if(OOCTimer < diff) { HandleOffCombatEffects(); OOCTimer = 10000; } else OOCTimer -= diff; } if(!UpdateVictim()) return; if(Drink_Timer < diff) { AddSpellToCast(SPELL_DRINK_FEL_INFUSION, CAST_SELF); Drink_Timer = HeroicMode?urand(10000, 18000):urand(15000, 25000); } else Drink_Timer -= diff; if(Wretched_Strike_Timer < diff) { AddSpellToCast(m_creature->getVictim(), SPELL_WRETCHED_STRIKE); Wretched_Strike_Timer = urand(7000, 16000); } else Wretched_Strike_Timer -= diff; CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (SpecialTimer < diff) { if (pInstance->GetData(DATA_ALYTHESS) == DONE) { AddSpellToCastWithScriptText(SPELL_CONFLAGRATION, CAST_RANDOM_WITHOUT_TANK, EMOTE_CONFLAGRATION, false, true); SpecialTimer = urand(14000, 16000); } else { if(Unit* target = GetNovaTarget()) AddSpellToCastWithScriptText(target, SPELL_SHADOW_NOVA, EMOTE_SHADOW_NOVA, false, true); DoScriptText(YELL_SHADOW_NOVA, me); SpecialTimer = urand(30000,35000); } } else SpecialTimer -= diff; if (ConfoundingblowTimer < diff) { AddSpellToCast(SPELL_CONFOUNDING_BLOW, CAST_TANK); ConfoundingblowTimer = urand(20000, 25000); } else ConfoundingblowTimer -= diff; if (ShadowimageTimer < diff) { for (int i = 0; i < 3; i++) DoSpawnCreature(MOB_SHADOW_IMAGE, 0, 0 , 0, frand(0, 2*M_PI), TEMPSUMMON_TIMED_DESPAWN, 15000); ShadowimageTimer = 20000; } else ShadowimageTimer -= diff; if (ShadowbladesTimer < diff) { AddSpellToCast(SPELL_SHADOW_BLADES, CAST_SELF); ShadowbladesTimer = 10000; } else ShadowbladesTimer -= diff; if (EnrageTimer < diff) { AddSpellToCastWithScriptText(SPELL_ENRAGE, CAST_SELF, YELL_ENRAGE); EnrageTimer = 360000; } else EnrageTimer -= diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (CheckTimer < diff) { if (!m_creature->IsWithinDistInMap(&wLoc, 20.0f)) EnterEvadeMode(); me->SetSpeed(MOVE_WALK, 1.5f, true); me->SetSpeed(MOVE_RUN, 1.5f, true); CheckTimer = 2000; } else CheckTimer -= diff; if (chargeTimer < diff) { Unit * target = SelectUnit(SELECT_TARGET_RANDOM, 0, 25.0f, true, 0, 8.0f); if (target) AddSpellToCast(target, AV_VO_CHARGE); chargeTimer = urand(7500, 20000); } else chargeTimer -= diff; if (cleaveTimer < diff) { AddSpellToCast(AV_VO_CLEAVE, CAST_TANK); cleaveTimer = urand(5000, 10000); } else cleaveTimer -= diff; if (demoShoutTimer < diff) { AddSpellToCast(AV_VO_DEMOSHOUT, CAST_NULL); demoShoutTimer = urand(14000, 25000); } else demoShoutTimer -= diff; if (whirlwindTimer < diff) { AddSpellToCast(AV_VO_WHIRLWIND, CAST_SELF); whirlwindTimer = urand(9000, 13000); } else whirlwindTimer -= diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; DoSpecialThings(diff, DO_EVERYTHING); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_CORRUPTED_MIND: { AddSpellToCast(SPELL_CORRUPTED_MIND, CAST_NULL); events.ScheduleEvent(EVENT_CORRUPTED_MIND, 62000); break; } case EVENT_POISON_AURA: { AddSpellToCast(SPELL_POISON_AURA, CAST_NULL); events.ScheduleEvent(EVENT_POISON_AURA, 12000); break; } case EVENT_INEVITABLE_DOOM_5MIN: { inevitableTimer = 15000; break; } case EVENT_INEVITABLE_DOOM: { AddSpellToCast(SPELL_INEVITABLE_DOOM, CAST_NULL); events.ScheduleEvent(EVENT_INEVITABLE_DOOM, inevitableTimer); break; } case EVENT_REMOVE_CURSE: { AddSpellToCast(SPELL_REMOVE_CURSE, CAST_SELF); events.ScheduleEvent(EVENT_REMOVE_CURSE, 30000); break; } case EVENT_SUMMON_SPORE: { for (uint8 i = 0; i < 3; ++i) m_creature->SummonCreature(16286, SporesLocations[i][0], SporesLocations[i][1], SporesLocations[i][2], 0, TEMPSUMMON_TIMED_DESPAWN, 12000); break; } default: break; } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (CheckTimer < diff) { if (!m_creature->IsWithinDistInMap(&wLoc, 20.0f)) EnterEvadeMode(); me->SetSpeed(MOVE_WALK, 2.0f, true); me->SetSpeed(MOVE_RUN, 2.0f, true); CheckTimer = 2000; } else CheckTimer -= diff; if (AvatarTimer < diff) { ForceSpellCast(m_creature->getVictim(), SPELL_AVATAR); AvatarTimer = urand(15000, 20000); } else AvatarTimer -= diff; if (ThunderclapTimer < diff) { AddSpellToCast(m_creature->getVictim(), SPELL_THUNDERCLAP); ThunderclapTimer = urand(5000, 15000); } else ThunderclapTimer -= diff; if (StormboltTimer < diff) { Unit * victim = SelectUnit(SELECT_TARGET_RANDOM, 1, 30.0f, true); if (victim) AddSpellToCast(victim, SPELL_STORMBOLT); StormboltTimer = urand(10000, 25000); } else StormboltTimer -= diff; if (YellTimer < diff) { DoScriptText(RAND(YELL_RANDOM1, YELL_RANDOM2, YELL_RANDOM3, YELL_RANDOM4, YELL_RANDOM5, YELL_RANDOM6, YELL_RANDOM7), m_creature); YellTimer = urand(20000, 30000); //20 to 30 seconds } else YellTimer -= diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (TransitionTimer) { if (TransitionTimer <= diff) { if(Unit* Muru = me->GetUnit(pInstance->GetData64(DATA_MURU))) { Muru->SetVisibility(VISIBILITY_OFF); Muru->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); } me->SetRooted(false); AttackStart(me->getVictim()); DoCast(me, SPELL_NEGATIVE_ENERGY_PERIODIC_E); TransitionTimer = 0; } else TransitionTimer -= diff; return; } if (!UpdateVictim()) return; DoSpecialThings(diff, DO_COMBAT_N_EVADE, 100.0f); if (EnrageTimer < diff) { AddSpellToCast(me, SPELL_ENRAGE); EnrageTimer = 60000; } else EnrageTimer -= diff; if (DarknessTimer < diff) { if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true)) AddSpellToCast(target, SPELL_DARKNESS); DarknessTimer = 15000; } else DarknessTimer -= diff; if (BlackHole < diff) { if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100, true, me->getVictimGUID(), 10.0)) AddSpellToCast(target, SPELL_BLACK_HOLE); BlackHole = urand(15000, 18000); } else BlackHole -= diff; DoMeleeAttackIfReady(); CastNextSpellIfAnyAndReady(); }
void UpdateAI(const uint32 diff) { events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EMBERSEER_EVENT_GROWING: { me->CastSpell(me, SPELL_GROWING, true); break; } case EMBERSEER_EVENT_TRANSFORM: { DoScriptText(-2100023, me); DoScriptText(-2100024, me); me->CastSpell(me, SPELL_TRANSFORM, true); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); events.SetPhase(2); events.ScheduleEvent(EMBERSEER_EVENT_FIRENOVA, 6000, 0, 2); events.ScheduleEvent(EMBERSEER_EVENT_FLAMEBUFFET, 3000, 0, 2); events.ScheduleEvent(EMBERSEER_EVENT_PYROBLAST, 14000, 0, 2); break; } case EMBERSEER_EVENT_FIRENOVA: { AddSpellToCast(SPELL_FIRENOVA, CAST_SELF); events.ScheduleEvent(EMBERSEER_EVENT_FIRENOVA, 6000, 0, 2); break; } case EMBERSEER_EVENT_FLAMEBUFFET: { AddSpellToCast(SPELL_FLAMEBUFFET, CAST_TANK); events.ScheduleEvent(EMBERSEER_EVENT_FLAMEBUFFET, 3000, 0, 2); break; } case EMBERSEER_EVENT_PYROBLAST: { AddSpellToCast(SPELL_PYROBLAST, CAST_RANDOM); events.ScheduleEvent(EMBERSEER_EVENT_PYROBLAST, 14000, 0, 2); break; } } } if (!UpdateVictim()) { return; } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!UpdateVictim()) { //UpdateAIOOC(diff); // not working in 100% return; } if(Shout_Timer < diff) { AddSpellToCast(SPELL_FRIGHTENING_SHOUT, CAST_TANK); Shout_Timer = urand(30000, 40000); } else Shout_Timer -= diff; if(Knockback_Timer < diff) { AddSpellToCast(SPELL_KNOCKBACK, CAST_TANK); Knockback_Timer = urand(10000, 15000); } else Knockback_Timer -= diff; if(Execute_Timer < diff) { if(me->getVictim()->GetHealth() * 5 <= me->getVictim()->GetMaxHealth()) // below 20% { AddSpellToCast(SPELL_EXECUTE, CAST_TANK); Execute_Timer = 30000; } } else Execute_Timer -= diff; if(Cleave_Timer < diff) { AddSpellToCast(SPELL_MORTAL_CLEAVE, CAST_TANK); Cleave_Timer = urand(3000, 6000); } else Cleave_Timer -= diff; if(!Frenzy_Casted && HealthBelowPct(50)) { AddSpellToCast(SPELL_FRENZY, CAST_SELF); Frenzy_Casted = true; } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; DoSpecialThings(diff, DO_EVERYTHING, 60.0f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_BLAU_MARK: { AddSpellToCast(SPELL_MARK_OF_BLAUMEUX, CAST_NULL); events.ScheduleEvent(EVENT_BLAU_MARK, 12000); break; } case EVENT_BLAU_VOID_ZONE: { if (Unit * tmpUnit = SelectUnit(SELECT_TARGET_RANDOM, 0, 45.0f)) AddSpellToCast(tmpUnit, SPELL_VOID_ZONE); events.ScheduleEvent(EVENT_BLAU_VOID_ZONE, 12000); break; } default: break; } } // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds if (!ShieldWall1) { if (HealthBelowPct(50)) { AddSpellToCast(SPELL_SHIELDWALL, CAST_SELF); ShieldWall1 = true; } } else { if (!ShieldWall2 && HealthBelowPct(20)) { AddSpellToCast(SPELL_SHIELDWALL, CAST_SELF); ShieldWall2 = true; } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; DoSpecialThings(diff, DO_EVERYTHING, 60.0f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_ZELIEK_MARK: { AddSpellToCast(SPELL_MARK_OF_ZELIEK, CAST_NULL); events.ScheduleEvent(EVENT_ZELIEK_MARK, 12000); break; } case EVENT_ZELIEK_WRATH: { AddSpellToCast(SPELL_HOLY_WRATH, CAST_TANK); events.ScheduleEvent(EVENT_ZELIEK_WRATH, 12000); break; } default: break; } } // Shield Wall - All 4 horsemen will shield wall at 50% hp and 20% hp for 20 seconds if (!ShieldWall1) { if (HealthBelowPct(50)) { AddSpellToCast(SPELL_SHIELDWALL, CAST_SELF); ShieldWall1 = true; } } else { if (!ShieldWall2 && HealthBelowPct(20)) { AddSpellToCast(SPELL_SHIELDWALL, CAST_SELF); ShieldWall2 = true; } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim() ) return; if (checkTimer < diff) { if (!me->IsWithinDistInMap(&pos, 105.0f)) { EnterEvadeMode(); return; } checkTimer = 3000; } else checkTimer -= diff; if (Rage_Timer < diff) { Creature* distiller = GetClosestCreatureWithEntry(me, 17954, 100); if (distiller) { float x, y, z; distiller->GetNearPoint(x, y, z, INTERACTION_DISTANCE); me->GetMotionMaster()->MovePoint(1, x, y, z); CurrentDistiller = distiller->GetGUID(); } Rage_Timer = 15000+rand()%15000; }else Rage_Timer -= diff; //Reflection_Timer if (Reflection_Timer < diff) { AddSpellToCast(me, SPELL_SPELL_REFLECTION); Reflection_Timer = 15000+rand()%10000; }else Reflection_Timer -= diff; //Impale_Timer if (Impale_Timer < diff) { if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) AddSpellToCast(target,SPELL_IMPALE); Impale_Timer = 7500+rand()%5000; }else Impale_Timer -= diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!UpdateVictim()) return; if(HealingWard_Timer < diff) { AddSpellToCast(m_creature, SPELL_HEALING_WARD); HealingWard_Timer = 30000; } else HealingWard_Timer -= diff; if(NovaTotem_Timer < diff) { AddSpellToCast(m_creature, SPELL_CORRUPTED_NOVA_TOTEM); NovaTotem_Timer = 45000; } else NovaTotem_Timer -= diff; if(LightningBolt_Timer < diff) { if (HeroicMode) AddCustomSpellToCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT,142,0,0); else AddCustomSpellToCast(m_creature->getVictim(), SPELL_LIGHTNING_BOLT,175,0,0); LightningBolt_Timer = 10000; } else LightningBolt_Timer -= diff; if(EarthGrab_Timer < diff) { AddSpellToCast(m_creature, SPELL_EARTHGRAB_TOTEM); EarthGrab_Timer = 30000; } else EarthGrab_Timer -= diff; if(StoneSkin_Timer < diff) { AddSpellToCast(m_creature, SPELL_STONESKIN_TOTEM); StoneSkin_Timer = 60000; } else StoneSkin_Timer -= diff; CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat()) { if(OOCTimer < diff) { HandleOffCombatEffects(); OOCTimer = 10000; } else OOCTimer -= diff; } if(!UpdateVictim()) return; if(Seal_Timer < diff) { AddSpellToCast(SPELL_SEAL_OF_WRATH, CAST_SELF); Seal_Timer = urand(20000, 30000); } else Seal_Timer -= diff; if(Judgement_Timer < diff) { if(me->HasAura(SPELL_SEAL_OF_WRATH, 0)) { AddSpellToCast(me->getVictim(), SPELL_JUDGEMENT_OF_WRATH); me->RemoveAurasDueToSpell(SPELL_SEAL_OF_WRATH); Seal_Timer = urand(5000, 10000); Judgement_Timer = urand(13000, 20000); } } else Judgement_Timer -= diff; if(Holy_Light_Timer < diff) { Unit* healTarget = SelectLowestHpFriendly(40.0f, 10000); AddSpellToCast(healTarget, SPELL_HOLY_LIGHT); Holy_Light_Timer = urand(7000, 10000); } else Holy_Light_Timer -= diff; CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void DoMeleeAttackIfReady() { if (me->hasUnitState(UNIT_STAT_CASTING) || m_submerged || m_rotating || RotType) return; //Make sure our attack is ready and we aren't currently casting before checking distance if (me->isAttackReady()) { //If we are within range melee the target if (me->IsWithinMeleeRange(me->getVictim())) { me->AttackerStateUpdate(me->getVictim()); me->resetAttackTimer(); } else { if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO, 0, 5.0f, true)) { me->AttackerStateUpdate(pTarget); me->resetAttackTimer(); } else { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0, 100.0f, true, 0, 5.0f)) AddSpellToCast(pTarget, SPELL_WATERBOLT); else EnterEvadeMode(); } } } }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; //AmnenarsWrath_Timer if (AmnenarsWrath_Timer <= diff) { AddSpellToCast(me->getVictim(),SPELL_AMNENNARSWRATH); AmnenarsWrath_Timer = 12000; } else AmnenarsWrath_Timer -= diff; //FrostBolt_Timer if (FrostBolt_Timer <= diff) { Unit *pTarget = NULL; pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); if (pTarget) AddSpellToCast(pTarget,SPELL_FROSTBOLT); FrostBolt_Timer = 8000; } else FrostBolt_Timer -= diff; if (!Spectrals && me->GetHealth()*100 / me->GetMaxHealth() < 50) { DoYell(SAY_1, LANG_UNIVERSAL, NULL); DoPlaySoundToSet(me, SOUND_SUMMON); Unit *pTarget = NULL; pTarget = SelectUnit(SELECT_TARGET_RANDOM,0); if (pTarget) { SummonSpectrals(pTarget); SummonSpectrals(pTarget); SummonSpectrals(pTarget); } Spectrals = true; } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; DoSpecialThings(diff, DO_EVERYTHING, 120.0f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_IMPALE: { //Cast Impale on a random target //Do NOT cast it when we are afflicted by locust swarm if (!m_creature->HasAura(SPELL_LOCUSTSWARM,1)) AddSpellToCast(SPELL_IMPALE, CAST_RANDOM); events.ScheduleEvent(EVENT_IMPALE, 15000); break; } case EVENT_SWARM: { AddSpellToCast(SPELL_LOCUSTSWARM, CAST_SELF); events.ScheduleEvent(EVENT_SWARM, 90000); break; } case EVENT_SUMMON: { AddSpellToCast(SPELL_SUMMONGUARD, CAST_SELF); events.ScheduleEvent(EVENT_SUMMON, 45000); break; } default: break; } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) { if(check_Timer < diff) { if (!m_creature->IsNonMeleeSpellCasted(false)) if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100, m_creature)) { uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature); if(Unit *channeled = Unit::GetUnit(*m_creature, channeler)) DoCast(channeled,SPELL_CHANNELING); } check_Timer = 5000; } else check_Timer -= diff; return; } if (MarkOfShadow_Timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) AddSpellToCast(target,SPELL_MARK_OF_SHADOW); MarkOfShadow_Timer = 15000+rand()%5000; } else MarkOfShadow_Timer -=diff; if (ShadowBolt_Timer < diff) { AddSpellToCast(me->getVictim(), SPELL_SHADOW_BOLT); ShadowBolt_Timer = urand(5000, 6000); } else ShadowBolt_Timer -=diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->isInCombat()) { if(SummonImp_Timer < diff) { // check if still having pet ;] if(!me->GetMap()->GetCreature(SummonGUID)) SummonGUID = 0; if(!SummonGUID) DoCast(m_creature, SPELL_SUMMON_SUNBLADE_IMP, false); SummonImp_Timer = 15000; } else SummonImp_Timer -= diff; } if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat()) { if(OOCTimer < diff) { HandleOffCombatEffects(); OOCTimer = 10000; } else OOCTimer -= diff; } if(!UpdateVictim()) return; if(FelArmor_Timer < diff) { if(!me->HasAura(SPELL_FEL_ARMOR, 0)) DoCast(me, SPELL_FEL_ARMOR, true); FelArmor_Timer = 120000; } else FelArmor_Timer -= diff; if(Immolate_Timer < diff) { ClearCastQueue(); AddSpellToCast(m_creature->getVictim(), SPELL_IMMOLATE); Immolate_Timer = urand(16000, 25000); } else Immolate_Timer -= diff; CheckCasterNoMovementInRange(diff); CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat()) { if(OOCTimer < diff) { HandleOffCombatEffects(); OOCTimer = 10000; } else OOCTimer -= diff; } if(!UpdateVictim()) return; if(Poison_Timer < diff) { AddSpellToCast(SPELL_INJECT_POISON, CAST_SELF); Poison_Timer = urand(16000, 20000); } else Poison_Timer -= diff; if(Prayer_of_Mending_Timer < diff) { if(CanCastPoM()) // only one PoM active at a time { if(Unit* healTarget = SelectLowestHpFriendly(40)) AddSpellToCast(healTarget, SPELL_PRAYER_OF_MENDING); } Prayer_of_Mending_Timer = urand(7000, 12000); } else Prayer_of_Mending_Timer -= diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->isInCombat()) if(yelltimer < diff) { me->Yell(RAND(YELL_OOC1,YELL_OOC2,YELL_OOC3,YELL_OOC4,YELL_OOC5,YELL_OOC6),0,0); yelltimer = urand(60000,120000); } else yelltimer -=diff; if(!UpdateVictim()) return; if(hamstringtimer < diff) { AddSpellToCast(SPELL_DISARM); hamstringtimer = 9000; } else hamstringtimer -= diff; if(headcracktimer < diff) { AddSpellToCast(SPELL_GEYSER); headcracktimer = urand(20000,25000); } else headcracktimer -= diff; if (HealthBelowPct(20.0f) && !frenzy) { ForceSpellCast(me, SPELL_FRENZY, INTERRUPT_AND_CAST_INSTANTLY); frenzy = true; } DoMeleeAttackIfReady(); CastNextSpellIfAnyAndReady(diff); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; DoSpecialThings(diff, DO_COMBAT_N_EVADE, 100.0f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_UNBALANCING_STRIKE: { AddSpellToCast(SPELL_UNBALANCINGSTRIKE, CAST_TANK); events.ScheduleEvent(EVENT_UNBALANCING_STRIKE, 30000); break; } case EVENT_DISTRUPTING_SHOUT: { AddSpellToCast(SPELL_DISRUPTINGSHOUT, CAST_NULL); events.ScheduleEvent(EVENT_DISTRUPTING_SHOUT, 25000); break; } case EVENT_COMMAND_SOUND: { DoPlaySoundToSet(m_creature, RAND(SOUND_COMMND1, SOUND_COMMND2, SOUND_COMMND3, SOUND_COMMND4, SOUND_COMMND5)); events.ScheduleEvent(EVENT_COMMAND_SOUND, 40000); break; } default: break; } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; DoSpecialThings(diff, DO_COMBAT_N_SPEED, 200.0f, 1.6f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_POLYMORPH: { AddSpellToCast(SPELL_GREATER_POLYMORPH, CAST_TANK); events.ScheduleEvent(eventId, urand(10000, 20000)); break; } case EVENT_ARCANE_SHOCK: { AddSpellToCast(SPELL_ARCANE_SHOCK); events.ScheduleEvent(eventId, urand(15000, 20000)); break; } case EVENT_ARCANE_EXPLO: { AddSpellToCast(SPELL_ARCANE_EXPLOSION, CAST_SELF); events.ScheduleEvent(eventId, 30000); break; } } } CheckCasterNoMovementInRange(diff, 42.0f); CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; DoSpecialThings(diff, DO_EVERYTHING, 120.0f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_POISONBOLT_VOLLEY: { AddSpellToCast(SPELL_POISONBOLT_VOLLEY, CAST_NULL); events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, 11000); break; } case EVENT_RAIN_OF_FIRE: { AddSpellToCast(SPELL_RAIN_OF_FIRE, CAST_RANDOM); events.ScheduleEvent(EVENT_RAIN_OF_FIRE, 16000); break; } case EVENT_ENRAGE: { AddSpellToCast(SPELL_ENRAGE, CAST_SELF); events.ScheduleEvent(EVENT_ENRAGE, 61000); break; } default: break; } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat()) { if(OOCTimer < diff) { HandleOffCombatEffects(); OOCTimer = 10000; } else OOCTimer -= diff; } if(!UpdateVictim()) return; if(Check_Timer) { // when not casting AE, chase victim if(Check_Timer <= diff) { me->setHover(false); DoStartMovement(me->getVictim()); Check_Timer = 0; } else Check_Timer -= diff; } if(ExplosionCombo_Timer < diff) { if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 100.0f, true)) { float x, y, z; target->GetPosition(x, y, z); DoTeleportTo(x, y, z); me->setHover(true); me->GetMotionMaster()->MoveIdle(); for(uint8 i = 0; i < 3; ++i) AddSpellToCast(SPELL_ARCANE_EXPLOSION, CAST_NULL); Check_Timer = 2500; } ExplosionCombo_Timer = 30000; } else ExplosionCombo_Timer -= diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!me->IsNonMeleeSpellCasted(false) && !me->isInCombat()) { if(OOCTimer < diff) { HandleOffCombatEffects(); OOCTimer = 10000; } else OOCTimer -= diff; } if(!UpdateVictim()) return; if(Drink_Timer < diff) { ClearCastQueue(); AddSpellToCast(SPELL_DRINK_FEL_INFUSION, CAST_SELF); Drink_Timer = HeroicMode?urand(10000, 18000):urand(15000, 25000); } else Drink_Timer -= diff; if(Wretched_Cast_Timer < diff) { AddSpellToCast(m_creature->getVictim(), RAND(SPELL_WRETCHED_FIREBALL, SPELL_WRETCHED_FROSTBOLT)); Wretched_Cast_Timer = me->HasAura(SPELL_DRINK_FEL_INFUSION, 1) ? 1400 : 2900; } else Wretched_Cast_Timer -= diff; CheckCasterNoMovementInRange(diff, 35.0); CastNextSpellIfAnyAndReady(diff); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { //Return since we have no target if (!UpdateVictim()) return; DoSpecialThings(diff, DO_COMBAT_N_SPEED, 200.0f, 2.0f); events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_DARK_DECAY: { AddSpellToCast(SPELL_DARK_DECAY); events.ScheduleEvent(eventId, 20000); break; } case EVENT_SUMMON: { AddSpellToCast(SPELL_SUMMON_WFH, CAST_SELF); events.ScheduleEvent(eventId, 50000); break; } case EVENT_DEATH_COIL: { AddSpellToCast(SPELL_DEATH_COIL, CAST_RANDOM); events.ScheduleEvent(eventId, 20000); break; } } } CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }