Example #1
0
		void SpellHitTarget(Unit *pTarget, const SpellEntry* spell) {
			switch (spell->Id) {
			case SPELL_BLAZE:
				pTarget->CastSpell(pTarget, SPELL_BLAZE_SUMMON, true);
			case SPELL_CONFLAGRATION:
			case SPELL_FLAME_SEAR:
				HandleTouchedSpells(pTarget, SPELL_FLAME_TOUCHED);
				break;
			case SPELL_SHADOW_NOVA:
				HandleTouchedSpells(pTarget, SPELL_DARK_TOUCHED);
				break;
			}
		}
Example #2
0
		void SpellHitTarget(Unit *pTarget, const SpellEntry* spell) {
			switch (spell->Id) {
			case SPELL_SHADOW_BLADES:
			case SPELL_SHADOW_NOVA:
			case SPELL_CONFOUNDING_BLOW:
			case SPELL_SHADOW_FURY:
				HandleTouchedSpells(pTarget, SPELL_DARK_TOUCHED);
				break;
			case SPELL_CONFLAGRATION:
				HandleTouchedSpells(pTarget, SPELL_FLAME_TOUCHED);
				break;
			}
		}
 void SpellHitTarget(Unit* target, const SpellInfo* spell) override
 {
     switch (spell->Id)
     {
         case SPELL_BLAZE:
             target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
             break;
         case SPELL_CONFLAGRATION:
         case SPELL_FLAME_SEAR:
             HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
             break;
         case SPELL_SHADOW_NOVA:
             HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
             break;
     }
 }
        void SpellHitTarget(Unit* target,const SpellEntry* spell)
        {
            switch(spell->Id)
            {

            case SPELL_BLAZE:
                target->CastSpell(target, SPELL_BLAZE_SUMMON, true, 0, 0, me->GetGUID());
            case SPELL_CONFLAGRATION:
            case SPELL_FLAME_SEAR:
            case SPELL_BLAZE_BURN:
                HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
                break;
            case SPELL_SHADOW_NOVA:
                HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
                break;
            }
        }
Example #5
0
	void SpellHitTarget(Unit *pTarget,const SpellEntry* spell)
    {
        switch(spell->Id)
        {
			case SPELL_GAS_SPORES:
            HandleTouchedSpells(pTarget, SPELL_BLIGHTED_SPORES);
            break;
        }
    }
