Beispiel #1
0
        private void ParseTowns(OtFileReader reader, OtFileNode otbNode)
        {
            OtFileNode nodeTown = otbNode.Child;

            while (nodeTown != null)
            {
                OtPropertyReader props = reader.GetPropertyReader(nodeTown);

                uint   townid         = props.ReadUInt32();
                string townName       = props.GetString();
                var    templeLocation = props.ReadLocation();

                var town = new OtTown {
                    Id = townid, Name = townName, TempleLocation = templeLocation
                };
                towns[townid] = town;

                nodeTown = nodeTown.Next;
            }
        }
        private void ParseTowns(OtFileReader reader, OtFileNode otbNode)
        {
            OtFileNode nodeTown = otbNode.Child;

            while (nodeTown != null)
            {
                OtPropertyReader props = reader.GetPropertyReader(nodeTown);

                uint townid = props.ReadUInt32();
                string townName = props.GetString();
                var templeLocation = props.ReadLocation();

                var town = new OtTown { Id = townid, Name = townName, TempleLocation = templeLocation };
                towns[townid] = town;

                nodeTown = nodeTown.Next;
            }
        }