Ignore:
Timestamp:
2013-10-07 21:47:25 (8 years ago)
Author:
dezhidki
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Units/Mobs/MobRanger.cs

    r4756 r4764  
    161161                        StopAttack(); 
    162162                } 
    163                 if (target == null || target.Removed || (typeof(UnitBuilding).IsAssignableFrom(target.GetType()) && ((UnitBuilding)target).IsDestroyed)) 
     163                UnitBuilding ub = target as UnitBuilding; 
     164                if (target == null || target.Removed || ub != null && ub.IsDestroyed) 
    164165                    StopAttack(); 
    165166            } 
     
    182183                    } 
    183184                } 
    184                 if (target == null || target.Removed || (typeof(UnitBuilding).IsAssignableFrom(target.GetType()) && ((UnitBuilding)target).IsDestroyed)) 
     185                UnitBuilding ub = target as UnitBuilding; 
     186                if (target == null || target.Removed || ub != null && ub.IsDestroyed) 
    185187                { 
    186188                    StopAttack(); 
Note: See TracChangeset for help on using the changeset viewer.