BattleInfoPlugin.Models.Repositories.MapResource.MapResourcePrivate.GetMapCellPoints C# (CSharp) Метод

GetMapCellPoints() публичный статический Метод

public static GetMapCellPoints ( MapInfo map ) : Point>.IDictionary
map MapInfo
Результат Point>.IDictionary
            public static IDictionary<int, Point> GetMapCellPoints(MapInfo map)
            {
                var swf = map.ToSwf();
                if (swf == null) return new Dictionary<int, Point>();

                var places = swf.Tags
                    .OfType<DefineSpriteTag>()
                    .SelectMany(sprite => sprite.ControlTags)
                    .OfType<PlaceObject2Tag>()
                    .Where(place => place.Name != null)
                    .Where(place => place.Name.StartsWith("line"))
                    .ToArray();
                var cellNumbers = Master.Current.MapInfos[map.Id]
                    //.Where(c => new[] { 0, 1, 2, 3, 8 }.All(x => x != c.Value.ColorNo)) //敵じゃないセルは除外(これでは気のせいは見分け付かない)
                    .Select(c => c.IdInEachMapInfo)
                    .ToArray();
                return cellNumbers
                    .OrderBy(n => n)
                    .ToDictionary(n => n, n => places.FindPoint(n));
            }