fix plaza get set

closes #1684
This commit is contained in:
Kurt 2017-12-02 21:37:46 -08:00
parent 133cc22f50
commit bdc9d7edce
2 changed files with 3 additions and 3 deletions

View File

@ -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)
{

View File

@ -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()