public void SetFromTreeNodes(TreeNode Root) { TuningModificators = new CarTuningModificatorsItem[Root.Nodes.Count]; for (int i = 0; i < TuningModificators.Length; i++) { TreeNode ChildNode = Root.Nodes[i]; CarTuningModificatorsItem Entry = (CarTuningModificatorsItem)ChildNode.Tag; TuningModificators[i] = Entry; } }
public void ReadFromFile(BinaryReader reader) { unk0 = reader.ReadUInt32(); uint count0 = reader.ReadUInt32(); uint count1 = reader.ReadUInt32(); modificators = new CarTuningModificatorsItem[count0]; for (int i = 0; i < count1; i++) { CarTuningModificatorsItem item = new CarTuningModificatorsItem(); item.ID = reader.ReadInt32(); item.CarId = reader.ReadInt32(); item.ItemId = reader.ReadInt32(); item.MemberId = reader.ReadInt32(); item.Value = reader.ReadInt32(); modificators[i] = item; } }