mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-01 03:36:43 -05:00
Relocate PokePuff sav properties
This commit is contained in:
@@ -436,6 +436,9 @@ public bool DaycareOccupied2
|
||||
set { Data[DaycareSlot[DaycareIndex] + (PK6.SIZE_STORED + 8) * 1] = (byte)(value ? 1 : 0); }
|
||||
}
|
||||
|
||||
public byte[] Puffs { get { return Data.Skip(Puff).Take(100).ToArray(); } set { value.CopyTo(Data, Puff); } }
|
||||
public int PuffCount { get { return BitConverter.ToInt32(Data, Puff + 100); } set { BitConverter.GetBytes(value).CopyTo(Data, Puff + 100); } }
|
||||
|
||||
// Data Accessing
|
||||
public byte[] getData(int Offset, int Length)
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ private void Setup()
|
||||
dgv.Rows[i].Cells[0].Value = (i + 1).ToString();
|
||||
dgv.Rows[i].Cells[1].Value = pfa[sav[Main.SAV.Puff + i]];
|
||||
}
|
||||
MT_CNT.Text = BitConverter.ToUInt32(sav, Main.SAV.Puff + 100).ToString("0");
|
||||
MT_CNT.Text = Main.SAV.PuffCount.ToString();
|
||||
}
|
||||
private void dropclick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
@@ -145,11 +145,10 @@ private void B_Save_Click(object sender, EventArgs e)
|
||||
emptyslots++;
|
||||
continue;
|
||||
}
|
||||
|
||||
puffarray[i - emptyslots] = (byte) Array.IndexOf(pfa, puff);
|
||||
puffarray[i - emptyslots] = (byte)Array.IndexOf(pfa, puff);
|
||||
}
|
||||
Array.Copy(puffarray, 0, sav, Main.SAV.Puff, 100);
|
||||
Array.Copy(sav, Main.SAV.Data, sav.Length);
|
||||
Main.SAV.Puffs = puffarray;
|
||||
Main.SAV.PuffCount = Util.ToInt32(MT_CNT);
|
||||
Main.SAV.Edited = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user