diff --git a/PKHeX.Core/Saves/SAV6.cs b/PKHeX.Core/Saves/SAV6.cs index 6788091ef..b562ce21c 100644 --- a/PKHeX.Core/Saves/SAV6.cs +++ b/PKHeX.Core/Saves/SAV6.cs @@ -429,6 +429,11 @@ public string Saying5 get => Util.TrimFromZero(Encoding.Unicode.GetString(Data, TrainerCard + 0x7C + 0x22 * 4, 0x22)); set => Encoding.Unicode.GetBytes(value.PadRight(value.Length + 1, '\0')).CopyTo(Data, TrainerCard + 0x7C + 0x22 * 4); } + public bool IsMegaEvolutionUnlocked + { + get => Data[TrainerCard + 0x14A] == 1; + set => Data[TrainerCard + 0x14A] = (byte)(value ? 1 : 0); + } public int M { diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.Designer.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.Designer.cs index 2dc870f18..48ddf7b21 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.Designer.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.Designer.cs @@ -202,8 +202,9 @@ private void InitializeComponent() this.Tab_Multiplayer = new System.Windows.Forms.TabPage(); this.Tab_Maison = new System.Windows.Forms.TabPage(); this.Tab_Appearance = new System.Windows.Forms.TabPage(); - this.TB_TRNick = new System.Windows.Forms.TextBox(); this.L_TRNick = new System.Windows.Forms.Label(); + this.TB_TRNick = new System.Windows.Forms.TextBox(); + this.CHK_MegaUnlocked = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.PB_Badge8)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PB_Badge6)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.PB_Badge4)).BeginInit(); @@ -2071,6 +2072,7 @@ private void InitializeComponent() // // Tab_Multiplayer // + this.Tab_Multiplayer.Controls.Add(this.CHK_MegaUnlocked); this.Tab_Multiplayer.Controls.Add(this.L_MultiplayerSprite); this.Tab_Multiplayer.Controls.Add(this.GB_Sayings); this.Tab_Multiplayer.Controls.Add(this.PB_Sprite); @@ -2147,6 +2149,15 @@ private void InitializeComponent() this.Tab_Appearance.Text = "Appearance"; this.Tab_Appearance.UseVisualStyleBackColor = true; // + // L_TRNick + // + this.L_TRNick.Location = new System.Drawing.Point(68, 230); + this.L_TRNick.Name = "L_TRNick"; + this.L_TRNick.Size = new System.Drawing.Size(128, 20); + this.L_TRNick.TabIndex = 74; + this.L_TRNick.Text = "Trainer Nickname:"; + this.L_TRNick.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // // TB_TRNick // this.TB_TRNick.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -2158,14 +2169,15 @@ private void InitializeComponent() this.TB_TRNick.Text = "WWWWWWWWWWWW"; this.TB_TRNick.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; // - // L_TRNick + // CHK_MegaUnlocked // - this.L_TRNick.Location = new System.Drawing.Point(68, 230); - this.L_TRNick.Name = "L_TRNick"; - this.L_TRNick.Size = new System.Drawing.Size(128, 20); - this.L_TRNick.TabIndex = 74; - this.L_TRNick.Text = "Trainer Nickname:"; - this.L_TRNick.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.CHK_MegaUnlocked.AutoSize = true; + this.CHK_MegaUnlocked.Location = new System.Drawing.Point(123, 216); + this.CHK_MegaUnlocked.Name = "CHK_MegaUnlocked"; + this.CHK_MegaUnlocked.Size = new System.Drawing.Size(149, 17); + this.CHK_MegaUnlocked.TabIndex = 76; + this.CHK_MegaUnlocked.Text = "Mega Evolution Unlocked"; + this.CHK_MegaUnlocked.UseVisualStyleBackColor = true; // // SAV_Trainer // @@ -2397,5 +2409,6 @@ private void InitializeComponent() private System.Windows.Forms.DateTimePicker CAL_HoFTime; private System.Windows.Forms.Label L_TRNick; private System.Windows.Forms.TextBox TB_TRNick; + private System.Windows.Forms.CheckBox CHK_MegaUnlocked; } } diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs index 8a5eb0075..3fa9ba872 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen6/SAV_Trainer.cs @@ -215,6 +215,8 @@ public SAV_Trainer(SaveFile sav) for (int i = 0; i < statdata.Length / 2; i++) CB_Stats.Items.Add(statdata[2 * i + 1]); CB_Stats.SelectedIndex = 0; + + CHK_MegaUnlocked.Checked = SAV.IsMegaEvolutionUnlocked; } private readonly string[] statdata; private bool editing; @@ -571,6 +573,8 @@ private void Save() if (SAV.LastSavedDate.HasValue) SAV.LastSavedDate = new DateTime(CAL_LastSavedDate.Value.Year, CAL_LastSavedDate.Value.Month, CAL_LastSavedDate.Value.Day, CAL_LastSavedTime.Value.Hour, CAL_LastSavedTime.Value.Minute, 0); + + SAV.IsMegaEvolutionUnlocked = CHK_MegaUnlocked.Checked; } private void ClickOT(object sender, MouseEventArgs e)