public override void DeserializeAttribute(OtItemAttribute attribute, OtPropertyReader reader) { if (attribute == OtItemAttribute.TELE_DEST) { SetAttribute(OtItemAttribute.TELE_DEST, reader.ReadLocation()); } else { base.DeserializeAttribute(attribute, reader); } }
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; } }