/// <summary>
/// Creates new prop, based on prop data.
/// </summary>
/// <param name="propData"></param>
/// <param name="regionId"></param>
/// <param name="regionName"></param>
/// <param name="areaName"></param>
public Prop(PropData propData, int regionId, string regionName, string areaName)
: this(propData.EntityId, propData.Id, regionId, (int)propData.X, (int)propData.Y, propData.Direction, propData.Scale, 0, "", "", "")
{
// Set full name
this.GlobalName = string.Format("{0}/{1}/{2}", regionName, areaName, propData.Name);
// Save parameters for use by dungeons
this.Parameters = propData.Parameters.ToList();
// Add drop behaviour if drop type exists
var dropType = propData.GetDropType();
if (dropType != -1)
this.Behavior = Prop.GetDropBehavior(dropType);
// Replace default shapes with the ones loaded from region.
// (Is this really necessary?)
this.State = propData.State;
this.Shapes.Clear();
this.Shapes.AddRange(propData.Shapes.Select(a => a.GetPoints(0, 0, 0)));
}