protected void Explode(Mobile m, Point3D p) { if (m == null || m.Deleted) { return; } if (!OnExplode(m, p)) { return; } if (ExplodeID > 0) { var fx = new EffectInfo(p, Map, ExplodeID, ExplodeHue, ExplodeSpeed, ExplodeDuration, ExplodeRender); fx.Send(); } if (ExplodeSound >= 0) { Effects.PlaySound(p, Map, ExplodeSound); } ExplodeStars( m, StarsEffect, p, Utility.RandomMinMax(StarsRangeMin, StarsRangeMax), StarsSound, Stars.ToArray(), StarsHue > 0 ? new[] {StarsHue} : StarHues.ToArray()); Movable = false; Timer.DelayCall( TimeSpan.FromSeconds(1.0), () => { Movable = true; Consume(); }); }
protected void LaunchTrail(Point3D p) { if (TrailID > 0) { var fx = new EffectInfo(p, Map, TrailID, TrailHue, TrailSpeed, TrailDuration, TrailRender); fx.Send(); } if (TrailSound > 0) { Effects.PlaySound(p, Map, TrailSound); } }
protected void Fail(Mobile m) { if (FailEffectID > 0) { var fx = new EffectInfo( GetWorldLocation(), Map, FailEffectID, FailEffectHue, FailEffectSpeed, FailEffectDuration, FailEffectRender); fx.Send(); } if (FailEffectSound > 0) { Effects.PlaySound(GetWorldLocation(), Map, 1488); } Movable = Visible = true; OnFail(m); }
protected void IgniteFuse(Mobile m) { if (m == null || m.Deleted || FuseLit) { return; } if (!OnIgnite(m)) { return; } if (IgniteEffectID > 0) { var fx = new EffectInfo( GetWorldLocation(), Map, IgniteEffectID, IgniteEffectHue, IgniteEffectSpeed, (int)Math.Ceiling(FuseDelay.TotalMilliseconds / 100.0), IgniteEffectRender); fx.Send(); } if (IgniteEffectSound > 0) { Effects.PlaySound(GetWorldLocation(), Map, IgniteEffectSound); } _FuseTimer = Timer.DelayCall( FuseDelay, () => { _FuseTimer = null; InvalidateProperties(); if (!OnFuseBurned(m)) { Fail(m); } }); }
protected virtual void WeatherImpactHandler(MovingEffectInfo info) { if (info == null || Deleted || !Options.Weather.Impacts || Options.Weather.ImpactEffectID <= 0 || Options.Weather.ImpactEffectSpeed <= 0 || Options.Weather.ImpactEffectDuration <= 0) { return; } OnWeatherImpact(info); if (Options.Weather.ImpactEffectID <= 0) { return; } var effect = new EffectInfo( info.Target, info.Map, Options.Weather.ImpactEffectID, Options.Weather.ImpactEffectHue, Options.Weather.ImpactEffectSpeed, Options.Weather.ImpactEffectDuration, Options.Weather.ImpactEffectRender); effect.Send(); OnWeatherImpact(effect); }
protected void Explode(Mobile m, Point3D p) { if (m == null || m.Deleted) { return; } if (ExplodeID > 0) { var fx = new EffectInfo(p, Map, ExplodeID, ExplodeHue, ExplodeSpeed, ExplodeDuration, ExplodeRender); fx.Send(); } if (ExplodeSound >= 0) { Effects.PlaySound(p, Map, ExplodeSound); } ExplodeStars( m, StarsEffect, p, Utility.RandomMinMax(StarsRangeMin, StarsRangeMax), StarsSound, Stars.ToArray(), StarsHue > 0 ? new[] { StarsHue } : StarHues.ToArray()); }