new value about pokeRefresh

This commit is contained in:
pokecal 2017-03-13 14:30:27 +09:00
parent 1e4c4b8f53
commit e5f10fe65e
3 changed files with 42 additions and 0 deletions

View file

@ -178,6 +178,8 @@ namespace PKHeX.WinForms
this.L_PlazaName = new System.Windows.Forms.Label();
this.L_Vivillon = new System.Windows.Forms.Label();
this.CB_Vivillon = new System.Windows.Forms.ComboBox();
this.L_DaysFromRefreshed = new System.Windows.Forms.Label();
this.NUD_DaysFromRefreshed = new System.Windows.Forms.NumericUpDown();
this.TC_Editor.SuspendLayout();
this.Tab_Overview.SuspendLayout();
this.GB_Stats.SuspendLayout();
@ -206,6 +208,7 @@ namespace PKHeX.WinForms
((System.ComponentModel.ISupportInitialize)(this.NUD_RMStreak0)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_RCStreak0)).BeginInit();
this.Tab_Misc.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_DaysFromRefreshed)).BeginInit();
this.GB_PokeFinder.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_SnapCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NUD_ThumbsRecord)).BeginInit();
@ -1590,6 +1593,8 @@ namespace PKHeX.WinForms
//
// Tab_Misc
//
this.Tab_Misc.Controls.Add(this.L_DaysFromRefreshed);
this.Tab_Misc.Controls.Add(this.NUD_DaysFromRefreshed);
this.Tab_Misc.Controls.Add(this.L_PlazaName);
this.Tab_Misc.Controls.Add(this.TB_PlazaName);
this.Tab_Misc.Controls.Add(this.CB_Fashion);
@ -1813,6 +1818,32 @@ namespace PKHeX.WinForms
this.CB_Vivillon.Size = new System.Drawing.Size(93, 20);
this.CB_Vivillon.TabIndex = 65;
//
// L_DaysFromRefreshed
//
this.L_DaysFromRefreshed.Location = new System.Drawing.Point(144, 28);
this.L_DaysFromRefreshed.Name = "L_DaysFromRefreshed";
this.L_DaysFromRefreshed.Size = new System.Drawing.Size(117, 18);
this.L_DaysFromRefreshed.TabIndex = 63;
this.L_DaysFromRefreshed.Text = "Days from Refreshed:";
this.L_DaysFromRefreshed.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// NUD_DaysFromRefreshed
//
this.NUD_DaysFromRefreshed.Location = new System.Drawing.Point(267, 30);
this.NUD_DaysFromRefreshed.Maximum = new decimal(new int[] {
255,
0,
0,
0});
this.NUD_DaysFromRefreshed.Name = "NUD_DaysFromRefreshed";
this.NUD_DaysFromRefreshed.Size = new System.Drawing.Size(42, 19);
this.NUD_DaysFromRefreshed.TabIndex = 64;
this.NUD_DaysFromRefreshed.Value = new decimal(new int[] {
255,
0,
0,
0});
//
// SAV_Trainer7
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1860,6 +1891,7 @@ namespace PKHeX.WinForms
((System.ComponentModel.ISupportInitialize)(this.NUD_RCStreak0)).EndInit();
this.Tab_Misc.ResumeLayout(false);
this.Tab_Misc.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_DaysFromRefreshed)).EndInit();
this.GB_PokeFinder.ResumeLayout(false);
this.GB_PokeFinder.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_SnapCount)).EndInit();
@ -2020,5 +2052,7 @@ namespace PKHeX.WinForms
private System.Windows.Forms.Label L_PlazaName;
private System.Windows.Forms.Label L_Vivillon;
private System.Windows.Forms.ComboBox CB_Vivillon;
private System.Windows.Forms.NumericUpDown NUD_DaysFromRefreshed;
private System.Windows.Forms.Label L_DaysFromRefreshed;
}
}

View file

@ -190,6 +190,7 @@ namespace PKHeX.WinForms
TB_PlazaName.Text = SAV.FestivalPlazaName;
CB_Vivillon.SelectedIndex = (SAV.Vivillon < CB_Vivillon.Items.Count) ? SAV.Vivillon : -1;
NUD_DaysFromRefreshed.Value = Math.Min(NUD_DaysFromRefreshed.Maximum, SAV.DaysFromRefreshed);
}
private void save()
{
@ -275,6 +276,8 @@ namespace PKHeX.WinForms
// Vivillon
if (CB_Vivillon.SelectedIndex >= 0) SAV.Vivillon = CB_Vivillon.SelectedIndex;
SAV.DaysFromRefreshed = (byte)NUD_DaysFromRefreshed.Value;
}
private void clickOT(object sender, MouseEventArgs e)

View file

@ -500,6 +500,11 @@ namespace PKHeX.Core
get { return Data[Misc + 0x130] & 0x1F; }
set { Data[Misc + 0x130] = (byte)((Data[Misc + 0x130] & ~0x1F) | (value & 0x1F)); }
}
public int DaysFromRefreshed
{
get { return Data[Misc + 0x123]; }
set { Data[Misc + 0x123] = (byte)value; }
}
public uint UsedFestaCoins
{
get { return BitConverter.ToUInt32(Data, 0x69C98); }