Ejemplo n.º 1
0
        private BaseDoor GetDoor2()
        {
            if (DoorTwo == null || DoorTwo.Deleted)
            {
                //BaseDoor door = this.GetEnumeratedItems().OfType<DarkWoodDoor>().FirstOrDefault(d => d.Location == _DoorOneLoc);
                Point3D  p    = _DoorTwoLoc;
                BaseDoor door = GetDoor(p);

                if (door == null)
                {
                    door = GetDoor(new Point3D(p.X + 1, p.Y + 1, p.Z));
                }

                if (door == null)
                {
                    DoorTwo = new DarkWoodDoor(DoorFacing.EastCCW);
                    DoorTwo.MoveToWorld(_DoorTwoLoc, Map.Malas);
                }
                else
                {
                    DoorTwo = door;
                }

                DoorTwo.Locked = false;
            }

            return(DoorTwo);
        }
Ejemplo n.º 2
0
        private static void CreateDoor(Point3D loc, Map map)
        {
            ArrayList removelist = new ArrayList();

            for (int i = 0; i < 2; i++)
            {
                IPooledEnumerable ipe = map.GetItemsInRange(new Point3D(loc.X, loc.Y + i, loc.Z), 0);

                foreach (Item item in ipe)
                {
                    if (item is DarkWoodDoor)
                    {
                        removelist.Add(item);
                    }
                }
            }

            foreach (Item item in removelist)
            {
                item.Delete();
            }

            DarkWoodDoor door1 = new DarkWoodDoor(DoorFacing.NorthCCW);
            DarkWoodDoor door2 = new DarkWoodDoor(DoorFacing.SouthCW);

            door1.Link = door2;
            door2.Link = door1;

            door1.MoveToWorld(loc, map);
            door2.MoveToWorld(new Point3D(loc.X, loc.Y + 1, loc.Z), map);
        }
Ejemplo n.º 3
0
        private static void CreateDoor(int x, int y, int z)
        {
            ArrayList removelist = new ArrayList();

            for (int i = 0; i < 2; i++)
            {
                IPooledEnumerable ipe = Map.Malas.GetItemsInRange(new Point3D(x, y + i, z), 0);

                foreach (Item item in ipe)
                {
                    if (item is DarkWoodDoor)
                    {
                        removelist.Add(item);
                    }
                }
            }

            foreach (Item item in removelist)
            {
                item.Delete();
            }

            DarkWoodDoor door1 = new DarkWoodDoor(DoorFacing.NorthCCW);
            DarkWoodDoor door2 = new DarkWoodDoor(DoorFacing.SouthCW);

            door1.Link = door2;
            door2.Link = door1;

            door1.MoveToWorld(new Point3D(x, y, z), Map.Malas);
            door2.MoveToWorld(new Point3D(x, y + 1, z), Map.Malas);
        }
Ejemplo n.º 4
0
        public static BaseDoor AddDoor(int x, int y, int z, DoorFacing facing)
        {
            if (!m_Map.CanFit(x, y, z, 16, false, false))
            {
                return(null);
            }

            if (y == 1743 && x >= 1343 && x <= 1344)
            {
                return(null);
            }

            if (y == 1679 && x >= 1392 && x <= 1393)
            {
                return(null);
            }

            if (x == 1320 && y >= 1618 && y <= 1640)
            {
                return(null);
            }

            if (x == 1383 && y >= 1642 && y <= 1643)
            {
                return(null);
            }

            BaseDoor door = new DarkWoodDoor(facing);

            door.MoveToWorld(new Point3D(x, y, z), m_Map);

            ++m_Count;

            return(door);
        }