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:
Kurt 2020-07-06 17:32:40 -05:00
parent fa7c8929b1
commit 523edecf7b

View file

@ -1370,11 +1370,16 @@ namespace PKHeX.WinForms.Controls
CAL_MetDate.Value = new DateTime(2000, 01, 01); CAL_MetDate.Value = new DateTime(2000, 01, 01);
// if egg wasn't originally obtained by OT => Link Trade, else => None // if egg wasn't originally obtained by OT => Link Trade, else => None
bool isTraded = false; if (Entity.Format >= 4)
var sav = SaveFileRequested?.Invoke(this, e); {
if (sav != null) var sav = SaveFileRequested?.Invoke(this, e);
isTraded = sav.OT != TB_OT.Text || sav.TID != Entity.TID || sav.SID != Entity.SID; if (sav != null)
CB_MetLocation.SelectedIndex = isTraded ? 2 : 0; {
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) if (!CHK_Nicknamed.Checked)
{ {