void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //Fearsome Roar if (FearsomeRoar_Timer < uiDiff) { DoCast(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FEARSOME_ROAR : H_SPELL_FEARSOME_ROAR, true); FearsomeRoar_Timer = 15000; }else FearsomeRoar_Timer -= uiDiff; //Piercing Slash if (PiercingSlash_Timer < uiDiff) { DoCast(m_creature->getVictim(), SPELL_PIERCING_SLASH, true); PiercingSlash_Timer = urand(20000, 25000); }else PiercingSlash_Timer -= uiDiff; //Mangling Slash if (ManglingSlash_Timer < uiDiff) { DoCast(m_creature->getVictim(), SPELL_MANGLING_SLASH, true); ManglingSlash_Timer = urand(20000, 25000); }else ManglingSlash_Timer -= uiDiff; //Mangling Slash if (GrievousBite_Timer < uiDiff) { DoCast(m_creature->getVictim(), SPELL_GRIEVOUS_BITE, true); GrievousBite_Timer = urand(20000, 25000); }else GrievousBite_Timer -= uiDiff; //Grievous Bite remove if (Check_Timer < uiDiff) { Unit* pPlayer = m_creature->getVictim(); if (pPlayer->GetHealth() == pPlayer->GetMaxHealth()) if (pPlayer->HasAura(SPELL_GRIEVOUS_BITE)) pPlayer->RemoveAura(SPELL_GRIEVOUS_BITE, EFFECT_INDEX_0); Check_Timer = 1000; }else Check_Timer -= uiDiff; //Bellowing Roar if (BellowingRoar_Timer < uiDiff) { DoCast(m_creature, SPELL_BELLOWING_ROAR); BellowingRoar_Timer = 60000; }else BellowingRoar_Timer -= uiDiff; //Call For Raptor - spell if (CallForRaptor_Timer < uiDiff) { DoScriptText(SAY_CALL_FOR_RAPTOR, m_creature); m_creature->CastSpell(m_creature, SAY_CALL_FOR_RAPTOR, true); CallForRaptor_Timer = 25000; CallForRaptorSpawnCheck(); }else CallForRaptor_Timer -= uiDiff; //Call For Raptor - spawn if (CallForRaptorSpawn_Timer < uiDiff && CallForRaptorSpawn_Check == 1) { switch(urand(0, 1)) { case 0: { if (Creature* pRaptor1 = m_creature->SummonCreature(NPC_DRAKKARI_GUTRIPPER, PosSummon1[0], PosSummon1[1], PosSummon1[2], 0 , TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000)) pRaptor1->AI()->AttackStart(m_creature->getVictim()); } case 1: { if (Creature* pRaptor2 = m_creature->SummonCreature(NPC_DRAKKARI_SCYTHECLAW, PosSummon1[0], PosSummon1[1], PosSummon1[2], 0 , TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 240000)) pRaptor2->AI()->AttackStart(m_creature->getVictim()); } } CallForRaptorSpawn_Check = 0; }else CallForRaptorSpawn_Timer -= uiDiff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; //Fearsome Roar if (m_uiFearsomeRoar < uiDiff) { if (DoCastSpellIfCan (m_creature, m_bIsRegularMode ? SPELL_FEARSOME_ROAR : SPELL_FEARSOME_ROAR_H) == CAST_OK) m_uiFearsomeRoar = 15000; } else m_uiFearsomeRoar -= uiDiff; //Piercing Slash if (m_uiPiercingSlash < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_PIERCING_SLASH) == CAST_OK) m_uiPiercingSlash = urand(20000, 25000); } else m_uiPiercingSlash -= uiDiff; //Mangling Slash if (m_uiManglingSlash < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MANGLING_SLASH) == CAST_OK) m_uiManglingSlash = urand(20000, 25000); } else m_uiManglingSlash -= uiDiff; //Grievous Bite if (m_uiGrievousBite < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GRIEVOUS_BITE) == CAST_OK) m_uiGrievousBite = urand(20000, 25000); } else m_uiGrievousBite -= uiDiff; //Bellowing Roar if (m_uiBellowingRoar < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) m_uiBellowingRoar = 60000; } else m_uiBellowingRoar -= uiDiff; //Call For Raptor - spell if (m_uiCallForRaptor < uiDiff) { if (DoCastSpellIfCan(m_creature, SPELL_RAPTOR_CALL) == CAST_OK) { DoScriptText(SAY_CALL_FOR_RAPTOR, m_creature); m_uiCallForRaptor = 25000; CallForRaptorSpawnCheck(); } } else m_uiCallForRaptor -= uiDiff; //Call For Raptor - spawn if (m_uiCallForRaptorSpawn < uiDiff && m_bCallForRaptorSpawn) { switch(urand(0, 1)) { case 0: { if (Creature* pRaptor1 = m_creature->SummonCreature(NPC_DRAKKARI_GUTRIPPER, PosSummon1[0], PosSummon1[1], PosSummon1[2], 0 , TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 240000)) pRaptor1->SetInCombatWithZone(); } case 1: { if (Creature* pRaptor2 = m_creature->SummonCreature(NPC_DRAKKARI_SCYTHECLAW, PosSummon1[0], PosSummon1[1], PosSummon1[2], 0 , TEMPSUMMON_TIMED_OOC_OR_DEAD_DESPAWN, 240000)) pRaptor2->SetInCombatWithZone(); } } m_bCallForRaptorSpawn = false; } else m_uiCallForRaptorSpawn -= uiDiff; DoMeleeAttackIfReady(); }