mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 04:24:36 -05:00
Allow deactivating all raids
This commit is contained in:
parent
de840f40d4
commit
d9a4eacaf4
|
|
@ -28,6 +28,16 @@ public RaidSpawnDetail[] GetAllRaids()
|
|||
return result;
|
||||
}
|
||||
|
||||
public void DectivateAllRaids()
|
||||
{
|
||||
for (int i = 0; i < CountUsed; i++)
|
||||
{
|
||||
if (i == 16) // Watchtower, special
|
||||
continue;
|
||||
GetRaid(i).Deactivate();
|
||||
}
|
||||
}
|
||||
|
||||
public void ActivateAllRaids(bool rare, bool isEvent)
|
||||
{
|
||||
var rnd = Util.Rand;
|
||||
|
|
@ -195,6 +205,13 @@ public void Activate(byte star, byte rand, bool rare = false, bool isEvent = fal
|
|||
IsRare = rare;
|
||||
IsEvent = isEvent;
|
||||
}
|
||||
|
||||
public void Deactivate()
|
||||
{
|
||||
DenType = RaidType.None;
|
||||
Stars = 0;
|
||||
RandRoll = 0;
|
||||
}
|
||||
|
||||
public string Dump() => $"{Hash:X16}\t{Seed:X16}\t{Stars}\t{RandRoll:00}\t{DenType}\t{Flags:X2}";
|
||||
|
||||
|
|
|
|||
|
|
@ -39,9 +39,14 @@ private void B_Save_Click(object sender, EventArgs e)
|
|||
|
||||
private void B_ActivateAll_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool export = (ModifierKeys & Keys.Alt) != 0;
|
||||
if (export)
|
||||
bool alt = (ModifierKeys & Keys.Alt) != 0;
|
||||
if (alt)
|
||||
{
|
||||
if ((ModifierKeys & Keys.Control) == 0)
|
||||
{
|
||||
Raids.DectivateAllRaids();
|
||||
LoadDen(CB_Den.SelectedIndex);
|
||||
}
|
||||
var txt = Raids.DumpAll();
|
||||
var concat = string.Join(Environment.NewLine, txt);
|
||||
if (WinFormsUtil.SetClipboardText(concat))
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user