update FestaPlazaEditor

add BattleAgent Grade30 reward giving
This commit is contained in:
pokecal 2017-11-26 19:39:49 +09:00
parent 1162ba5b3d
commit 8fe81e8610
2 changed files with 23 additions and 0 deletions

View file

@ -113,6 +113,7 @@
this.ppkx2 = new System.Windows.Forms.PictureBox();
this.CB_LuckyResult = new System.Windows.Forms.ComboBox();
this.L_LuckyResult = new System.Windows.Forms.Label();
this.B_AgentGlass = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.NUD_FC_Current)).BeginInit();
this.GB_FC.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NUD_FC_Used)).BeginInit();
@ -911,6 +912,7 @@
//
// Tab_BattleAgency
//
this.Tab_BattleAgency.Controls.Add(this.B_AgentGlass);
this.Tab_BattleAgency.Controls.Add(this.NUD_Trainer3);
this.Tab_BattleAgency.Controls.Add(this.NUD_Trainer2);
this.Tab_BattleAgency.Controls.Add(this.NUD_Trainer1);
@ -933,6 +935,16 @@
this.Tab_BattleAgency.Text = "BattleAgency";
this.Tab_BattleAgency.UseVisualStyleBackColor = true;
//
// B_AgentGlass
//
this.B_AgentGlass.Location = new System.Drawing.Point(287, 134);
this.B_AgentGlass.Name = "B_AgentGlass";
this.B_AgentGlass.Size = new System.Drawing.Size(147, 23);
this.B_AgentGlass.TabIndex = 19;
this.B_AgentGlass.Text = "Give Agent Sunglasses";
this.B_AgentGlass.UseVisualStyleBackColor = true;
this.B_AgentGlass.Click += new System.EventHandler(this.B_AgentGlass_Click);
//
// NUD_Trainer3
//
this.NUD_Trainer3.Location = new System.Drawing.Point(391, 93);
@ -1318,5 +1330,6 @@
private System.Windows.Forms.TextBox TB_PlazaName;
private System.Windows.Forms.Label L_LuckyResult;
private System.Windows.Forms.ComboBox CB_LuckyResult;
private System.Windows.Forms.Button B_AgentGlass;
}
}

View file

@ -274,6 +274,7 @@ namespace PKHeX.WinForms
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()
{
@ -635,6 +636,15 @@ namespace PKHeX.WinForms
f[entry].UsedLuckyRank = lucky < 0 ? 0 : lucky % 3 + 1;
f[entry].UsedLuckyPlace = lucky < 0 ? 0 : lucky / 3 + 1;
}
private void B_AgentGlass_Click(object sender, EventArgs e)
{
if (NUD_Grade.Value < 30 && DialogResult.Yes != WinFormsUtil.Prompt(MessageBoxButtons.YesNo, "Agent Sunglasses is reward of Grade 30.", "Continue?"))
return;
SAV.SetData(new byte[] { 3 }, SAV.Fashion + 0xD0);
B_AgentGlass.Enabled = false;
System.Media.SystemSounds.Asterisk.Play();
}
}
public class FestaFacility
{