Пример #1
0
 public override void DeserializeAttribute(OtItemAttribute attribute, OtPropertyReader reader)
 {
     if (attribute == OtItemAttribute.TELE_DEST)
     {
         SetAttribute(OtItemAttribute.TELE_DEST, reader.ReadLocation());
     }
     else
     {
         base.DeserializeAttribute(attribute, reader);
     }
 }
Пример #2
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;
            }
        }