public InstanceMap(int index, Map parent, string name, Season season, MapRules rules) : base(parent.MapID, index, parent.MapID, parent.Width, parent.Height, (int)season, name, rules) { InstanceRegions = new List <InstanceRegion>(); Mobiles = new List <Mobile>(); Items = new List <Item>(); BounceInfo = new Dictionary <PlayerMobile, MapPoint>(); if (!Maps.InBounds(MapIndex) || MapIndex == 255 || MapIndex == 127) { Serial = new InstanceMapSerial(-MapIndex); Deleted = true; return; } Serial = new InstanceMapSerial(MapIndex); Parent = parent; Maps[MapIndex] = this; AllMaps.Add(this); UpdateMaps(); }
public virtual void Register() { AllMaps.Add(this); World.AddMap(this); }