public void Deserialize( IUnrealStream stream ) { Name = stream.ReadText(); // Mass effect 2 if (stream.Version == 512) { Flags = stream.ReadUInt32(); } else { Flags = stream.Version >= QWORDVersion ? stream.ReadUInt64() : stream.ReadUInt32(); } #if DEOBFUSCATE // De-obfuscate names that contain unprintable characters! foreach( char c in Name ) { if( !char.IsLetterOrDigit( c ) ) { Name = "N" + TableIndex + "_OBF"; break; } } #endif }
public void Deserialize(IUnrealStream stream) { Name = stream.ReadText(); // Mass effect 2 if (stream.Version == 512) { Flags = stream.ReadUInt32(); } else { Flags = stream.Version >= QWORDVersion?stream.ReadUInt64() : stream.ReadUInt32(); } #if DEOBFUSCATE // De-obfuscate names that contain unprintable characters! foreach (char c in Name) { if (!char.IsLetterOrDigit(c)) { Name = "N" + TableIndex + "_OBF"; break; } } #endif }
public void Deserialize(IUnrealStream stream) { #if DCUO if (stream.Package.Build == UnrealPackage.GameBuild.BuildName.DCUO) { //DCUO doesn't null terminate name table entries int size = stream.ReadInt32(); var strBytes = new byte[size]; stream.Read(strBytes, 0, size); if (stream.BigEndianCode) { Array.Reverse(strBytes); } Name = System.Text.Encoding.ASCII.GetString(strBytes); } else { #endif Name = stream.ReadText(); #if DCUO } #endif Flags = stream.Version >= QWORDVersion?stream.ReadUInt64() : stream.ReadUInt32(); #if DEOBFUSCATE // De-obfuscate names that contain unprintable characters! foreach (char c in Name) { if (!char.IsLetterOrDigit(c)) { Name = "N" + TableIndex + "_OBF"; break; } } #endif }
public void Deserialize(IUnrealStream stream) { ClassIndex = stream.ReadObjectIndex(); SuperIndex = stream.ReadObjectIndex(); OuterIndex = stream.ReadInt32(); // ObjectIndex, though always written as 32bits regardless of build. ObjectName = stream.ReadNameReference(); if (stream.Version >= VArchetype) { ArchetypeIndex = stream.ReadInt32(); } _ObjectFlagsOffset = stream.Position; ObjectFlags = stream.ReadUInt64(); //if( stream.Version >= VObjectFlagsToULONG ) //{ // //ObjectFlags = (ObjectFlags << 32) | stream.ReadUInt32(); // ObjectFlags = (ObjectFlags << 32) | stream.ReadUInt64(); //} SerialSize = stream.ReadIndex(); SerialOffset = (int)stream.ReadInt64(); if (stream.Version < 220) { return; } if (stream.Version < 543) { int componentMapCount = stream.ReadInt32(); stream.Skip(componentMapCount * 12); //if( componentMapCount > 0 ) //{ // Components = new Dictionary<int, int>( componentMapCount ); // for( int i = 0; i < componentMapCount; ++ i ) // { // Components.Add( stream.ReadNameIndex(), stream.ReadObjectIndex() ); // } //} } if (stream.Version < 247) { return; } ExportFlags = stream.ReadUInt32(); if (stream.Version < 322) { return; } int netObjectCount = stream.ReadInt32(); stream.Skip(netObjectCount * 4); //if( netObjectCount > 0 ) //{ // NetObjects = new List<int>( netObjectCount ); // for( int i = 0; i < netObjectCount; ++ i ) // { // NetObjects.Add( stream.ReadObjectIndex() ); // } //} stream.Skip(16); // Package guid if (stream.Version > 486) // 475? 486(> Stargate Worlds) { stream.Skip(4); // Package flags } }
public void Deserialize(IUnrealStream stream) { Name = stream.ReadText(); Flags = stream.Version >= QWORDVersion?stream.ReadUInt64() : stream.ReadUInt32(); }