Beispiel #1
0
        void Save()
        {
            var offsets = GetOffsetsFromRevision();

            _personalFile.WriteU32(offsets.PersonalId, TownUID);
            _personalFile.WriteString(offsets.PersonalId + 4, TownName, 10);
            _personalFile.WriteU32(offsets.PersonalId + 0x1C, PlayerUID);
            _personalFile.WriteString(offsets.PersonalId + 0x28, Name, 10);

            Wallet.Write(_personalFile, offsets.Wallet);
            Bank.Write(_personalFile, offsets.Bank);
            NookMiles.Write(_personalFile, offsets.NookMiles);
        }
Beispiel #2
0
        public void Save()
        {
            var offsets = GetOffsetsFromRevision();

            _personalFile.WriteU32(offsets.PersonalId, TownUID);
            _personalFile.WriteString(offsets.PersonalId + 4, TownName, 10);
            _personalFile.WriteU32(offsets.PersonalId + 0x1C, PlayerUID);
            _personalFile.WriteString(offsets.PersonalId + 0x20, Name, 10);

            Wallet.Write(_personalFile, offsets.Wallet);
            Bank.Write(_personalFile, offsets.Bank);
            NookMiles.Write(_personalFile, offsets.NookMiles);

            for (var i = 0; i < 20; i++)
            {
                Pockets[i].Save(_personalFile, offsets.Pockets + 0xB8 + i * 8);
                Pockets[i + 20].Save(_personalFile, offsets.Pockets + i * 8);
            }

            for (var i = 0; i < 5000; i++)
            {
                Storage[i].Save(_personalFile, offsets.Storage + i * 8);
            }
        }