Example #1
0
 public void UpdateInformation(GeneralInformation GeneralInfo,
                               MapInformation MapInfo,
                               CharacterInformation CharInfo)
 {
     if (InvokeRequired)
     {
         Invoke(InvokeControls, GeneralInfo, MapInfo, CharInfo);
     }
     else
     {
         listView1.Items.Clear();
         foreach (string thread in InformationCollecter.Instance.Threads.Keys)
         {
             listView1.Items.Add(new ListViewItem(thread));
         }
         listView2.Clear();
         foreach (string str in GeneralInfo.ToString().Split('\n'))
         {
             listView2.Items.Add(new ListViewItem(str));
         }
         foreach (string str in CharInfo.ToString().Split('\n'))
         {
             listView2.Items.Add(new ListViewItem(str));
         }
         foreach (string str in MapInfo.ToString().Split('\n'))
         {
             listView2.Items.Add(new ListViewItem(str));
         }
     }
 }
Example #2
0
 public void TeleportThroughMap()
 {
     if (InformationCollecter.Instance.Threads.ContainsKey("MapScan"))
     {
         InformationCollecter.Instance.Threads["MapScan"].Abort();
         InformationCollecter.Instance.Threads.Remove("MapScan");
     }
     InformationCollecter.Instance.Threads.Add("MapScan",
                                               new Thread(new ThreadStart(
                                                              () =>
     {
         MapInformation MapInfo = InformationCollecter.Instance.MapInfo;
         while (InformationCollecter.Instance.MapInfo.ItemCount > 0)
         {
             for (int y = MapInfo.TopWall; y < MapInfo.BottomWall; y++)
             {
                 for (int x = MapInfo.LeftWall; x < MapInfo.RightWall; x++)
                 {
                     Teleport(x, y);
                 }
             }
         }
         Teleport(MapInfo.MapCenter);
     })));
     if (InformationCollecter.Instance.Threads.ContainsKey("MapScan"))
     {
         InformationCollecter.Instance.Threads["MapScan"].Start();
     }
 }
 public void BeginThreads()
 {
     Threads.Add("MapleStory", new Thread(new ThreadStart(() =>
     {
         while (true)
         {
             try
             {
                 Process MapleStory        = Process.GetProcessById(ProcessID);
                 ProcessHandle             = MapleStory.Handle;
                 MainWindowHandle          = MapleStory.MainWindowHandle;
                 GeneralInfo.ProcessHandle = ProcessHandle;
             }
             catch { Environment.Exit(0); }
             Thread.Sleep(100);
         }
     })));
     GeneralInfo = new GeneralInformation();
     Threads.Add("GeneralInformation", new Thread(
                     new ThreadStart(UpdateGeneralInformation)));
     MapInfo = new MapInformation();
     Threads.Add("MapInformation", new Thread(
                     new ThreadStart(UpdateMapInformation)));
     CharInfo = new CharacterInformation();
     Threads.Add("CharacterInformation", new Thread(
                     new ThreadStart(UpdateCharacterInformation)));
     Threads.Add("Position", new Thread(new ThreadStart(() =>
     {
         int CharacterBase = (int)BasePointer.CharacterBase;
         int MonsterBase   = (int)BasePointer.MonsterBase;
         int Mob1          = (int)Offset.Mob1,
         Mob2                  = (int)Offset.Mob2,
         Mob3                  = (int)Offset.Mob3,
         Mob4                  = (int)Offset.Mob4;
         int MouseBase         = (int)BasePointer.MouseBase;
         int MouseLocationBase = (int)Offset.MouseLocation;
         while (true)
         {
             CharInfo.Position = new Point(
                 ReadInt32Pointer(CharacterBase, (int)Offset.CharacterX),
                 ReadInt32Pointer(CharacterBase, (int)Offset.CharacterY));
             UpdatePosition();
             CharInfo.MouseAnimation = ReadInt32Pointer(MouseBase, (int)Offset.MouseAnimation);
             CharInfo.MouseLocation  = new Point(
                 ReadInt32MultiPointer(MouseBase, new int[] { MouseLocationBase, (int)Offset.MouseX }),
                 ReadInt32MultiPointer(MouseBase, new int[] { MouseLocationBase, (int)Offset.MouseY }));
             MapInfo.MobPosition = new Point(
                 ReadInt32MultiPointer(MonsterBase, new int[] { Mob1, Mob2, Mob3, Mob4, (int)Offset.MobX }),
                 ReadInt32MultiPointer(MonsterBase, new int[] { Mob1, Mob2, Mob3, Mob4, (int)Offset.MobY }));
             Thread.Sleep(1);
         }
     })));
     foreach (Thread thread in Threads.Values)
     {
         thread.Start();
     }
 }
