Esempio n. 1
0
        public void ChangeMap(eLevelId levelId)
        {
            var level        = engineDataManager.LevelPresets.First(x => x.LevelId == (int)levelId);
            var levelDetails = engineDataManager.LevelDetails.First(x => x.Id == level.LevelId);
            var levelType    = engineDataManager.LevelTypes.First(x => x.Id == levelDetails.LevelType);


            var mapNames = new List <string>();

            if (level.File1 != "0")
            {
                mapNames.Add(level.File1);
            }
            if (level.File2 != "0")
            {
                mapNames.Add(level.File2);
            }
            if (level.File3 != "0")
            {
                mapNames.Add(level.File3);
            }
            if (level.File4 != "0")
            {
                mapNames.Add(level.File4);
            }
            if (level.File5 != "0")
            {
                mapNames.Add(level.File5);
            }
            if (level.File6 != "0")
            {
                mapNames.Add(level.File6);
            }

            var random  = new Random(Seed);
            var mapName = "data\\global\\tiles\\" + mapNames[random.Next(mapNames.Count())].Replace("/", "\\");

            MapName = level.Name;
            Act     = levelType.Act;
            MapData = resourceManager.GetMPQDS1(mapName, level, levelDetails, levelType);

            getMapEngine().NotifyMapChanged();
        }
Esempio n. 2
0
        public static string GetMusicPathForLevel(eLevelId levelId)
        {
            switch (levelId)
            {
            case eLevelId.None:
                return(string.Empty);

            case eLevelId.Act1_Town1:
                return(BGMAct1Town1);

            case eLevelId.Act1_CaveTreasure2:
                return(BGMAct1Caves);

            case eLevelId.Act1_CaveTreasure3:
                return(BGMAct1Caves);

            case eLevelId.Act1_CaveTreasure4:
                return(BGMAct1Caves);

            case eLevelId.Act1_CaveTreasure5:
                return(BGMAct1Caves);

            case eLevelId.Act1_CryptCountessX:
                return(BGMAct1BloodRavenResolution);    // TODO: Verify

            case eLevelId.Act1_Tower2:
                return(BGMAct1Caves);    // TODO: Verify

            case eLevelId.Act1_MonFront:
                return(BGMAct1DenOfEvilAction);    // TODO: Verify

            case eLevelId.Act1_Courtyard1:
                return(BGMAct1Monastery);    // TODO: Verify

            case eLevelId.Act1_Courtyard2:
                return(BGMAct1Monastery);    // TODO: Verify

            case eLevelId.Act1_Cathedral:
                return(BGMAct1Monastery);    // TODO: Verify

            case eLevelId.Act1_Andariel:
                return(BGMAct1AndarielAction);

            case eLevelId.Act1_Tristram:
                return(BGMAct1Tristram);

            case eLevelId.Act2_Town:
                return(BGMAct2Town2);

            case eLevelId.Act2_Harem:
                return(BGMAct2Harem);

            case eLevelId.Act2_DurielsLair:
                return(BGMAct2Lair);

            case eLevelId.Act3_Town:
                return(BGMAct3Town3);

            case eLevelId.Act3_DungeonTreasure1:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_DungeonTreasure2:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_SewerTreasureX:
                return(BGMAct3KurastSewer);    // TODO: Verify

            case eLevelId.Act3_Temple1:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_Temple2:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_Temple3:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_Temple4:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_Temple5:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_Temple6:
                return(BGMAct3Kurast);    // TODO: Verify

            case eLevelId.Act3_MephistoComplex:
                return(BGMAct3MefDeathAction);    // TODO: Verify

            case eLevelId.Act4_Fortress:
                return(BGMAct4Mesa);    // TODO: Verify

            case eLevelId.Act5_Town:
                return(BGMAct5XTown);

            case eLevelId.Act5_TempleFinalRoom:
                return(BGMAct2Sanctuary);    // TODO: Verify

            case eLevelId.Act5_ThroneRoom:
                return(BGMAct2Sanctuary);    // TODO: Verify

            case eLevelId.Act5_WorldStone:
                return(BGMAct4ForgeAction);    // TODO: Verify

            case eLevelId.Act5_TempleEntrance:
                return(BGMAct5Baal);    // TODO: Verify

            case eLevelId.Act5_BaalEntrance:
                return(BGMAct5Baal);    // TODO: Verify

            default:
                return(string.Empty);
            }
        }
Esempio n. 3
0
 public IMapInfo InsertMap(eLevelId levelId, IMapInfo parentMap = null) => InsertMap((int)levelId, new Point(0, 0), parentMap);