mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-24 02:44:30 -05:00
Fix updateLegality on sav load
Legality indication disappeared when save was loading, just defer all checks to the updateLegality method
This commit is contained in:
@@ -821,7 +821,6 @@ private void loadSAV(SaveFile sav, string path)
|
||||
PB_Legal.Visible = PB_WarnMove1.Visible = PB_WarnMove2.Visible = PB_WarnMove3.Visible = PB_WarnMove4.Visible = SAV.Generation >= 6;
|
||||
|
||||
PB_MarkPentagon.Visible = SAV.Generation == 6;
|
||||
PB_Legal.Visible = PB_WarnMove1.Visible = PB_WarnMove2.Visible = PB_WarnMove3.Visible = PB_WarnMove4.Visible = SAV.Generation == 6;
|
||||
TB_GameSync.Visible = TB_Secure1.Visible = TB_Secure2.Visible = L_GameSync.Visible = L_Secure1.Visible = L_Secure2.Visible = SAV.Exportable && SAV.Generation == 6;
|
||||
|
||||
CB_Form.Visible = Label_Form.Visible = CHK_AsEgg.Visible = GB_EggConditions.Visible =
|
||||
@@ -876,7 +875,6 @@ private void loadSAV(SaveFile sav, string path)
|
||||
|
||||
// Common HaX Interface
|
||||
CHK_HackedStats.Enabled = CHK_HackedStats.Visible = MT_Level.Enabled = MT_Level.Visible = MT_Form.Enabled = MT_Form.Visible = HaX;
|
||||
PB_Legal.Visible = PB_WarnMove1.Visible = PB_WarnMove2.Visible = PB_WarnMove3.Visible = PB_WarnMove4.Visible &= !HaX;
|
||||
TB_Level.Visible = !HaX;
|
||||
|
||||
// Load Extra Byte List
|
||||
@@ -2272,13 +2270,13 @@ private void updateLegality(LegalityAnalysis la = null)
|
||||
return;
|
||||
Legality = la ?? new LegalityAnalysis((PK6) pkm);
|
||||
PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn;
|
||||
PB_Legal.Visible = pkm.Gen6 /*&& pkm is PK6*/;
|
||||
PB_Legal.Visible = pkm.Gen6 /*&& pkm is PK6*/ && !HaX;
|
||||
|
||||
// Refresh Move Legality
|
||||
for (int i = 0; i < 4; i++)
|
||||
movePB[i].Visible = !Legality.vMoves[i].Valid;
|
||||
movePB[i].Visible = !Legality.vMoves[i].Valid && !HaX;
|
||||
for (int i = 0; i < 4; i++)
|
||||
relearnPB[i].Visible = !Legality.vRelearn[i].Valid;
|
||||
relearnPB[i].Visible = !Legality.vRelearn[i].Valid && !HaX;
|
||||
}
|
||||
private void updateStats()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user