public override void Deserialize(GenericReader reader) { base.Deserialize( reader ); int version = reader.ReadInt(); light = reader.ReadItem() as LightSource; }
public override void OnExplode( Mobile source, Item itemSource, int intensity, Point3D loc, Map map ) { Server.Effects.PlaySound( loc, map, 283 + Utility.Random( 4 ) ); // boom Server.Effects.SendLocationEffect( loc, map, 0x37B9, 16 ); LightSource light = new LightSource(); light.MoveToWorld( loc, map ); Timer.DelayCall( TimeSpan.FromMilliseconds( 500 ), new TimerStateCallback( RemoveLightSource ), light ); // 0.5 sec delay }
public override void OnAdded( object parent ) { light = new LightSource(); light.Light = LightType.Circle300; if( parent is Mobile ) { Mobile from = (Mobile)parent; from.AddItem( light ); } base.OnAdded( parent ); }
public static void AddHalo( Mobile m, int featlevel, int delay ) { LightSource newlight = new LightSource(); newlight.Layer = Layer.Talisman; newlight.Light = LightType.Circle300; newlight.Name = "Halo of Light"; Item light = m.FindItemOnLayer( Layer.Talisman ); if( light != null && light is LightSource ) light.Delete(); light = m.FindItemOnLayer( Layer.ShopBuy ); if( light != null && light is LightSource ) light.Delete(); if( m.FindItemOnLayer( Layer.ShopBuy ) == null ) m.EquipItem( newlight ); if( m.Backpack is ArmourBackpack && featlevel > 1 ) { ArmourBackpack pack = m.Backpack as ArmourBackpack; pack.Attributes.NightSight = 1; } if( m is PlayerMobile ) { PlayerMobile pm = m as PlayerMobile; if( pm.HaloTimer != null ) pm.HaloTimer.Stop(); pm.HaloTimer = new HaloOfLightTimer( m, delay ); pm.HaloTimer.Start(); } else new HaloOfLightTimer( m, delay ).Start(); }
public override void OnCast() { if (CheckSequence()) { LightSource light = new LightSource(); light.Light = LightType.Circle300; light.Layer = Layer.Unused_xF; light.Movable = false; if (Caster.FindItemOnLayer(Layer.Unused_xF) != null) Caster.FindItemOnLayer(Layer.Unused_xF).Delete(); Caster.EquipItem(light); new InternalTimer(Caster); Caster.Karma -= 500; Caster.Mana -= RequiredMana; Effects.PlaySound(Caster.Location, Caster.Map, 0x54); } FinishSequence(); }
public void AddHalo( Mobile m ) { LightSource newlight = new LightSource(); newlight.Layer = Layer.ShopBuy; newlight.Light = LightType.Circle300; newlight.Name = "Weapon Halo"; Item light = m.FindItemOnLayer( Layer.Talisman ); if( light != null && light is LightSource ) light.Delete(); light = m.FindItemOnLayer( Layer.ShopBuy ); if( light != null && light is LightSource ) light.Delete(); if( m.FindItemOnLayer( Layer.ShopBuy ) == null ) m.EquipItem( newlight ); }