Example #6
0
        void UpdateAI(const uint32 diff)
        {
            if (!SisterDeath)
            {
                if (instance)
                {
                    Unit* Temp = NULL;
                    Temp = Unit::GetUnit((*me), instance->GetData64(DATA_ALYTHESS));
                    if (Temp && Temp->isDead())
                    {
                        DoScriptText(YELL_SISTER_ALYTHESS_DEAD, me);
                        DoCast(me, SPELL_EMPOWER);
                        me->InterruptSpell(CURRENT_GENERIC_SPELL);
                        SisterDeath = true;
                    }
                }
            }

            if (!UpdateVictim())
                return;

            if (SisterDeath)
            {
                if (ConflagrationTimer <= diff)
                {
                    if (!me->IsNonMeleeSpellCasted(false))
                    {
                        me->InterruptSpell(CURRENT_GENERIC_SPELL);
                        Unit* target = NULL;
                        target = SelectTarget(SELECT_TARGET_RANDOM, 0);
                        if (target)
                            DoCast(target, SPELL_CONFLAGRATION);
                        ConflagrationTimer = 30000+(rand()%5000);
                    }
                } else ConflagrationTimer -= diff;
            }
            else
            {
                if (ShadownovaTimer <= diff)
                {
                    if (!me->IsNonMeleeSpellCasted(false))
                    {
                        Unit* target = NULL;
                        target = SelectTarget(SELECT_TARGET_RANDOM, 0);
                        if (target)
                            DoCast(target, SPELL_SHADOW_NOVA);

                        if (!SisterDeath)
                        {
                            if (target)
                                DoScriptText(EMOTE_SHADOW_NOVA, me, target);
                            DoScriptText(YELL_SHADOW_NOVA, me);
                        }
                        ShadownovaTimer = 30000+(rand()%5000);
                    }
                } else ShadownovaTimer -=diff;
            }

            if (ConfoundingblowTimer <= diff)
            {
                if (!me->IsNonMeleeSpellCasted(false))
                {
                    Unit* target = NULL;
                    target = SelectTarget(SELECT_TARGET_RANDOM, 0);
                    if (target)
                        DoCast(target, SPELL_CONFOUNDING_BLOW);
                    ConfoundingblowTimer = 20000 + (rand()%5000);
                }
            } else ConfoundingblowTimer -=diff;

            if (ShadowimageTimer <= diff)
            {
                Unit* target = NULL;
                Creature* temp = NULL;
                for (uint8 i = 0; i<3; ++i)
                {
                    target = SelectTarget(SELECT_TARGET_RANDOM, 0);
                    temp = DoSpawnCreature(MOB_SHADOW_IMAGE, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 10000);
                    if (temp && target)
                    {
                        temp->AddThreat(target, 1000000);//don't change target(healers)
                        temp->AI()->AttackStart(target);
                    }
                }
                ShadowimageTimer = 20000;
            } else ShadowimageTimer -=diff;

            if (ShadowbladesTimer <= diff)
            {
                if (!me->IsNonMeleeSpellCasted(false))
                {
                    DoCast(me, SPELL_SHADOW_BLADES);
                    ShadowbladesTimer = 10000;
                }
            } else ShadowbladesTimer -=diff;

            if (EnrageTimer < diff && !Enraged)
            {
                me->InterruptSpell(CURRENT_GENERIC_SPELL);
                DoScriptText(YELL_ENRAGE, me);
                DoCast(me, SPELL_ENRAGE);
                Enraged = true;
            } else EnrageTimer -= diff;

            if (me->isAttackReady() && !me->IsNonMeleeSpellCasted(false))
            {
                //If we are within range melee the target
                if (me->IsWithinMeleeRange(me->getVictim()))
                {
                    HandleTouchedSpells(me->getVictim(), SPELL_DARK_TOUCHED);
                    me->AttackerStateUpdate(me->getVictim());
                    me->resetAttackTimer();
                }
            }
        }
        void UpdateAI(const uint32 diff)
        {
            CheckRadianceAura();

            if(!SisterDeath)
            {
                if (pInstance)
                {
                    Creature* Temp = Creature::GetCreature((*me),pInstance->GetData64(DATA_ALYTHESS));
                    if (Temp && Temp->isDead())
                    {
                        DoScriptText(YELL_SISTER_ALYTHESS_DEAD, me);
                        me->InterruptSpell(CURRENT_GENERIC_SPELL);
                        if(TryDoCast(me,SPELL_EMPOWER))
                            SisterDeath = true;
                    }
                }
            }

            if (!UpdateVictim())
                return;

            DoAggroPuls(diff);

            if(SisterDeath)
            {
                if (ConflagrationTimer <= diff)
                {
                    me->InterruptSpell(CURRENT_GENERIC_SPELL);
                    Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300, true);
                    if(TryDoCast(target, SPELL_CONFLAGRATION))
                        ConflagrationTimer = 30000+(rand()%5000);
                }else ConflagrationTimer -= diff;
            }
            else
            {
                if(ShadownovaTimer <= diff)
                {
                    me->InterruptSpell(CURRENT_GENERIC_SPELL);
                    Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300, true);
                    if(TryDoCast(target, SPELL_SHADOW_NOVA))
                    {
                        if(!SisterDeath)
                        {
                            DoScriptText(EMOTE_SHADOW_NOVA, me, target);
                            DoScriptText(YELL_SHADOW_NOVA, me);
                        }
                        ShadownovaTimer = 30000+(rand()%5000);
                    }
                }else ShadownovaTimer -=diff;
            }

            if(ConfoundingblowTimer <= diff)
            {
                Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 10, true);
                if(TryDoCast(target, SPELL_CONFOUNDING_BLOW))
                    ConfoundingblowTimer = 20000 + (rand()%5000);
            }else ConfoundingblowTimer -=diff;

            if(ShadowimageTimer <= diff)
            {
                Unit* ptarget = NULL;
                Creature* temp = NULL;
                for(int i = 0;i<3;i++)
                {
                    ptarget = SelectTarget(SELECT_TARGET_RANDOM, 0);
                    temp = DoSpawnCreature(MOB_SHADOW_IMAGE,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN,10000);
                    if(temp && ptarget)
                    {
                        temp->AI()->AttackStart(ptarget);
                        temp->getThreatManager().addThreat(ptarget,500000.0f);
                    }
                }
                ShadowimageTimer = 20000;
            }else ShadowimageTimer -=diff;

            if(ShadowbladesTimer <= diff)
            {
                if(TryDoCast(me, SPELL_SHADOW_BLADES))
                    ShadowbladesTimer = 10000;
            }else ShadowbladesTimer -=diff;

            if (EnrageTimer <= diff && !Enraged)
            {
                me->InterruptSpell(CURRENT_GENERIC_SPELL);
                DoScriptText(YELL_ENRAGE, me);
                DoCast(me,SPELL_ENRAGE);
                if(me->HasAura(SPELL_ENRAGE,0))
                    Enraged = true;
            }else EnrageTimer -= diff;

            if( me->isAttackReady() && !me->IsNonMeleeSpellCasted(false))
            {
                //If we are within range melee the target
                if( me->IsWithinMeleeRange(me->getVictim()))
                {
                    HandleTouchedSpells(me->getVictim(), SPELL_DARK_TOUCHED);
                    me->AttackerStateUpdate(me->getVictim());
                    me->resetAttackTimer();
                }
            }
        }