Example #4
0
        public void LoadMap(String _file)
        {
            mapInfo = FileManager <MapInformation> .LoadFile(@"Content\Map\" + _file);

            emptyBlockTexture = GameManager.Instance.CreateColorTexture(255, 255, 255, 255);
            this.tileSize     = 32;
            widthHeight       = new Vector2(mapInfo.Tiles.GetLength(0), mapInfo.Tiles.GetLength(1));
            boundary          = new Rectangle(0, 0, (int)(widthHeight.X * tileSize), (int)(widthHeight.Y * tileSize));
            Thread.Sleep(500);
        }
 public void LoadMap()
 {
     try
     {
         mapInfo = FileManager <MapInformation> .LoadFileGameObject(".gmap", "Map");
     }catch (NoFileSelectedException e)
     {
         MessageBox.Show("Alert:" + e.Message);
     }
 }
 internal PropertyMetadata(TDH_IN_TYPE inType, TDH_OUT_TYPE outType, string name, bool isMapValue, bool isStruct, int childrenCount, MapInformation map)
 {
     this.InType = inType;
     this.OutType = outType;
     this.Name = name;
     this.IsMapValue = isMapValue;
     this.IsStruct = isStruct;
     this.ChildrenCount = childrenCount;
     this.Map = map;
 }
Example #7
0
        private void GameEvents_OnAfterLoadedContent(object sender, System.EventArgs e)
        {
            MapInformation busStopEdit1 = new MapInformation(Instance, Instance.ModSettings.GetMap("busStop_edit1"));
            MapInformation busStopEdit2 = new MapInformation(Instance, Instance.ModSettings.GetMap("busStop_edit2"));
            MapInformation busStopEdit3 = new MapInformation(Instance, Instance.ModSettings.GetMap("busStop_edit3"));

            LocationUtilities.RegisterMap(Instance, "Maps\\BusStop", busStopEdit1);
            LocationUtilities.RegisterMap(Instance, "Maps\\BusStop", busStopEdit2);
            LocationUtilities.RegisterMap(Instance, "Maps\\BusStop", busStopEdit3);
        }
Example #8
0
 static MapManager()
 {
     //Maps
     maps.Add(new MapInformation("Empty Map", "map_0", 8, 8));
     maps.Add(new MapInformation("River Islands", "map_1", 4, 3));
     maps.Add(new MapInformation("BattleField", "map_2", 6, 6));
     maps.Add(new MapInformation("Rocky Valley", "map_3", 6, 6));
     //Default-map
     currentMap = maps[0];
 }
Example #9
0
 private void AddFirstLevel()
 {
     // Load all level information from XML: map and enemies.
     MapInformation mapInformation = new MapInformation(Game);
     mapInformation.LoadMapFromXML("test map");
     MapGenerator mapGen = new MapGenerator(Game);
     TileMap map = mapGen.Generate(mapInformation, camera);
     // Create a level from that xml level information
     Level firstLevel = new Level(Game, "First Island", map, mapGen.Enemies, player);
     AddLevel(firstLevel);
 }
Example #10
0
        /// <summary>
        ///     Called when the screen is exiting
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnScreenExiting(object sender, ScreenExitingEventArgs e)
        {
            MapInformation.ClearAnimations();
            MapInformation.MoveToY((int)-MapInformation.Height, Easing.OutQuint, 600);

            ButtonContainer.ClearAnimations();
            ButtonContainer.MoveToY((int)(ScoreContainer.Y + ScoreContainer.Height + 50 + ButtonContainer.Height), Easing.OutQuint, 600);

            ScoreContainer.ClearAnimations();
            ScoreContainer.MoveToX(ScoreContainer.Width + 100, Easing.OutQuint, 600);
        }
Example #11
0
 void Start()
 {
     //Set this mapinfo to the static variable, so we can access it from other scripts easily
     if (gameMapInfo == null)
     {
         gameMapInfo = this;
     }
     else
     {
         Debug.LogError("We have multiple MapInfos in this scene!");
     }
 }
Example #12
0
    public void DefenderMapInfo(AccountInfo account, MapInformation map)
    {
        maxHP         = account.playerLevel * 20;
        currentHP     = maxHP;
        maxEnergy     = 100 + (account.playerLevel * 10f);
        currentEnergy = maxEnergy;

        map.mapHealthMax     = maxHP;
        map.mapHealthCurrent = maxHP;
        map.playerEnergyMax  = (int)maxEnergy;
        map.playerEnergy     = currentEnergy;
    }
Example #13
0
        //
        // GET: /Map/

        public ActionResult Index()
        {
            var data = new MapInformation()
            {
                Cities             = _mapDB.Cities,
                Countries          = _mapDB.Countries,
                Airports           = _mapDB.Airports,
                Distances          = _mapDB.Distances,
                NeighbourCountries = _mapDB.NeighbourCountries,
                Products           = _mapDB.Products,
                ProductsInCities   = _mapDB.ProductInCities
            };

            return(View(data));
        }
Example #14
0
        public ActionResult <MapInformation> GetAllInformation()
        {
            MapInformation mapInformation = new MapInformation();

            try
            {
                mapInformation = mapService.GetAllInformation();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.InnerException.Message);
                return(mapInformation);
            }

            return(mapInformation);
        }
