public static MapActiveObjectState DeserializeMapActiveObjectState(BinaryReader Reader, MapTileSet mapTileSet)
        {
            Guid activeObjectId = DeserializeMapObjectReference(Reader);

            if (activeObjectId == Guid.Empty)
            {
                return(null);
            }
            MapActiveObject activeObject = null;

            if ((mapTileSet != null) && mapTileSet.ContainsId(activeObjectId))
            {
                activeObject = mapTileSet[activeObjectId] as MapActiveObject;
            }
            if (activeObject == null)
            {
                return(null);
            }

            MapPoint             position = DeserializeMapPoint(Reader);
            MapActiveObjectState state    = new MapActiveObjectState(activeObject, position);

            state.Direction = DeserializeMapDirection(Reader);
            state.ArmorType = DeserializeMapArmorType(Reader);
            state.Health    = Reader.ReadUInt16();

            return(state);
        }
        private static MapVisualObject GetTile(Guid Id, MapTileSet TileSet)
        {
            if ((TileSet != null) && TileSet.ContainsId(Id))
            {
                return(TileSet[Id]);
            }

            return(null);
        }
        public static MapActiveObjectState DeserializeMapActiveObjectState(BinaryReader Reader, MapTileSet mapTileSet)
        {
            Guid activeObjectId = DeserializeMapObjectReference(Reader);
            if (activeObjectId == Guid.Empty) return null;
            MapActiveObject activeObject = null;
            if ((mapTileSet != null) && mapTileSet.ContainsId(activeObjectId)) activeObject = mapTileSet[activeObjectId] as MapActiveObject;
            if (activeObject == null) return null;

            MapPoint position = DeserializeMapPoint(Reader);
            MapActiveObjectState state = new MapActiveObjectState(activeObject, position);
            state.Direction = DeserializeMapDirection(Reader);
            state.ArmorType = DeserializeMapArmorType(Reader);
            state.Health = Reader.ReadUInt16();

            return state;
        }
        private static MapVisualObject GetTile(Guid Id, MapTileSet TileSet)
        {
            if ((TileSet != null) && TileSet.ContainsId(Id))
                return TileSet[Id];

            return null;
        }