mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-26 00:05:23 -05:00
Fix database delete for savefile origin
This commit is contained in:
@@ -155,11 +155,9 @@ private void clickDelete(object sender, EventArgs e)
|
||||
else
|
||||
{
|
||||
// Data from Box: Delete from save file
|
||||
string[] split = pk.Identifier.Split(':');
|
||||
int box = Convert.ToInt32(split[0].Substring(1)) - 1;
|
||||
int slot = Convert.ToInt32(split[1]) - 1;
|
||||
int spot = box*30 + slot;
|
||||
int offset = Main.SAV.getBoxOffset(0) + spot*Main.SAV.SIZE_STORED;
|
||||
int box = pk.Box-1;
|
||||
int slot = pk.Slot-1;
|
||||
int offset = Main.SAV.getBoxOffset(box) + slot*Main.SAV.SIZE_STORED;
|
||||
PKM pkSAV = Main.SAV.getStoredSlot(offset);
|
||||
|
||||
if (pkSAV.Data.SequenceEqual(pk.Data))
|
||||
|
||||
Reference in New Issue
Block a user