コード例 #1
0
        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();
        }
コード例 #2
0
 public virtual void Register()
 {
     AllMaps.Add(this);
     World.AddMap(this);
 }