public override void OnExplode( Mobile source, Item itemSource, int intensity, Point3D loc, Map map ) { Server.Effects.PlaySound( loc, map, 0x22F ); if ( itemSource is BombPotion ) { BombPotion bomb = itemSource as BombPotion; int delay = (int)(intensity * Divisor); if ( delay <= 0 ) delay = 1; TimeSpan time = TimeSpan.FromSeconds( delay ); List<Point3D> circlePoints = CircleHelper.CircleMidpoint( loc.X, loc.Y, loc.Z, bomb.ExplosionRange, true ); Point3D eye = new Point3D( loc ); eye.Z += 14; foreach( Point3D point in circlePoints ) { Point3D target = new Point3D(point); target.Z += 14; if ( map.LineOfSight( eye, target ) ) { SmokeTile tile = new SmokeTile( time+TimeSpan.FromSeconds( Utility.RandomDouble()*5 ) ); tile.MoveToWorld( point, map ); tile.AddCurrentOccupants(); } } } }
public InternalTimer( SmokeTile smoke, TimeSpan delay ) : base(delay) { Priority = TimerPriority.OneSecond; m_Smoke = smoke; }