Example #15
0
        public void Init()
        {
            //The viewing window sizes
            viewSizeStartX = 0;
            viewSizeStartY = 0;
            viewSizeX      = 30;
            viewSizeY      = 26;

            mapInfo = new MapInformation();
            mapInfo.Init();

            Position  = new Vector2(240, 25);
            mapBorder = new Rectangle((int)Position.X, (int)Position.Y, viewSizeX * 32, viewSizeY * 32);
            cursor    = new Cursor();
            cursor.SetCursor("MapCursor");
        }
Example #16
0
 public static void Load()
 {
     MySqlCommand command = new MySqlCommand(MySqlCommandType.SELECT);
     command.Select("maps");
     MySqlReader reader = new MySqlReader(command);
     while (reader.Read())
     {
         MapInformation info = new MapInformation();
         info.ID = reader.ReadUInt16("id");
         info.BaseID = reader.ReadUInt16("mapdoc");
         info.Status = reader.ReadUInt32("type");
         info.Weather = reader.ReadUInt32("weather");
         MapInformations.Add(info.ID, info);
     }
     reader.Close();
     Console.WriteLine("Map informations loaded.");
 }
Example #17
0
    public void Awake()
    {
        // Verifying only one instance of MapManager is in existance
        if (instance == null)
        {
            instance = this;
        }
        // If another exist then destroy this one
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        mapInfo = new MapInformation();

        DontDestroyOnLoad(gameObject);

        spawnPlayer(startColumn, startRow);

        Initialization();

        CreateMenus();
    }
 /// <summary>
 /// Default constructor. Initialises properites and variables to 'default' values.
 /// </summary>
 /// <param name="species">The species of this animal.</param>
 /// <param name="location">The start location of this animal.</param>
 /// <param name="foodSource">The food source of this animal.</param>
 /// <param name="helper">An instance of IHelper.</param>
 /// <param name="lifeformPublisher">An instance of AnimalPublisher.</param>
 /// <param name="drawPublisher">An instance of DrawPublisher.</param>
 /// <param name="mapInformation">An instance of MapInformation.</param>
 public Monoecious(string species, Vector location, IHelper helper, LifeformPublisher lifeformPublisher, DrawPublisher drawPublisher, MapInformation mapInformation) : base(species, location, helper, lifeformPublisher, drawPublisher, mapInformation)
 {
 }
        private void GameEvents_AfterContentLoaded(object sender, EventArgs e)
        {
            var caveEdit = new MapInformation(Instance, Instance.ModSettings.GetMap("farmCave_Edit"));

            LocationUtilities.RegisterMap(Instance, "Maps\\FarmCave", caveEdit);
        }
