diff --git a/PKHeX.Core/Saves/SAV7.cs b/PKHeX.Core/Saves/SAV7.cs index c8bd1e14f..8fa7394ea 100644 --- a/PKHeX.Core/Saves/SAV7.cs +++ b/PKHeX.Core/Saves/SAV7.cs @@ -662,8 +662,8 @@ public string FestivalPlazaName } } public ushort FestaRank { get => BitConverter.ToUInt16(Data, JoinFestaData + 0x53A); set => BitConverter.GetBytes(value).CopyTo(Data, JoinFestaData + 0x53A); } - public ushort GetFestaMessage(int index) => Data[JoinFestaData + (index << 1)]; - public void SetFestaMessage(int index, ushort value) => BitConverter.GetBytes(value).CopyTo(Data, JoinFestaData + (index << 1)); + public ushort GetFestaMessage(int index) => BitConverter.ToUInt16(Data, JoinFestaData + index * 2); + public void SetFestaMessage(int index, ushort value) => BitConverter.GetBytes(value).CopyTo(Data, JoinFestaData + index * 2); public bool GetFestaPhraseUnlocked(int index) => Data[JoinFestaData + 0x2A50 + index] != 0; //index: 0 to 105:commonPhrases, 106:Lv100! public void SetFestaPhraseUnlocked(int index, bool value) { diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs index b260f8dfa..b04cdd1be 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen7/SAV_FestivalPlaza.cs @@ -16,6 +16,7 @@ public SAV_FestivalPlaza(SaveFile sav) editing = true; InitializeComponent(); typeMAX = SAV.USUM ? 0x7F : 0x7C; + TB_PlazaName.Text = SAV.FestivalPlazaName; if (SAV.USUM) { PBs = new[] { ppkx1, ppkx2, ppkx3 }; @@ -274,7 +275,6 @@ private void LoadBattleAgency() var m = (int)NUD_Trainers[i].Maximum; NUD_Trainers[i].Value = j < 0 || j > m ? m : j; } - TB_PlazaName.Text = SAV.FestivalPlazaName; B_AgentGlass.Enabled = (SAV.GetData(SAV.Fashion + 0xD0, 1)[0] & 1) == 0; } private void LoadPictureBox()