示例#1
0
SPELL_EFFECT_OVERRIDE_RETURNS AH_105925( Aura *aur, bool apply, uint8 i )
{
    Unit *target = aur->GetTarget();
    if( i == 0 && target )
    {
        //if we have heroic will and we will not receive any dmg from us then we cast "Faded Into Twilight"
        if( apply == false )
        {
            if( target->HasAura( 106108 ) )
                target->CastSpellDelayed( target->GetGUID(), 109461, 50, true );
            else
                target->CastSpellDelayed( target->GetGUID(), 110073, 50, true ); //fading light insta kill if possible
        }
    }
    return SPELL_EFFECT_OVERRIDE_CONTINUE_EXECUTION;
}
示例#2
0
SPELL_EFFECT_OVERRIDE_RETURNS AH_106108( Aura *aur, bool apply, uint8 i )
{
    Unit *target = aur->GetTarget();
    //cast Twilight Shift that will take us into phase 2
    if( i == 0 && target )
    {
        if( apply == false )
            target->CastSpellDelayed( target->GetGUID(), 106368, 50, true );
    }
    return SPELL_EFFECT_OVERRIDE_CONTINUE_EXECUTION;
}
示例#3
0
SPELL_EFFECT_OVERRIDE_RETURNS AH_11327( Aura *aur, bool apply, uint8 i )
{
    Unit *target = aur->GetTarget();
    if( i == 0
            && apply == false
            && target
            && aur->GetTimeLeft() <= 0	//buff was not removed due to interrupt. Needed to avid exploit : vanish -> backstab -> stealth -> ambush
      )
//		target->CastSpell( target, 1784, true );
        target->CastSpellDelayed( target->GetGUID(), 1784, 50, false );
    return SPELL_EFFECT_OVERRIDE_CONTINUE_EXECUTION;
}
示例#4
0
SPELL_EFFECT_OVERRIDE_RETURNS AH_31821( Aura *aur, bool apply, uint8 i )
{
    if( i == 0 )
    {
        Unit *target = aur->GetTarget(); //this is actually caster
        Aura *a;
        if( apply )
        {
            InRangeSetRecProt::iterator itr;
            target->AquireInrangeLock(); //make sure to release lock before exit function !
            InrangeLoopExitAutoCallback AutoLock;
            for( itr = target->GetInRangeSetBegin( AutoLock ); itr != target->GetInRangeSetEnd(); itr++ )
            {
                if(!((*itr)->IsUnit()) || !SafeUnitCast((*itr))->isAlive())
                    continue;
                a = SafeUnitCast((*itr))->HasAuraWithNameHash( SPELL_HASH_CONCENTRATION_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
                if( a != NULL )
                    target->CastSpell( SafeUnitCast((*itr)), 64364, true ); //immunity
            }
            target->ReleaseInrangeLock();

            a = target->HasAuraWithNameHash( SPELL_HASH_CONCENTRATION_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
            if( a != NULL )
            {
                target->CastSpell( target, 64364, true ); //immunity
            }
            else
            {
                if( a == NULL )
                    a = target->HasAuraWithNameHash( SPELL_HASH_DEVOTION_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
                if( a == NULL )
                    a = target->HasAuraWithNameHash( SPELL_HASH_RESISTANCE_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
                if( a == NULL )
                    a = target->HasAuraWithNameHash( SPELL_HASH_RETRIBUTION_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
                if( a != NULL )
                {
                    SpellEntry *sp = a->GetSpellProto();
                    a->Remove();
                    a = NULL;
                    target->CastSpellDelayed( target->GetGUID(), sp->Id, 1, true );
                }
            }
        }
        else
        {
            target->RemoveAura( 64364 );	//immunity
            a = target->HasAuraWithNameHash( SPELL_HASH_DEVOTION_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
            if( a == NULL )
                a = target->HasAuraWithNameHash( SPELL_HASH_RESISTANCE_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
            if( a == NULL )
                a = target->HasAuraWithNameHash( SPELL_HASH_RETRIBUTION_AURA, target->GetGUID(), AURA_SEARCH_POSITIVE );
            if( a != NULL )
            {
                SpellEntry *sp = a->GetSpellProto();
                a->Remove();
                a = NULL;
                target->CastSpellDelayed( target->GetGUID(), sp->Id, 1, true );
            }
        }
    }
    return SPELL_EFFECT_OVERRIDE_CONTINUE_EXECUTION;
}