Example #20
0
        public MapInformation GetAllInformation()
        {
            MapInformation mapInformation = new MapInformation();
            List <string>  days           = new List <string>();
            var            query_days     = platformContext.EveryDataAndNewes.ToList();

            for (int i = 0; i < query_days.Count(); i++)
            {
                days.Add(query_days[i].Date);
            }

            List <string> news       = new List <string>();
            var           query_news = platformContext.EveryDataAndNewes.ToList();

            for (int i = 0; i < query_news.Count(); i++)
            {
                news.Add(query_news[i].News);
            }

            List <List <int> > lists = new List <List <int> >();
            var query = platformContext.EveryDataAndNewes.ToList();

            for (int i = 0; i < query.Count; i++)
            {
                List <int> newList = new List <int>();
                newList.Add(query[i].HuBei);
                newList.Add(query[i].GuangDong);
                newList.Add(query[i].ZheJiang);
                newList.Add(query[i].HuNan);
                newList.Add(query[i].HeNan);
                newList.Add(query[i].AnHui);
                newList.Add(query[i].ChongQing);
                newList.Add(query[i].ShanDong);
                newList.Add(query[i].JiangXi);
                newList.Add(query[i].SiChuan);
                newList.Add(query[i].JiangSu);
                newList.Add(query[i].BeiJing);
                newList.Add(query[i].FuJian);
                newList.Add(query[i].ShangHai);
                newList.Add(query[i].GuangXi);
                newList.Add(query[i].HeBei);
                newList.Add(query[i].Sanxi);
                newList.Add(query[i].YunNan);
                newList.Add(query[i].HaiNan);
                newList.Add(query[i].HeiLongJiang);
                newList.Add(query[i].LiaoNing);
                newList.Add(query[i].ShanXi);
                newList.Add(query[i].TianJin);
                newList.Add(query[i].GanSu);
                newList.Add(query[i].NeiMengGu);
                newList.Add(query[i].XinJiang);
                newList.Add(query[i].NingXia);
                newList.Add(query[i].JiLin);
                newList.Add(query[i].GuiZhou);
                newList.Add(query[i].QingHai);
                newList.Add(query[i].XiZang);
                newList.Add(query[i].AoMen);
                newList.Add(query[i].XiangGang);
                newList.Add(query[i].TaiWan);
                lists.Add(newList);
            }

            mapInformation.days  = days;
            mapInformation.news  = news;
            mapInformation.lists = lists;

            return(mapInformation);
        }
