Bug fixes

Box Wallpapers
Stop returning the first box wallpaper regardless of box

EXP:
Changing level/exp wouldn't update stats (EXP needed to be set back to
PKM object)

Drag&Drop:
If the file exists and is locked for editing, the try { } will fail ->
so will delete since the file is locked.
Never seen or heard it happen, but is possible.
This commit is contained in:
Kaphotics 2016-07-25 22:40:05 -07:00
parent 3d0ffabe75
commit f9bd271967
3 changed files with 5 additions and 3 deletions

View file

@ -1412,6 +1412,7 @@ namespace PKHeX
TB_EXP.Text = PKX.getEXP(Level, Util.getIndex(CB_Species)).ToString();
}
changingFields = false;
pkm.EXP = Util.ToUInt32(TB_EXP.Text);
updateStats();
updateLegality();
}
@ -3256,7 +3257,8 @@ namespace PKHeX
new Thread(() =>
{
Thread.Sleep(500);
File.Delete(newfile);
if (File.Exists(newfile))
File.Delete(newfile);
}).Start();
}
private void pbBoxSlot_DragDrop(object sender, DragEventArgs e)

View file

@ -392,7 +392,7 @@ namespace PKHeX
{
// Box Wallpaper is directly after the Box Names
int offset = getBoxOffset(BoxCount);
offset += BoxCount * 0x9;
offset += BoxCount * 0x9 + box;
return Data[offset];
}
public override string getBoxName(int box)

View file

@ -543,7 +543,7 @@ namespace PKHeX
// Box Wallpaper is directly after the Box Names
int offset = getBoxOffset(BoxCount);
if (Version == GameVersion.HGSS) offset += 0x18;
offset += BoxCount*0x28;
offset += BoxCount*0x28 + box;
return Data[offset];
}
public override string getBoxName(int box)