public void ReadXml(XmlNode node, List <NodeLink> allLinksList) { AreaID = (ushort)Xml.GetChildUIntAttribute(node, "AreaID", "value"); NodeID = (ushort)Xml.GetChildUIntAttribute(node, "NodeID", "value"); StreetName = XmlYnd.GetTextHash(Xml.GetChildInnerText(node, "StreetName")); Vector3 p = Xml.GetChildVector3Attributes(node, "Position"); PositionX = (short)(p.X * 4.0f); PositionY = (short)(p.Y * 4.0f); PositionZ = (short)(p.Z * 32.0f); Flags0 = (byte)Xml.GetChildUIntAttribute(node, "Flags0", "value"); Flags1 = (byte)Xml.GetChildUIntAttribute(node, "Flags1", "value"); Flags2 = (byte)Xml.GetChildUIntAttribute(node, "Flags2", "value"); Flags3 = (byte)Xml.GetChildUIntAttribute(node, "Flags3", "value"); Flags4 = (byte)Xml.GetChildUIntAttribute(node, "Flags4", "value"); int linkCountUnk = (byte)Xml.GetChildUIntAttribute(node, "Flags5", "value"); LinkID = (ushort)allLinksList.Count; int linkCount = 0; var linksnode = node.SelectSingleNode("Links"); if (linksnode != null) { var linkitems = linksnode.SelectNodes("Item"); foreach (XmlNode linkitem in linkitems) { NodeLink link = new NodeLink(); link.ReadXml(linkitem); allLinksList.Add(link); linkCount++; } } LinkCountFlags = (byte)((linkCount << 3) + (linkCountUnk & 7)); }
public void ReadXml(XmlNode node) { AreaID = (ushort)Xml.GetChildUIntAttribute(node, "ToAreaID", "value"); NodeID = (ushort)Xml.GetChildUIntAttribute(node, "ToNodeID", "value"); Flags0 = (byte)Xml.GetChildUIntAttribute(node, "Flags0", "value"); Flags1 = (byte)Xml.GetChildUIntAttribute(node, "Flags1", "value"); Flags2 = (byte)Xml.GetChildUIntAttribute(node, "Flags2", "value"); LinkLength = (byte)Xml.GetChildUIntAttribute(node, "LinkLength", "value"); }