private void WriteNodeLevel(ref List <WzObject> nodeLevel, DumpState ds, BinaryWriter bw)
        {
            uint nextChildId = (uint)((ulong)ds.GetNextNodeID() + (ulong)((long)nodeLevel.Count));

            foreach (WzObject levelNode in nodeLevel)
            {
                bool flag = levelNode is WzUOLProperty;
                if (flag)
                {
                    WriteUOL((WzUOLProperty)levelNode, ds, bw);
                }
                else
                {
                    WriteNode(levelNode, ds, bw, nextChildId);
                }
                nextChildId += (uint)GetChildCount(levelNode);
            }
            List <WzObject> @out = new List <WzObject>();

            foreach (WzObject levelNode2 in nodeLevel)
            {
                List <WzObject> childs = GetChildObjects(levelNode2);
                @out.AddRange(childs);
            }
            nodeLevel.Clear();
            nodeLevel = @out;
        }
Example #2
0
        private static void WriteNodeLevel(ref List <WZObject> nodeLevel, DumpState ds, BinaryWriter bw)
        {
            uint nextChildId = (uint)(ds.GetNextNodeID() + nodeLevel.Count);

            foreach (WZObject levelNode in nodeLevel)
            {
                if (levelNode is WZUOLProperty)
                {
                    WriteUOL((WZUOLProperty)levelNode, ds, bw);
                }
                else
                {
                    WriteNode(levelNode, ds, bw, nextChildId);
                }
                nextChildId += (uint)levelNode.ChildCount;
            }
            List <WZObject> @out = new List <WZObject>();

            foreach (WZObject levelNode in nodeLevel.Where(n => n.ChildCount > 0))
            {
                @out.AddRange(levelNode.OrderBy(f => f.Name, StringComparer.Ordinal));
            }
            nodeLevel.Clear();
            nodeLevel = @out;
        }
Example #3
0
 private static void WriteNodeLevel(ref List<WZObject> nodeLevel, DumpState ds, BinaryWriter bw) {
     uint nextChildId = (uint) (ds.GetNextNodeID() + nodeLevel.Count);
     foreach (WZObject levelNode in nodeLevel) {
         if (levelNode is WZUOLProperty)
             WriteUOL((WZUOLProperty) levelNode, ds, bw);
         else
             WriteNode(levelNode, ds, bw, nextChildId);
         nextChildId += (uint) levelNode.ChildCount;
     }
     List<WZObject> @out = new List<WZObject>();
     foreach (WZObject levelNode in nodeLevel.Where(n => n.ChildCount > 0))
         @out.AddRange(levelNode.OrderBy(f => f.Name, StringComparer.Ordinal));
     nodeLevel.Clear();
     nodeLevel = @out;
 }