private void resetAllButton_Click(object sender, EventArgs e) { var result = MessageBox.Show(Strings.SINGLE_PLAYER_RESET_TITLE, Strings.SINGLE_PLAYER_RESET_TEXT, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2); if (result == DialogResult.Yes) { // Reset environment flags clearEnvironmentButton_Click(null, null); // Reset levels LevelDataHax.ClearLevelData(); ReloadListView(); // reset power eggs powerEggsBox.Value = 0; // Reset upgrades heroShotBox.SelectedIndex = 0; inkTankBox.SelectedIndex = 0; splatBombBox.SelectedIndex = 0; burstBombBox.SelectedIndex = 0; seekerBox.SelectedIndex = 0; // Apply levels, upgrades, and power eggs OKButton_Click(null, null); // Reset single player flags in the Inkopolis progress bits ProgressFlags progressFlags = new ProgressFlags(TCPGecko.Instance(), MemoryUtils.Offset); progressFlags.HeroSuit = false; // octo valley intro progressFlags.GreatZapfish = false; // great zapfish returned progressFlags.CuttlefishPostGame = false; // credits block available progressFlags.Apply(); } }
public void PokeRank(uint value) { Gecko.poke32((uint)PlayerAddress.Rank + Offset, value - 1); // Rank Gecko.poke32((uint)PlayerAddress.Rank + Offset - 0x4, 0); // experience to 0 // set progression bits appropriately ProgressFlags.LevelCapRaised = value >= 20; // rank cap flag, remove if rank < 20, set if rank >= 20 ProgressFlags.RankedUnlocked = value >= 10; // gachi unlocked flag, remove if rank < 10, set if rank >= 10 ProgressFlags.Apply(); }