public Map GenerateDungeon(DungeonTypes dungeonType)
        {
            Map dungeon = null;

            switch (dungeonType)
            {
                case DungeonTypes.Cave:
                    break;

                case DungeonTypes.Standard:
                    break;
            }

            return dungeon;
        }
Exemplo n.º 2
0
        static Instances()
        {
            _BounceRestore = new Dictionary <PlayerMobile, MapPoint>(0x100);
            _ItemRestore   = new Dictionary <Item, IEntity>(0x1000);

            CSOptions = new InstanceMapsOptions();

            IndexFile = IOUtility.EnsureFile(VitaNexCore.SavesDirectory + "/InstanceMaps/Maps.idx");

            RestoreFile = IOUtility.EnsureFile(VitaNexCore.CacheDirectory + "/InstanceMaps/Restore.bin");
            RestoreFile.SetHidden(true);

            Lockouts = new BinaryDataStore <PlayerMobile, LockoutState>(VitaNexCore.SavesDirectory + "/InstanceMaps", "Lockouts")
            {
                Async         = true,
                OnSerialize   = SerializeLockouts,
                OnDeserialize = DeserializeLockouts
            };

            Maps = new BinaryDirectoryDataStore <InstanceMapSerial, InstanceMap>(VitaNexCore.SavesDirectory + "/InstanceMaps", "Maps", "bin")
            {
                Async         = true,
                OnSerialize   = SerializeMap,
                OnDeserialize = DeserializeMap
            };

            Dungeons = new BinaryDirectoryDataStore <DungeonSerial, Dungeon>(VitaNexCore.SavesDirectory + "/InstanceMaps", "Dungeons", "bin")
            {
                Async         = true,
                OnSerialize   = SerializeDungeon,
                OnDeserialize = DeserializeDungeon
            };

            DungeonTypes = typeof(Dungeon).GetConstructableChildren();

            var instances = DungeonTypes
                            .Select(t => t.CreateInstanceSafe <Dungeon>())
                            .Where(d => d != null && d.ID != DungeonID.None && d.GroupMax > 0)
                            .Where(d => d.MapParent != null && !(d.MapParent is InstanceMap))
                            .ToList();

            DungeonInfo = instances.Select(d => new DungeonInfo(d)).ToArray();

            instances.ForEach(d => d.Delete());
            instances.Free(true);

            DefragmentTimer = PollTimer.FromMinutes(10.0, Defragment, () => !_Defragmenting, false);
        }
Exemplo n.º 3
0
    public DungeonData(DungeonTypes type, int length)
    {
        InitGrid(length, length);

        SpawnPoint = new DungeonNode(GridX / 2, GridX / 2);

        if (type == DungeonTypes.Path)
        {
            CreatePath(SpawnPoint.x, SpawnPoint.z, length);
        }
        else if (type == DungeonTypes.Dungeon)
        {
            CreateDungeon(SpawnPoint.x, SpawnPoint.z, length);
        }

        grid[SpawnPoint.x, SpawnPoint.z].enemiesCleard = true;
    }