public InternalTimer( FireTile fire, TimeSpan delay ) : base(delay) { Priority = TimerPriority.OneSecond; m_Fire = fire; }
public override void OnExplode( Mobile source, Item itemSource, int intensity, Point3D loc, Map map ) { Server.Effects.PlaySound( loc, map, 0x22F ); int radius = 2; // for anything that's calling this, and is not a bomb if ( itemSource is BombPotion ) { BombPotion bomb = itemSource as BombPotion; radius = bomb.ExplosionRange; } 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, radius, 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 ) ) { FireTile tile = new FireTile( time+TimeSpan.FromSeconds( Utility.RandomDouble()*5 ), source, FireEffectType ); tile.MoveToWorld( point, map ); tile.AddCurrentOccupants(); } } }
public InternalBurnTimer( FireTile fire, TimeSpan delay, TimeSpan interval ) : base(delay, interval) { Priority = TimerPriority.OneSecond; m_Fire = fire; }