コード例 #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));
        }
コード例 #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
            });
        }
コード例 #3
0
        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";
            });
        }
コード例 #4
0
 public PPatherService(Action <string> onWrite)
 {
     logger             = new PatherPath.Logger(onWrite);
     this.worldMapAreas = WorldMapArea.Read(logger);
 }
コード例 #5
0
 public PPatherService()
 {
     logger             = new PatherPath.Logger((s) => Log(s));
     this.worldMapAreas = WorldMapArea.Read(logger);
 }
コード例 #6
0
 public PPatherService()
 {
     this.worldMapAreas = WorldMapArea.Read();
     logger             = new PatherPath.Logger(Log);
 }