Esempio n. 1
0
        private static bool Matches(WorldMapArea area, string[] s)
        {
            var areaname = s[0].Replace(" ", "").Replace("'", "");

            return(areaname.StartsWith(area.AreaName, StringComparison.InvariantCultureIgnoreCase) ||
                   area.AreaName.StartsWith(areaname, StringComparison.InvariantCultureIgnoreCase));
        }
Esempio n. 2
0
        public WorldMapAreaSpot ToMapAreaSpot(float x, float y, float z, int mapHint)
        {
            var area = WorldMapArea.GetWorldMapArea(worldMapAreas, x, y, search.continent, mapHint);

            return(new WorldMapAreaSpot
            {
                Y = area.ToMapX(x),
                X = area.ToMapY(y),
                Z = z,
                MapID = area.UIMapId
            });
        }
        private static void PopulateUIMap(WorldMapArea area, IEnumerable <string[]> uimapLines)
        {
            var kalidor = uimapLines.Where(s => s[0] == "Kalimdor").Select(s => s[1]).FirstOrDefault();

            var matches = uimapLines.Where(s => Matches(area, s))
                          .ToList();

            //if (matches.Count>1)
            //{

            //}

            matches.ForEach(a =>
            {
                area.UIMapId   = int.Parse(a[1]);
                area.Continent = a[2] == kalidor ? "Kalimdor" : "Azeroth";
            });
        }
Esempio n. 4
0
 public PPatherService(Action <string> onWrite)
 {
     logger             = new PatherPath.Logger(onWrite);
     this.worldMapAreas = WorldMapArea.Read(logger);
 }
Esempio n. 5
0
 public PPatherService()
 {
     logger             = new PatherPath.Logger((s) => Log(s));
     this.worldMapAreas = WorldMapArea.Read(logger);
 }
 public PPatherService()
 {
     this.worldMapAreas = WorldMapArea.Read();
     logger             = new PatherPath.Logger(Log);
 }