context: #region Header
  //   Vorspire    _,-'/-'/  BaseFireworkRocket.cs
  //   .      __,-; ,'( '/
  //    \.    `-.__`-._`:_,-._       _ , . ``
  //     `:-._,------' ` _,`--` -: `_ , ` ,' :
  //        `---..__,,--'  (C) 2014  ` -'. -'
  //        #  Vita-Nex [http://core.vita-nex.com]  #
  //  {o)xxx|===============-   #   -===============|xxx(o}
  //        #        The MIT License (MIT)          #
  #endregion
  
  #region References
  using System;
  using System.Collections.Generic;
  using System.Linq;
  
  using Server;
  using Server.Engines.Craft;
  using Server.Items;
  
  using VitaNex.FX;
  using VitaNex.Network;
  using VitaNex.SuperCrafts;
  #endregion
  
  namespace VitaNex.Items
  {
  	public abstract class BaseFireworkRocket : BaseFirework
  	{
  		#region Launch Effect
  		public virtual int DefLaunchID { get { return ItemID; } }
  		public virtual int DefLaunchHue { get { return Hue; } }
  		public virtual int DefLaunchSpeed { get { return 8; } }
  		public virtual EffectRender DefLaunchRender { get { return EffectRender.Normal; } }
  		public virtual int DefLaunchSound { get { return 551; } }
  		public virtual int DefLaunchRangeMin { get { return 1; } }
  		public virtual int DefLaunchRangeMax { get { return 3; } }
  		public virtual int DefLaunchHeightMin { get { return 60; } }
  		public virtual int DefLaunchHeightMax { get { return 80; } }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchID { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchHue { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchSpeed { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public EffectRender LaunchRender { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchSound { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchHeightMin { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchHeightMax { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchRangeMin { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int LaunchRangeMax { get; set; }
  		#endregion
  
  		#region Trail Effect
  		public virtual int DefTrailID { get { return 14120; } }
  		public virtual int DefTrailHue { get { return 0; } }
  		public virtual int DefTrailSpeed { get { return 10; } }
  		public virtual int DefTrailDuration { get { return 10; } }
  		public virtual EffectRender DefTrailRender { get { return EffectRender.SemiTransparent; } }
  		public virtual int DefTrailSound { get { return 856; } }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int TrailID { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int TrailHue { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int TrailSpeed { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int TrailDuration { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public EffectRender TrailRender { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int TrailSound { get; set; }
  		#endregion
  
  		#region Explode Effect
  		public virtual int DefExplodeID { get { return 14000; } }
  		public virtual int DefExplodeHue { get { return 0; } }
  		public virtual int DefExplodeSpeed { get { return 10; } }
  		public virtual int DefExplodeDuration { get { return 13; } }
  		public virtual EffectRender DefExplodeRender { get { return EffectRender.LightenMore; } }
  		public virtual int DefExplodeSound { get { return 776; } }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int ExplodeID { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int ExplodeHue { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int ExplodeSpeed { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int ExplodeDuration { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public EffectRender ExplodeRender { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int ExplodeSound { get; set; }
  		#endregion
  
  		#region Stars Effect
  		public virtual FireworkStars DefStarsEffect { get { return FireworkStars.Peony; } }
  		public virtual int DefStarsHue { get { return 0; } }
  		public virtual int DefStarsSound { get { return 776; } }
  		public virtual int DefStarsRangeMin { get { return 5; } }
  		public virtual int DefStarsRangeMax { get { return 10; } }
  		public virtual int[] DefStars { get { return new[] {14170, 14155, 14138, 10980, 10296, 10297, 10298, 10299, 10300, 10301}; } }
  		public virtual int[] DefStarHues { get { return new int[0]; } }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public FireworkStars StarsEffect { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int StarsHue { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int StarsSound { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int StarsRangeMin { get; set; }
  
  		[CommandProperty(AccessLevel.GameMaster)]
  		public int StarsRangeMax { get; set; }
  
  		public List<int> Stars { get; set; }
  		public List<int> StarHues { get; set; }
  		#endregion
  
  		public BaseFireworkRocket(int itemID, int hue)
  			: base(itemID, hue)
  		{
  			LaunchID = DefLaunchID;
  			LaunchHue = DefLaunchHue;
  			LaunchSpeed = DefLaunchSpeed;
  			LaunchRender = DefLaunchRender;
  			LaunchSound = DefLaunchSound;
  			LaunchHeightMin = DefLaunchHeightMin;
  			LaunchHeightMax = DefLaunchHeightMax;
  			LaunchRangeMin = DefLaunchRangeMin;
  			LaunchRangeMax = DefLaunchRangeMax;
  
  			TrailID = DefTrailID;
  			TrailHue = DefTrailHue;
  			TrailSpeed = DefTrailSpeed;
  			TrailDuration = DefTrailDuration;
  			TrailRender = DefTrailRender;
  			TrailSound = DefTrailSound;
  
  			ExplodeID = DefExplodeID;
  			ExplodeHue = DefExplodeHue;
  			ExplodeSpeed = DefExplodeSpeed;
  			ExplodeDuration = DefExplodeDuration;
  			ExplodeRender = DefExplodeRender;
  			ExplodeSound = DefExplodeSound;
  
  			StarsEffect = DefStarsEffect;
  			StarsHue = DefStarsHue;
  			StarsSound = DefStarsSound;
  			StarsRangeMin = DefStarsRangeMin;
  			StarsRangeMax = DefStarsRangeMax;
  			Stars = new List<int>(DefStars);
  			StarHues = new List<int>(DefStarHues);
  		}
  
  		public BaseFireworkRocket(Serial serial)
  			: base(serial)
  		{ }
  
  		protected virtual Point3D[] GetPath()
  		{
  			var start = GetWorldLocation();
  			var end = start.GetRandomPoint2D(Utility.RandomMinMax(LaunchRangeMin, LaunchRangeMax));
  
  			return start.GetLine3D(end.ToPoint3D(Utility.RandomMinMax(LaunchHeightMin, LaunchHeightMax)), Map, false);
  		}
  
  		protected override bool OnFuseBurned(Mobile m)
  		{
  			return Launch(m);
  		}
  
  		protected bool Launch(Mobile m)
  		{
  			if (m == null || m.Deleted)
  			{
  				return false;
  			}
  
  			var path = GetPath();
  
  
gt: 			if (path == null || path.Length == 0)