mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Get actual value rather than magic index
logic doesn't really work for gen2/3, so gate it behind gen4+ format only
This commit is contained in:
parent
fa7c8929b1
commit
523edecf7b
1 changed files with 10 additions and 5 deletions
|
@ -1370,11 +1370,16 @@ namespace PKHeX.WinForms.Controls
|
|||
CAL_MetDate.Value = new DateTime(2000, 01, 01);
|
||||
|
||||
// if egg wasn't originally obtained by OT => Link Trade, else => None
|
||||
bool isTraded = false;
|
||||
var sav = SaveFileRequested?.Invoke(this, e);
|
||||
if (sav != null)
|
||||
isTraded = sav.OT != TB_OT.Text || sav.TID != Entity.TID || sav.SID != Entity.SID;
|
||||
CB_MetLocation.SelectedIndex = isTraded ? 2 : 0;
|
||||
if (Entity.Format >= 4)
|
||||
{
|
||||
var sav = SaveFileRequested?.Invoke(this, e);
|
||||
if (sav != null)
|
||||
{
|
||||
bool isTraded = sav.OT != TB_OT.Text || sav.TID != Entity.TID || sav.SID != Entity.SID;
|
||||
var loc = isTraded ? Locations.TradedEggLocation(sav.Generation) : 0;
|
||||
CB_MetLocation.SelectedValue = loc;
|
||||
}
|
||||
}
|
||||
|
||||
if (!CHK_Nicknamed.Checked)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue