Example #1
1
    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();
    }
Example #2
1
 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     Unit* target = GetTarget();
     if (!target->HasAura(DK_SPELL_BLOOD_PRESENCE))
         target->RemoveAura(DK_SPELL_IMPROVED_BLOOD_PRESENCE_TRIGGERED);
 }
Example #3
1
 void HandleEffectRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
 {
     Unit* target = GetTarget();
     target->RemoveAura(PALADIN_SPELL_BLESSING_OF_SANCTUARY_BUFF, GetCasterGUID());
 }