Changeset 3145

Show
Ignore:
Timestamp:
02/01/2010 09:45:31 AM (7 months ago)
Author:
jackpoz
Message:

FIXED: Crash added by MesoX happening when Exorcism (spell id 879) was casted to Players.

Files:
1 modified

Legend:

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

    r3138 r3145  
    638638                       break; 
    639639 
    640                case SPELL_HASH_EXORCISM: 
    641                         { 
    642                                if( p_caster != NULL ) 
    643                                { 
    644                                        float sph = (float)(p_caster->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+1)); 
    645                                        float ap = (float)(p_caster->GetAP()); 
    646                                        dmg += float2int32((0.15f * sph) + (0.15f * ap)); 
    647                                         if(unitTarget && (TO_CREATURE(unitTarget)->GetCreatureInfo()->Type == UNIT_TYPE_UNDEAD ||  
    648                                                 TO_CREATURE(unitTarget)->GetCreatureInfo()->Type == UNIT_TYPE_DEMON)) 
    649                                                 force_crit = true; 
    650                                 } 
    651                         } 
    652                          break; 
     640                case SPELL_HASH_EXORCISM: 
     641                { 
     642                        if( p_caster != NULL ) 
     643                        { 
     644                                uint32 sph = p_caster->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+1); 
     645                                int32 ap = p_caster->GetAP(); 
     646                                dmg += float2int32((0.15f * sph) + (0.15f * ap)); 
     647                                if(unitTarget && unitTarget->IsCreature()) 
     648                                { 
     649                                        uint32 type = TO_CREATURE(unitTarget)->GetCreatureInfo()->Type; 
     650                                        if( type == UNIT_TYPE_UNDEAD || type == UNIT_TYPE_DEMON ) 
     651                                                force_crit = true; 
     652                                } 
     653                        } 
     654                } 
     655                break; 
    653656 
    654657                default: