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/MobWarrior.cs

    r4756 r4764  
    164164                        StopAttack(); 
    165165                } 
    166                 if (target == null || target.Removed || (typeof(UnitBuilding).IsAssignableFrom(target.GetType()) && ((UnitBuilding)target).IsDestroyed)) 
     166                UnitBuilding ub = target as UnitBuilding; 
     167                if (target == null || target.Removed || ub != null && ub.IsDestroyed) 
    167168                    StopAttack(); 
    168169            } 
     
    185186                    } 
    186187                } 
    187                 if (target == null || target.Removed || (typeof(UnitBuilding).IsAssignableFrom(target.GetType()) && ((UnitBuilding)target).IsDestroyed)) 
     188                UnitBuilding ub = target as UnitBuilding; 
     189                if (target == null || target.Removed || ub != null && ub.IsDestroyed) 
    188190                    StopAttack(); 
    189191            } 
Note: See TracChangeset for help on using the changeset viewer.