Example #21
0
        /// <summary>
        /// Loads the specified file.
        /// </summary>
        /// <param name="filePath">The file path.</param>
        public void Load(string filePath)
        {
            FileName = Path.GetFileName(filePath);

            FileHandler fh = new FileHandler(FilePath = filePath, FileHandler.FileOpenMode.Reading, Encoding.UTF8);

            int blockCount = fh.Read<int>();

            MapInfo = new MapInformation();
            Decoration = new List<BaseIFO>();
            NPCs = new List<NPC>();
            Construction = new List<BaseIFO>();
            Sounds = new List<Sound>();
            Effects = new List<Effect>();
            Animation = new List<BaseIFO>();
            WideWater = new UnusedWater();
            Monsters = new List<MonsterSpawn>();
            Water = new List<WaterBlock>();
            WarpGates = new List<BaseIFO>();
            Collision = new List<BaseIFO>();
            EventTriggers = new List<EventTrigger>();

            for (int i = 0; i < blockCount; i++)
            {
                BlockType blockType = (BlockType)fh.Read<int>();
                int offset = fh.Read<int>();
                int position = fh.Tell();

                fh.Seek(offset, SeekOrigin.Begin);

                switch(blockType)
                {
                    case BlockType.MapInfo:
                        {
                            MapInfo.Width = fh.Read<int>();
                            MapInfo.Height = fh.Read<int>();

                            MapInfo.MapCellX = fh.Read<int>();
                            MapInfo.MapCellY = fh.Read<int>();

                            MapInfo.World = new Matrix4x4()
                            {
                                m00 = fh.Read<float>(),
                                m01 = fh.Read<float>(),
                                m02 = fh.Read<float>(),
                                m03 = fh.Read<float>(),
                                m10 = fh.Read<float>(),
                                m11 = fh.Read<float>(),
                                m12 = fh.Read<float>(),
                                m13 = fh.Read<float>(),
                                m20 = fh.Read<float>(),
                                m21 = fh.Read<float>(),
                                m22 = fh.Read<float>(),
                                m23 = fh.Read<float>(),
                                m30 = fh.Read<float>(),
                                m31 = fh.Read<float>(),
                                m32 = fh.Read<float>(),
                                m33 = fh.Read<float>()
                            };

                            MapInfo.MapName = fh.Read<BString>();

                            MapInfo.Parent = this;

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Decoration:
                        {
                            int entryCount = fh.Read<int>();
                            Decoration = new List<BaseIFO>(entryCount);
                            for (int j = 0; j < entryCount; j++)
                            {
                                Decoration.Add(new BaseIFO()
                                {
                                    Description = fh.Read<BString>(),

                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        y = fh.Read<int>(),
                                        x = fh.Read<int>()
                                    },

                                   	//Rotation = fh.Read<Quaternion>(),
                                    Rotation = Utils.r2uRotation(new Quaternion()
                                    {
                                        //w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        w = fh.Read<float>()
                                    }),
                                    Position = Utils.r2uPosition( new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Scale = Utils.r2uScale ( new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.NPCs:
                        {
                            int entryCount = fh.Read<int>();
                            NPCs = new List<NPC>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                NPCs.Add(new NPC()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = Utils.r2uRotation(new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Position = Utils.r2uPosition(new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Scale = Utils.r2uScale (new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    AIPatternIndex = fh.Read<int>(),
                                    Path = fh.Read<BString>(),
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Construction:
                        {
                            int entryCount = fh.Read<int>();
                            Construction = new List<BaseIFO>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Construction.Add(new BaseIFO()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        y = fh.Read<int>(),
                                        x = fh.Read<int>()
                                    },

                                    Rotation = Utils.r2uRotation( new Quaternion()
                                    {
                                        //w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        w = fh.Read<float>()
                                    }),
                                    Position = Utils.r2uPosition( new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Scale = Utils.r2uScale (new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Sounds:
                        {
                            int entryCount = fh.Read<int>();
                            Sounds = new List<Sound>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Sounds.Add(new Sound()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = Utils.r2uRotation(new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Position = Utils.r2uPosition(new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Scale = Utils.r2uScale (new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        y = fh.Read<float>(),
                                        z = fh.Read<float>()
                                    }),
                                    Path = fh.Read<BString>(),
                                    Range = fh.Read<int>(),
                                    Interval = fh.Read<int>(),
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Effects:
                        {
                            int entryCount = fh.Read<int>();
                            Effects = new List<Effect>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Effects.Add(new Effect()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Position = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Scale = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Path = fh.Read<BString>(),
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Animation:
                        {
                            int entryCount = fh.Read<int>();
                            Animation = new List<BaseIFO>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Animation.Add(new BaseIFO()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Position = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Scale = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.WideWater:
                        {
                            WideWater.x = fh.Read<int>();
                            WideWater.y = fh.Read<int>();

                            WideWater.WaterBlocks = new UnusedWater.WaterBlock[WideWater.x, WideWater.x];

                            for (int j = 0; j < WideWater.x; j++)
                            {
                                for (int k = 0; k < WideWater.y; k++)
                                {
                                    WideWater.WaterBlocks[j, k] = new UnusedWater.WaterBlock()
                                    {
                                        Use = fh.Read<byte>(),
                                        Height = fh.Read<float>(),
                                        WaterType = fh.Read<int>(),
                                        WaterIndex = fh.Read<int>(),
                                        Reserved = fh.Read<int>()
                                    };
                                }
                            }

                            WideWater.Parent = this;

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Monsters:
                        {
                            int entryCount = fh.Read<int>();
                            Monsters = new List<MonsterSpawn>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Monsters.Add(new MonsterSpawn()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Position = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Scale = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Name = fh.Read<BString>(),
                                    Parent = this
                                });

                                int basicCount = fh.Read<int>();

                                Monsters[j].Basic = new List<MonsterSpawn.Monster>(basicCount);

                                for (int k = 0; k < basicCount; k++)
                                {
                                    Monsters[j].Basic.Add(new MonsterSpawn.Monster()
                                    {
                                        Description = fh.Read<BString>(),
                                        ID = fh.Read<int>(),
                                        Count = fh.Read<int>(),
                                    });
                                }

                                int tacticCount = fh.Read<int>();

                                Monsters[j].Tactic = new List<MonsterSpawn.Monster>(tacticCount);

                                for (int k = 0; k < tacticCount; k++)
                                {
                                    Monsters[j].Tactic.Add(new MonsterSpawn.Monster()
                                    {
                                        Description = fh.Read<BString>(),
                                        ID = fh.Read<int>(),
                                        Count = fh.Read<int>(),
                                    });
                                }

                                Monsters[j].Interval = fh.Read<int>();
                                Monsters[j].Limit = fh.Read<int>();
                                Monsters[j].Range = fh.Read<int>();
                                Monsters[j].TacticPoints = fh.Read<int>();

                                Monsters[j].Parent = this;
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Water:
                        {
                            fh.Read<float>();

                            int entryCount = fh.Read<int>();
                            Water = new List<WaterBlock>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Water.Add(new WaterBlock()
                                {
                                    Minimum = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Maximum = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.WarpGates:
                        {
                            int entryCount = fh.Read<int>();
                            WarpGates = new List<BaseIFO>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                WarpGates.Add(new BaseIFO()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Position = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Scale = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                        break;
                    case BlockType.Collision:
                        {
                            int entryCount = fh.Read<int>();
                            Collision = new List<BaseIFO>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                Collision.Add(new BaseIFO()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Position = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Scale = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                        }
                     break;
                    case BlockType.EventTriggers:
                        {
                            int entryCount = fh.Read<int>();
                            EventTriggers = new List<EventTrigger>(entryCount);

                            for (int j = 0; j < entryCount; j++)
                            {
                                EventTriggers.Add(new EventTrigger()
                                {
                                    Description = fh.Read<BString>(),
                                    WarpID = fh.Read<short>(),
                                    EventID = fh.Read<short>(),
                                    ObjectType = (ObjectType)fh.Read<int>(),
                                    ObjectID = fh.Read<int>(),
                                    MapPosition = new Vector2()
                                    {
                                        x = fh.Read<int>(),
                                        y = fh.Read<int>()
                                    },
                                    Rotation = new Quaternion()
                                    {
                                        w = fh.Read<float>(),
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Position = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    Scale = new Vector3()
                                    {
                                        x = fh.Read<float>(),
                                        z = fh.Read<float>(),
                                        y = fh.Read<float>()
                                    },
                                    QSDTrigger = fh.Read<BString>(),
                                    LUATrigger = fh.Read<BString>(),
                                    Parent = this
                                });
                            }

                            fh.Seek(position, SeekOrigin.Begin);
                     }
                     break;
                }
            }

            fh.Close();
        }
 internal PropertyMetadata(TDH_IN_TYPE inType, TDH_OUT_TYPE outType, string name, bool isMapValue, bool isStruct, int childrenCount, MapInformation map)
 {
     this.InType        = inType;
     this.OutType       = outType;
     this.Name          = name;
     this.IsMapValue    = isMapValue;
     this.IsStruct      = isStruct;
     this.ChildrenCount = childrenCount;
     this.Map           = map;
 }