Changeset 3190

Show
Ignore:
Timestamp:
03/02/2010 09:24:12 AM (6 months ago)
Author:
Dfighter
Message:

APPLIED: Ezri's Demonic Circle patch. http://arcemu.org/forums/index.php?showtopic=21031
Thanks for contributing.

Location:
trunk/src/arcemu-world
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/arcemu-world/SpellAuras.cpp

    r3185 r3190  
    38043804} 
    38053805 
     3806void Aura::EventPeriodicTriggerDummy(){ 
     3807         
     3808        switch( GetSpellProto()->Id ){ 
     3809        case 48018:{ 
     3810                GameObject * circle = m_target->GetMapMgr()->GetGameObject( m_target->m_ObjectSlots[ 0 ] ); 
     3811                SpellEntry* sp = dbcSpell.LookupEntryForced( 48020 ); 
     3812                 
     3813                if( circle != NULL && sp != NULL && m_target->CalcDistance( circle ) <= GetMaxRange( dbcSpellRange.LookupEntry( sp->rangeIndex ) )){ 
     3814                        if( !m_target->HasAura( 62388 ) ) 
     3815                                m_target->CastSpell( m_target, 62388, true ); 
     3816                }else 
     3817                        m_target->RemoveAura( 62388 ); 
     3818 
     3819                           break; } 
     3820        } 
     3821} 
     3822 
    38063823void Aura::SpellAuraModResistance(bool apply) 
    38073824{ 
     
    61096126                else 
    61106127                        SetNegative(); 
     6128 
     6129                // Demonic Circle hack 
     6130                if ( m_spellProto->Id == 48020 && m_target->IsPlayer() && m_target->HasAura( 62388 ) ){ 
     6131                        GameObject* obj = m_target->GetMapMgr()->GetGameObject( m_target->m_ObjectSlots[ 0 ] ); 
     6132 
     6133                        if( obj != NULL ){ 
     6134                                Player *ptarget = static_cast< Player* >( m_target ); 
     6135 
     6136                                ptarget->SafeTeleport( obj->GetMapId(), obj->GetInstanceID(), obj->GetPositionX(), obj->GetPositionY(), obj->GetPositionZ(), m_target->GetOrientation() ); 
     6137                        } 
     6138                } 
    61116139        } 
    61126140        else 
     
    63476375        switch( m_spellProto->NameHash ) 
    63486376        { 
     6377                // Demonic Circle 
     6378                case SPELL_HASH_DEMONIC_CIRCLE__SUMMON:{ 
     6379                        if (apply) 
     6380                                sEventMgr.AddEvent( this, &Aura::EventPeriodicTriggerDummy, EVENT_AURA_PERIODIC_TRIGGERSPELL, GetSpellProto()->EffectAmplitude[mod->i],360,EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT ); 
     6381                        else{ 
     6382                                sEventMgr.RemoveEvents( this ); 
     6383                                m_target->RemoveAllAuraById(62388); 
     6384                                } 
     6385 
     6386                                break;} 
     6387 
    63496388                case SPELL_HASH_ASPECT_OF_THE_VIPER: 
    63506389                        if( p_target ) 
  • trunk/src/arcemu-world/SpellAuras.h

    r3151 r3190  
    748748        void EventPeriodicManaPct(float); 
    749749        void EventPeriodicRegenManaStatPct(uint32 perc,uint32 stat); 
     750        void EventPeriodicTriggerDummy(); 
     751 
     752 
    750753        void RelocateEvents(); 
    751754        int32 event_GetInstanceID(); 
  • trunk/src/arcemu-world/SpellFixes.cpp

    r3171 r3190  
    56145614        // Insert warlock spell fixes here 
    56155615                 
     5616                //Dummy for Demonic Circle 
     5617                sp = dbcSpell.LookupEntryForced( 48018 ); 
     5618                if (sp != NULL){ 
     5619                         
     5620                        sp->EffectImplicitTargetA[1] = 1; 
     5621                        CreateDummySpell( 62388 ); 
     5622                        sp = dbcSpell.LookupEntryForced( 62388 ); 
     5623                        if ( sp != NULL ){ 
     5624                                sp->Effect[0] = 6; 
     5625                                sp->EffectApplyAuraName[0] = SPELL_AURA_DUMMY; 
     5626                        } 
     5627                } 
     5628                 
    56165629                //megai2: Immolation Aura 
    56175630                sp = dbcSpell.LookupEntryForced( 50589 );