Ejemplo n.º 1
0
    internal static NPCDialogDifficulty Read(InternalBitArray bits)
    {
        var output = new NPCDialogDifficulty();

        for (int i = 0; i < output._dialogs.Length; i++)
        {
            var data = new NPCDialogData
            {
                Introduction    = bits[i],
                Congratulations = bits[i + (0x18 * 8)]
            };
            output._dialogs[i] = data;
        }

        return(output);
    }
Ejemplo n.º 2
0
    public static NPCDialogSection Read(IBitReader reader)
    {
        var npcDialogSection = new NPCDialogSection
        {
            Header = reader.ReadUInt16(),
            Length = reader.ReadUInt16()
        };

        Span <byte> bytes = stackalloc byte[0x30];

        reader.ReadBytes(bytes);
        using var bits = new InternalBitArray(bytes);

        for (int i = 0; i < npcDialogSection._difficulties.Length; i++)
        {
            npcDialogSection._difficulties[i] = NPCDialogDifficulty.Read(bits);
        }

        return(npcDialogSection);
    }