public int Deserialize() { // TODO: Handle dependencies // 2nd pass after this to resolve names etc? _ClassIndex = Data.ReadInt32(); ClassName = CurrentPCC.GetClassName(_ClassIndex); _SuperIndex = Data.ReadInt32(); _OuterIndex = Data.ReadInt32(); _ObjectNameRef = Data.ReadNameRef(); ObjectName = CurrentPCC.GetName(_ObjectNameRef); if (_ObjectNameRef.ModNumber > -1) { ObjectName += "_" + _ObjectNameRef.ModNumber; // TODO: correct? } _ArchetypeIndex = Data.ReadInt32(); ObjectFlags = (ObjectFlags)Data.ReadUInt64(); Size = Data.ReadUInt32(); FileOffset = Data.ReadUInt32(); ExportFlags = (ExportFlags)Data.ReadUInt32(); // TODO: save / figure these out! var netObjectCount = Data.ReadInt32(); // Skip netObjectCount Data.ReadRawData(netObjectCount * 4); // Skip netObjects Data.ReadRawData(16); // Skip package GUID's Data.ReadRawData(4); // Skip package flags return((int)SizeInBytes + 4 * netObjectCount); }
public bool ResolveLinks() { if (_OuterIndex != 0) { OuterName = CurrentPCC.GetObjectEntry(_OuterIndex).ObjectName; } else { OuterName = "object"; } return(true); }
public bool Deserialize() { _PCCNameRef = Data.ReadNameRef(); SourcePCCName = CurrentPCC.GetName(_PCCNameRef); _ClassNameRef = Data.ReadNameRef(); ClassName = CurrentPCC.GetName(_ClassNameRef); _OuterIndex = Data.ReadInt32(); // Do in links or loadfromsource: //OuterName = CurrentPCC.GetObjectEntry(_OuterIndex).ObjectName; _ObjectNameRef = Data.ReadNameRef(); ObjectName = CurrentPCC.GetName(_ObjectNameRef); return(true); }