mirror of
https://github.com/kwsch/NHSE.git
synced 2026-04-20 23:47:24 -05:00
get the game to update the save file, but without re-saving in-game, will be uninitialized (bad Hotel Tickets parsing).
32 lines
774 B
C#
32 lines
774 B
C#
using System;
|
|
|
|
namespace NHSE.Core;
|
|
|
|
public sealed class Personal30(Memory<byte> raw)
|
|
{
|
|
public Span<byte> Data => raw.Span;
|
|
|
|
public bool IsInitialized30 => System.Buffers.Binary.BinaryPrimitives.ReadInt64LittleEndian(raw.Span) != 0;
|
|
|
|
public EncryptedInt32 HotelTickets // @0x0 size 0x8, align 4
|
|
{
|
|
get => EncryptedInt32.ReadVerify(Data, 0);
|
|
set => value.Write(Data);
|
|
}
|
|
}
|
|
|
|
public interface IPersonal30
|
|
{
|
|
public int Offset30s_064c1881 { get; }
|
|
public int Length30s_064c1881 { get; }
|
|
}
|
|
|
|
public static class Personal30Extensions
|
|
{
|
|
extension(IPersonal30 personal)
|
|
{
|
|
public Personal30 Get30s_064c1881(Memory<byte> data)
|
|
=> new(data.Slice(personal.Offset30s_064c1881, personal.Length30s_064c1881));
|
|
}
|
|
}
|