public static void SendBoltEffect( IEntity e, bool sound, int hue ) { Map map = e.Map; if ( map == null ) return; if ( e is Item ) ((Item)e).ProcessDelta(); else if ( e is Mobile ) ((Mobile)e).ProcessDelta(); Packet preEffect = null, boltEffect = null, playSound = null; IPooledEnumerable eable = map.GetClientsInRange( e.Location ); foreach ( NetState state in eable ) { if ( state.Mobile.CanSee( e ) ) { if ( SendParticlesTo( state ) ) { if ( preEffect == null ) preEffect = new TargetParticleEffect( e, 0, 10, 5, 0, 0, 5031, 3, 0 ); state.Send( preEffect ); } if ( boltEffect == null ) boltEffect = new BoltEffect( e, hue ); state.Send( boltEffect ); if ( sound ) { if ( playSound == null ) playSound = new PlaySound( 0x29, e ); state.Send( playSound ); } } } eable.Free(); }