mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Add Collect All Stakes (sublegend x4) cheat button
This commit is contained in:
parent
9009439bb7
commit
719ec1c6cc
3 changed files with 34 additions and 0 deletions
|
@ -274,4 +274,18 @@ public sealed class SAV9SV : SaveFile, ISaveBlock9Main, ISCBlockArray, ISaveFile
|
|||
var b = Blocks.GetBlock(SaveBlockAccessor9SV.KBoxWallpapers);
|
||||
b.Data[box] = (byte)value;
|
||||
}
|
||||
|
||||
public void CollectAllStakes()
|
||||
{
|
||||
for (int i = 14; i <= 17; i++)
|
||||
{
|
||||
for (int f = 1; f <= 8; f++)
|
||||
{
|
||||
var flag = $"FEVT_SUB_{i:000}_KUI_{f:00}_RELEASE".AsSpan();
|
||||
var hash = (uint)FnvHash.HashFnv1a_64(flag);
|
||||
var block = Accessor.GetBlock(hash);
|
||||
block.ChangeBooleanType(SCTypeCode.Bool2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ namespace PKHeX.WinForms
|
|||
this.L_LP = new System.Windows.Forms.Label();
|
||||
this.trainerID1 = new PKHeX.WinForms.Controls.TrainerID();
|
||||
this.Tab_MiscValues = new System.Windows.Forms.TabPage();
|
||||
this.B_CollectAllStakes = new System.Windows.Forms.Button();
|
||||
this.B_UnlockFlyLocations = new System.Windows.Forms.Button();
|
||||
this.GB_Map = new System.Windows.Forms.GroupBox();
|
||||
this.NUD_Z = new System.Windows.Forms.NumericUpDown();
|
||||
|
@ -667,6 +668,7 @@ namespace PKHeX.WinForms
|
|||
//
|
||||
// Tab_MiscValues
|
||||
//
|
||||
this.Tab_MiscValues.Controls.Add(this.B_CollectAllStakes);
|
||||
this.Tab_MiscValues.Controls.Add(this.B_UnlockFlyLocations);
|
||||
this.Tab_MiscValues.Controls.Add(this.GB_Map);
|
||||
this.Tab_MiscValues.Location = new System.Drawing.Point(4, 22);
|
||||
|
@ -677,6 +679,16 @@ namespace PKHeX.WinForms
|
|||
this.Tab_MiscValues.Text = "Misc";
|
||||
this.Tab_MiscValues.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// B_CollectAllStakes
|
||||
//
|
||||
this.B_CollectAllStakes.Location = new System.Drawing.Point(248, 82);
|
||||
this.B_CollectAllStakes.Name = "B_CollectAllStakes";
|
||||
this.B_CollectAllStakes.Size = new System.Drawing.Size(120, 42);
|
||||
this.B_CollectAllStakes.TabIndex = 61;
|
||||
this.B_CollectAllStakes.Text = "Collect All Stakes";
|
||||
this.B_CollectAllStakes.UseVisualStyleBackColor = true;
|
||||
this.B_CollectAllStakes.Click += new System.EventHandler(this.B_CollectAllStakes_Click);
|
||||
//
|
||||
// B_UnlockFlyLocations
|
||||
//
|
||||
this.B_UnlockFlyLocations.Location = new System.Drawing.Point(248, 34);
|
||||
|
@ -897,5 +909,6 @@ namespace PKHeX.WinForms
|
|||
private System.Windows.Forms.MaskedTextBox MT_LP;
|
||||
private System.Windows.Forms.Button B_MaxLP;
|
||||
private System.Windows.Forms.Button B_UnlockFlyLocations;
|
||||
private System.Windows.Forms.Button B_CollectAllStakes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -312,5 +312,12 @@ public partial class SAV_Trainer9 : Form
|
|||
var accessor = SAV.Accessor;
|
||||
foreach (var block in blocks)
|
||||
accessor.GetBlock(block).ChangeBooleanType(SCTypeCode.Bool2);
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
}
|
||||
|
||||
private void B_CollectAllStakes_Click(object sender, EventArgs e)
|
||||
{
|
||||
SAV.CollectAllStakes();
|
||||
System.Media.SystemSounds.Asterisk.Play();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue