From 97b1dd21c14e98e0e6e7cc6fdb8c14e9e7c17c54 Mon Sep 17 00:00:00 2001 From: tolik518 Date: Sun, 25 Feb 2024 02:02:36 +0100 Subject: [PATCH] added lots of editing stuff --- SoG_SGreader/DataReader.cs | 31 +- SoG_SGreader/DataWriter.cs | 16 +- SoG_SGreader/Forms/FrmAbout.cs | 2 +- SoG_SGreader/Forms/FrmColorSelect.cs | 6 - SoG_SGreader/Forms/FrmLoadSaveGame.cs | 7 +- SoG_SGreader/Forms/FrmMain.Designer.cs | 683 ++++++++++++++++-- SoG_SGreader/Forms/FrmMain.cs | 361 +++++++-- SoG_SGreader/GamePatchReader.cs | 2 + SoG_SGreader/Objects/Flag.cs | 2 +- .../Objects/{ItemsSeen.cs => ItemSeen.cs} | 2 +- SoG_SGreader/Objects/KilledEnemy.cs | 2 +- SoG_SGreader/Objects/Player.cs | 62 +- SoG_SGreader/Objects/TreasureMap.cs | 2 +- SoG_SGreader/Objects/Trophy.cs | 2 +- SoG_SGreader/SoG_SGreader.csproj | 7 +- SoG_SGreader/VersionInc.cs | 6 +- SoG_SGreader/VersionInc.tt | 2 +- 17 files changed, 1008 insertions(+), 187 deletions(-) rename SoG_SGreader/Objects/{ItemsSeen.cs => ItemSeen.cs} (75%) diff --git a/SoG_SGreader/DataReader.cs b/SoG_SGreader/DataReader.cs index 6ba4906..4ac4940 100644 --- a/SoG_SGreader/DataReader.cs +++ b/SoG_SGreader/DataReader.cs @@ -104,7 +104,6 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) ItemCount = readBinary.ReadInt32() }); } - txtConsole.AppendText("\r\nItemCountMerchant: " + playerObject.MerchantItemsCount); @@ -127,7 +126,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.TreasureMaps.Add(new TreasureMap { - TreasureMapID = readBinary.ReadInt16() + TreasureMapID = (SogTreasureMap) readBinary.ReadInt16() }); } @@ -250,12 +249,6 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) txtConsole.AppendText("\r\n" + "EnemiesSeenCount: " + playerObject.EnemiesSeenCount); txtConsole.AppendText("\r\n" + "> EnemiesSeenCount Position: " + readBinary.BaseStream.Position.ToString("X")); - // | // - // | // - // new stuff // - // we're not editing // - // yet // - playerObject.UnknownVariable02Count = (UInt16)(readBinary.ReadUInt16() * 16); // there are X sequences, each 10 bytes long txtConsole.AppendText("\r\n" + "UnknownVariable02Count: " + playerObject.UnknownVariable02Count); txtConsole.AppendText("\r\n" + "> UnknownVariable02Count Position: " + readBinary.BaseStream.Position.ToString("X")); @@ -275,13 +268,13 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) txtConsole.AppendText("\r\n" + "RobinBowHighscore: " + playerObject.RobinBowHighscore); txtConsole.AppendText("\r\n" + "> RobinBowHighscore Position: " + readBinary.BaseStream.Position.ToString("X")); - playerObject.TrophiesCount = (UInt16)(readBinary.ReadUInt16()); + playerObject.TrophiesCount = (ushort)(readBinary.ReadUInt16()); playerObject.Trophies = new List(playerObject.TrophiesCount); for (int i = 0; i != playerObject.TrophiesCount; i++) { playerObject.Trophies.Add(new Trophy { - TrophyID = readBinary.ReadUInt16() + TrophyID = (SogTrophy) readBinary.ReadUInt16() }); } txtConsole.AppendText("\r\n" + "TrophiesCount: " + playerObject.TrophiesCount); @@ -291,12 +284,12 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) txtConsole.AppendText("\r\n" + "ItemsSeenCount: " + playerObject.ItemsSeenCount); txtConsole.AppendText("\r\n" + "> ItemsSeenCount Position: " + readBinary.BaseStream.Position.ToString("X")); - playerObject.ItemsSeen = new List(playerObject.ItemsSeenCount); + playerObject.ItemsSeen = new List(playerObject.ItemsSeenCount); for (int i = 0; i != playerObject.ItemsSeenCount; i++) { - playerObject.ItemsSeen.Add(new ItemsSeen + playerObject.ItemsSeen.Add(new ItemSeen { - ItemID = (SogItem)readBinary.ReadInt32() + ItemID = (SogItem) readBinary.ReadInt32() }); } @@ -309,20 +302,20 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.ItemsCrafted.Add(new ItemCrafted { - ItemID = (SogItem)readBinary.ReadInt32() + ItemID = (SogItem) readBinary.ReadInt32() }); } playerObject.FishiesCaughtCount = (UInt16)(readBinary.ReadUInt16()); - playerObject.FishiesCaught = new List(playerObject.FishiesCaughtCount); + playerObject.FishCaught = new List(playerObject.FishiesCaughtCount); txtConsole.AppendText("\r\n" + "FishiesCaughtCount: " + playerObject.FishiesCaughtCount); txtConsole.AppendText("\r\n" + "> FishiesCaughtCount Position: " + readBinary.BaseStream.Position.ToString("X")); for (int i = 0; i != playerObject.FishiesCaughtCount; i++) { - playerObject.FishiesCaught.Add(new FishCaught + playerObject.FishCaught.Add(new FishCaught { - FishID = (SogItem)readBinary.ReadInt32() + FishID = (SogItem) readBinary.ReadInt32() }); } @@ -335,7 +328,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.KilledEnemies.Add(new KilledEnemy { - EnemyID = readBinary.ReadInt32(), + EnemyID = (SogEnemy) readBinary.ReadInt32(), KillCount = readBinary.ReadInt32() }); } @@ -395,7 +388,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.Flags.Add(new Flag { - FlagID = readBinary.ReadUInt16() + FlagID = (SogFlag) readBinary.ReadUInt16() }); } txtConsole.AppendText("\r\nFlagsCount: " + playerObject.FlagsCount); diff --git a/SoG_SGreader/DataWriter.cs b/SoG_SGreader/DataWriter.cs index 9136119..80409aa 100644 --- a/SoG_SGreader/DataWriter.cs +++ b/SoG_SGreader/DataWriter.cs @@ -92,7 +92,7 @@ public void WriteToFile(string fileName) writeBinary.Write((int) playerObject.TreasureMaps.Count); for (var i = 0; i != playerObject.TreasureMaps.Count; i++) { - writeBinary.Write(playerObject.TreasureMaps[i].TreasureMapID); + writeBinary.Write((ushort) playerObject.TreasureMaps[i].TreasureMapID); } writeBinary.Write((int) playerObject.UnknownVariables01.Count); @@ -167,10 +167,10 @@ public void WriteToFile(string fileName) writeBinary.Write((ushort) playerObject.Trophies.Count); for (int i = 0; i != playerObject.Trophies.Count; i++) { - writeBinary.Write(playerObject.Trophies[i].TrophyID); + writeBinary.Write((ushort) playerObject.Trophies[i].TrophyID); } - writeBinary.Write((ushort)playerObject.ItemsSeen.Count); + writeBinary.Write((ushort) playerObject.ItemsSeen.Count); for (int i = 0; i != playerObject.ItemsSeen.Count; i++) { writeBinary.Write((int) playerObject.ItemsSeen[i].ItemID); @@ -182,16 +182,16 @@ public void WriteToFile(string fileName) writeBinary.Write((int) playerObject.ItemsCrafted[i].ItemID); } - writeBinary.Write((ushort) playerObject.FishiesCaught.Count); - for (int i = 0; i != playerObject.FishiesCaught.Count; i++) + writeBinary.Write((ushort) playerObject.FishCaught.Count); + for (int i = 0; i != playerObject.FishCaught.Count; i++) { - writeBinary.Write((int) playerObject.FishiesCaught[i].FishID); + writeBinary.Write((int) playerObject.FishCaught[i].FishID); } writeBinary.Write((ushort) playerObject.KilledEnemies.Count); for (int i = 0; i != playerObject.KilledEnemies.Count; i++) { - writeBinary.Write((int)playerObject.KilledEnemies[i].EnemyID); + writeBinary.Write((int) playerObject.KilledEnemies[i].EnemyID); writeBinary.Write(playerObject.KilledEnemies[i].KillCount); } @@ -223,7 +223,7 @@ public void WriteToFile(string fileName) writeBinary.Write((ushort) playerObject.Flags.Count); for (int i = 0; i != playerObject.Flags.Count; i++) { - writeBinary.Write(playerObject.Flags[i].FlagID); + writeBinary.Write((ushort) playerObject.Flags[i].FlagID); } writeBinary.Write((byte) playerObject.HouseStyles.Count); diff --git a/SoG_SGreader/Forms/FrmAbout.cs b/SoG_SGreader/Forms/FrmAbout.cs index 55068c3..8332d6b 100644 --- a/SoG_SGreader/Forms/FrmAbout.cs +++ b/SoG_SGreader/Forms/FrmAbout.cs @@ -11,7 +11,7 @@ public partial class FrmAbout : Form public FrmAbout() { InitializeComponent(); - lblBuild.Text = lblBuild.Text.Replace("0.0.000.000",FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); //AssemblyFileVersion + lblBuild.Text = lblBuild.Text.Replace("0.0.000.000", FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion); //AssemblyFileVersion lblVersion.Text = lblVersion.Text.Replace("0.0.0", Application.ProductVersion); lblCurrentPatch.Text = lblCurrentPatch.Text.Replace("0.000a", FrmMain.SupportedPatch); } diff --git a/SoG_SGreader/Forms/FrmColorSelect.cs b/SoG_SGreader/Forms/FrmColorSelect.cs index 6b0e159..f04448a 100644 --- a/SoG_SGreader/Forms/FrmColorSelect.cs +++ b/SoG_SGreader/Forms/FrmColorSelect.cs @@ -1,11 +1,5 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace SoG_SGreader diff --git a/SoG_SGreader/Forms/FrmLoadSaveGame.cs b/SoG_SGreader/Forms/FrmLoadSaveGame.cs index 22c70ea..93418fc 100644 --- a/SoG_SGreader/Forms/FrmLoadSaveGame.cs +++ b/SoG_SGreader/Forms/FrmLoadSaveGame.cs @@ -2,7 +2,6 @@ using System.Drawing; using System.IO; using System.Windows.Forms; -using SoG_SGreader.Wrapper; namespace SoG_SGreader { @@ -28,7 +27,7 @@ private void BtnLoadSaveGame_Click(object sender, EventArgs e) frmMain.ShowDialog(); Close(); } - + private void GetSaveGameFiles(string sFilePath) { lstvSaveGames.Items.Clear(); @@ -37,7 +36,7 @@ private void GetSaveGameFiles(string sFilePath) string savegame = Path.Combine(sFilePath, i + ".cha"); if (File.Exists(savegame)) { - string[] item = new string[] { i + ".cha", DataReader.GetCharName(savegame)}; + string[] item = new string[] { i + ".cha", DataReader.GetCharName(savegame) }; lstvSaveGames.Items.Add(new ListViewItem(item, 0)); } } @@ -55,7 +54,7 @@ private void GetSaveGameFiles(string sFilePath) private string GetSaveGamePath() { - return filePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + Path.Combine("Secrets of Grindea","Characters"); + return filePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + Path.Combine("Secrets of Grindea", "Characters"); } private void BtnChooseFolder_Click(object sender, EventArgs e) diff --git a/SoG_SGreader/Forms/FrmMain.Designer.cs b/SoG_SGreader/Forms/FrmMain.Designer.cs index deecfba..315f176 100644 --- a/SoG_SGreader/Forms/FrmMain.Designer.cs +++ b/SoG_SGreader/Forms/FrmMain.Designer.cs @@ -32,7 +32,7 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); - this.grpEnemiesSeen = new System.Windows.Forms.TabControl(); + this.tabs = new System.Windows.Forms.TabControl(); this.tabChar = new System.Windows.Forms.TabPage(); this.grpPatch = new System.Windows.Forms.GroupBox(); this.lblGamePatch = new System.Windows.Forms.Label(); @@ -145,22 +145,60 @@ private void InitializeComponent() this.numPetHP = new System.Windows.Forms.NumericUpDown(); this.tabCards = new System.Windows.Forms.TabPage(); this.grpCards = new System.Windows.Forms.GroupBox(); + this.label58 = new System.Windows.Forms.Label(); this.btnSelectAllCards = new System.Windows.Forms.Button(); this.btnResetCards = new System.Windows.Forms.Button(); this.btnDeselectAllCards = new System.Windows.Forms.Button(); this.cblstCards = new System.Windows.Forms.CheckedListBox(); + this.tabMaps = new System.Windows.Forms.TabPage(); + this.grpMaps = new System.Windows.Forms.GroupBox(); + this.label39 = new System.Windows.Forms.Label(); + this.btnSelectAllMaps = new System.Windows.Forms.Button(); + this.btnResetMaps = new System.Windows.Forms.Button(); + this.btnDeselectAllMaps = new System.Windows.Forms.Button(); + this.cblstMaps = new System.Windows.Forms.CheckedListBox(); this.tabQuests = new System.Windows.Forms.TabPage(); this.grpQuests = new System.Windows.Forms.GroupBox(); + this.label40 = new System.Windows.Forms.Label(); this.btnSelectAllQuests = new System.Windows.Forms.Button(); this.btnResetQuests = new System.Windows.Forms.Button(); this.btnDeselectAllQuests = new System.Windows.Forms.Button(); this.cblstQuests = new System.Windows.Forms.CheckedListBox(); + this.tabFlags = new System.Windows.Forms.TabPage(); + this.grpFlags = new System.Windows.Forms.GroupBox(); + this.label41 = new System.Windows.Forms.Label(); + this.btnSelectAllFlags = new System.Windows.Forms.Button(); + this.btnResetFlags = new System.Windows.Forms.Button(); + this.btnDeselectAllFlags = new System.Windows.Forms.Button(); + this.cblstFlags = new System.Windows.Forms.CheckedListBox(); this.tabEnemiesSeen = new System.Windows.Forms.TabPage(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.grpEnemiesSeen = new System.Windows.Forms.GroupBox(); + this.label50 = new System.Windows.Forms.Label(); this.btnSelectAllEnemiesSeen = new System.Windows.Forms.Button(); this.btnResetEnemiesSeen = new System.Windows.Forms.Button(); this.btnDeselectAllEnemiesSeen = new System.Windows.Forms.Button(); this.cblstEnemiesSeens = new System.Windows.Forms.CheckedListBox(); + this.tabTrophies = new System.Windows.Forms.TabPage(); + this.grpTrophies = new System.Windows.Forms.GroupBox(); + this.label59 = new System.Windows.Forms.Label(); + this.btnSelectAllTrophies = new System.Windows.Forms.Button(); + this.btnResetTrophies = new System.Windows.Forms.Button(); + this.btnDeselectAllTrophies = new System.Windows.Forms.Button(); + this.cblstTrophies = new System.Windows.Forms.CheckedListBox(); + this.tabItemsSeen = new System.Windows.Forms.TabPage(); + this.grpItemsSeen = new System.Windows.Forms.GroupBox(); + this.label60 = new System.Windows.Forms.Label(); + this.btnSelectAllItemsSeen = new System.Windows.Forms.Button(); + this.btnResetItemsSeen = new System.Windows.Forms.Button(); + this.btnDeselectAllItemsSeen = new System.Windows.Forms.Button(); + this.cblstItemsSeen = new System.Windows.Forms.CheckedListBox(); + this.tabItemsCrafted = new System.Windows.Forms.TabPage(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.label61 = new System.Windows.Forms.Label(); + this.btnSelectAllItemsCrafted = new System.Windows.Forms.Button(); + this.btnResetItemsCrafted = new System.Windows.Forms.Button(); + this.btnDeselectAllItemsCrafted = new System.Windows.Forms.Button(); + this.cblstItemsCrafted = new System.Windows.Forms.CheckedListBox(); this.tabQuickslots = new System.Windows.Forms.TabPage(); this.label57 = new System.Windows.Forms.Label(); this.grpQuickslots = new System.Windows.Forms.GroupBox(); @@ -255,8 +293,6 @@ private void InitializeComponent() this.tabTalentsGeneral = new System.Windows.Forms.TabPage(); this.tabTalentsMelee = new System.Windows.Forms.TabPage(); this.tabTalentsMagic = new System.Windows.Forms.TabPage(); - this.tabTreasureMaps = new System.Windows.Forms.TabPage(); - this.label41 = new System.Windows.Forms.Label(); this.msMenu = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -271,7 +307,14 @@ private void InitializeComponent() this.txtConsole = new System.Windows.Forms.TextBox(); this.Tooltips = new System.Windows.Forms.ToolTip(this.components); this.pictureBox3 = new System.Windows.Forms.PictureBox(); - this.grpEnemiesSeen.SuspendLayout(); + this.tabFishCaught = new System.Windows.Forms.TabPage(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.label62 = new System.Windows.Forms.Label(); + this.btnSelectAllFishCaught = new System.Windows.Forms.Button(); + this.btnResetFishCaught = new System.Windows.Forms.Button(); + this.btnDeselectAllFishCaught = new System.Windows.Forms.Button(); + this.cblstFishCaught = new System.Windows.Forms.CheckedListBox(); + this.tabs.SuspendLayout(); this.tabChar.SuspendLayout(); this.grpPatch.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numID)).BeginInit(); @@ -304,9 +347,19 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.numPetHP)).BeginInit(); this.tabCards.SuspendLayout(); this.grpCards.SuspendLayout(); + this.tabMaps.SuspendLayout(); + this.grpMaps.SuspendLayout(); this.tabQuests.SuspendLayout(); this.grpQuests.SuspendLayout(); + this.tabFlags.SuspendLayout(); + this.grpFlags.SuspendLayout(); this.tabEnemiesSeen.SuspendLayout(); + this.grpEnemiesSeen.SuspendLayout(); + this.tabTrophies.SuspendLayout(); + this.grpTrophies.SuspendLayout(); + this.tabItemsSeen.SuspendLayout(); + this.grpItemsSeen.SuspendLayout(); + this.tabItemsCrafted.SuspendLayout(); this.groupBox1.SuspendLayout(); this.tabQuickslots.SuspendLayout(); this.grpQuickslots.SuspendLayout(); @@ -386,30 +439,36 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pictureBox25)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.sliderUtilityO2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox26)).BeginInit(); - this.tabTreasureMaps.SuspendLayout(); this.msMenu.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); + this.tabFishCaught.SuspendLayout(); + this.groupBox2.SuspendLayout(); this.SuspendLayout(); // - // grpEnemiesSeen + // tabs // - this.grpEnemiesSeen.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + this.tabs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.grpEnemiesSeen.Controls.Add(this.tabChar); - this.grpEnemiesSeen.Controls.Add(this.tabInventory); - this.grpEnemiesSeen.Controls.Add(this.tabPets); - this.grpEnemiesSeen.Controls.Add(this.tabCards); - this.grpEnemiesSeen.Controls.Add(this.tabQuests); - this.grpEnemiesSeen.Controls.Add(this.tabEnemiesSeen); - this.grpEnemiesSeen.Controls.Add(this.tabQuickslots); - this.grpEnemiesSeen.Controls.Add(this.tabSkills); - this.grpEnemiesSeen.Controls.Add(this.tabTreasureMaps); - this.grpEnemiesSeen.Location = new System.Drawing.Point(0, 24); - this.grpEnemiesSeen.Name = "grpEnemiesSeen"; - this.grpEnemiesSeen.SelectedIndex = 0; - this.grpEnemiesSeen.Size = new System.Drawing.Size(567, 422); - this.grpEnemiesSeen.TabIndex = 0; + this.tabs.Controls.Add(this.tabChar); + this.tabs.Controls.Add(this.tabInventory); + this.tabs.Controls.Add(this.tabPets); + this.tabs.Controls.Add(this.tabCards); + this.tabs.Controls.Add(this.tabMaps); + this.tabs.Controls.Add(this.tabQuests); + this.tabs.Controls.Add(this.tabFlags); + this.tabs.Controls.Add(this.tabTrophies); + this.tabs.Controls.Add(this.tabFishCaught); + this.tabs.Controls.Add(this.tabEnemiesSeen); + this.tabs.Controls.Add(this.tabItemsSeen); + this.tabs.Controls.Add(this.tabItemsCrafted); + this.tabs.Controls.Add(this.tabQuickslots); + this.tabs.Controls.Add(this.tabSkills); + this.tabs.Location = new System.Drawing.Point(0, 24); + this.tabs.Name = "tabs"; + this.tabs.SelectedIndex = 0; + this.tabs.Size = new System.Drawing.Size(567, 422); + this.tabs.TabIndex = 0; // // tabChar // @@ -1601,6 +1660,7 @@ private void InitializeComponent() // // grpCards // + this.grpCards.Controls.Add(this.label58); this.grpCards.Controls.Add(this.btnSelectAllCards); this.grpCards.Controls.Add(this.btnResetCards); this.grpCards.Controls.Add(this.btnDeselectAllCards); @@ -1611,6 +1671,15 @@ private void InitializeComponent() this.grpCards.TabStop = false; this.grpCards.Text = "Cards"; // + // label58 + // + this.label58.AutoSize = true; + this.label58.Location = new System.Drawing.Point(6, 74); + this.label58.Name = "label58"; + this.label58.Size = new System.Drawing.Size(72, 52); + this.label58.TabIndex = 7; + this.label58.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // // btnSelectAllCards // this.btnSelectAllCards.Location = new System.Drawing.Point(6, 19); @@ -1649,6 +1718,78 @@ private void InitializeComponent() this.cblstCards.Size = new System.Drawing.Size(442, 379); this.cblstCards.TabIndex = 2; // + // tabMaps + // + this.tabMaps.Controls.Add(this.grpMaps); + this.tabMaps.Controls.Add(this.cblstMaps); + this.tabMaps.Location = new System.Drawing.Point(4, 22); + this.tabMaps.Name = "tabMaps"; + this.tabMaps.Padding = new System.Windows.Forms.Padding(3); + this.tabMaps.Size = new System.Drawing.Size(559, 396); + this.tabMaps.TabIndex = 10; + this.tabMaps.Text = "Maps"; + this.tabMaps.UseVisualStyleBackColor = true; + // + // grpMaps + // + this.grpMaps.Controls.Add(this.label39); + this.grpMaps.Controls.Add(this.btnSelectAllMaps); + this.grpMaps.Controls.Add(this.btnResetMaps); + this.grpMaps.Controls.Add(this.btnDeselectAllMaps); + this.grpMaps.Location = new System.Drawing.Point(454, 6); + this.grpMaps.Name = "grpMaps"; + this.grpMaps.Size = new System.Drawing.Size(97, 379); + this.grpMaps.TabIndex = 8; + this.grpMaps.TabStop = false; + this.grpMaps.Text = "Maps"; + // + // label39 + // + this.label39.AutoSize = true; + this.label39.Location = new System.Drawing.Point(6, 74); + this.label39.Name = "label39"; + this.label39.Size = new System.Drawing.Size(72, 52); + this.label39.TabIndex = 8; + this.label39.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // + // btnSelectAllMaps + // + this.btnSelectAllMaps.Location = new System.Drawing.Point(6, 19); + this.btnSelectAllMaps.Name = "btnSelectAllMaps"; + this.btnSelectAllMaps.Size = new System.Drawing.Size(87, 23); + this.btnSelectAllMaps.TabIndex = 3; + this.btnSelectAllMaps.Text = "Select all"; + this.btnSelectAllMaps.UseVisualStyleBackColor = true; + this.btnSelectAllMaps.Click += new System.EventHandler(this.btnSelectAllMaps_Click); + // + // btnResetMaps + // + this.btnResetMaps.Location = new System.Drawing.Point(6, 350); + this.btnResetMaps.Name = "btnResetMaps"; + this.btnResetMaps.Size = new System.Drawing.Size(87, 23); + this.btnResetMaps.TabIndex = 5; + this.btnResetMaps.Text = "Reset"; + this.btnResetMaps.UseVisualStyleBackColor = true; + this.btnResetMaps.Click += new System.EventHandler(this.btnResetMaps_Click); + // + // btnDeselectAllMaps + // + this.btnDeselectAllMaps.Location = new System.Drawing.Point(6, 48); + this.btnDeselectAllMaps.Name = "btnDeselectAllMaps"; + this.btnDeselectAllMaps.Size = new System.Drawing.Size(87, 23); + this.btnDeselectAllMaps.TabIndex = 4; + this.btnDeselectAllMaps.Text = "Deselect all"; + this.btnDeselectAllMaps.UseVisualStyleBackColor = true; + this.btnDeselectAllMaps.Click += new System.EventHandler(this.btnDeselectAllMaps_Click); + // + // cblstMaps + // + this.cblstMaps.FormattingEnabled = true; + this.cblstMaps.Location = new System.Drawing.Point(6, 6); + this.cblstMaps.Name = "cblstMaps"; + this.cblstMaps.Size = new System.Drawing.Size(442, 379); + this.cblstMaps.TabIndex = 7; + // // tabQuests // this.tabQuests.Controls.Add(this.grpQuests); @@ -1663,6 +1804,7 @@ private void InitializeComponent() // // grpQuests // + this.grpQuests.Controls.Add(this.label40); this.grpQuests.Controls.Add(this.btnSelectAllQuests); this.grpQuests.Controls.Add(this.btnResetQuests); this.grpQuests.Controls.Add(this.btnDeselectAllQuests); @@ -1673,6 +1815,15 @@ private void InitializeComponent() this.grpQuests.TabStop = false; this.grpQuests.Text = "Quests"; // + // label40 + // + this.label40.AutoSize = true; + this.label40.Location = new System.Drawing.Point(6, 74); + this.label40.Name = "label40"; + this.label40.Size = new System.Drawing.Size(72, 52); + this.label40.TabIndex = 8; + this.label40.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // // btnSelectAllQuests // this.btnSelectAllQuests.Location = new System.Drawing.Point(6, 19); @@ -1711,9 +1862,81 @@ private void InitializeComponent() this.cblstQuests.Size = new System.Drawing.Size(442, 379); this.cblstQuests.TabIndex = 7; // + // tabFlags + // + this.tabFlags.Controls.Add(this.grpFlags); + this.tabFlags.Controls.Add(this.cblstFlags); + this.tabFlags.Location = new System.Drawing.Point(4, 22); + this.tabFlags.Name = "tabFlags"; + this.tabFlags.Padding = new System.Windows.Forms.Padding(3); + this.tabFlags.Size = new System.Drawing.Size(559, 396); + this.tabFlags.TabIndex = 6; + this.tabFlags.Text = "Flags"; + this.tabFlags.UseVisualStyleBackColor = true; + // + // grpFlags + // + this.grpFlags.Controls.Add(this.label41); + this.grpFlags.Controls.Add(this.btnSelectAllFlags); + this.grpFlags.Controls.Add(this.btnResetFlags); + this.grpFlags.Controls.Add(this.btnDeselectAllFlags); + this.grpFlags.Location = new System.Drawing.Point(454, 6); + this.grpFlags.Name = "grpFlags"; + this.grpFlags.Size = new System.Drawing.Size(97, 379); + this.grpFlags.TabIndex = 10; + this.grpFlags.TabStop = false; + this.grpFlags.Text = "Flags"; + // + // label41 + // + this.label41.AutoSize = true; + this.label41.Location = new System.Drawing.Point(6, 74); + this.label41.Name = "label41"; + this.label41.Size = new System.Drawing.Size(72, 52); + this.label41.TabIndex = 8; + this.label41.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // + // btnSelectAllFlags + // + this.btnSelectAllFlags.Location = new System.Drawing.Point(6, 19); + this.btnSelectAllFlags.Name = "btnSelectAllFlags"; + this.btnSelectAllFlags.Size = new System.Drawing.Size(87, 23); + this.btnSelectAllFlags.TabIndex = 3; + this.btnSelectAllFlags.Text = "Select all"; + this.btnSelectAllFlags.UseVisualStyleBackColor = true; + this.btnSelectAllFlags.Click += new System.EventHandler(this.btnSelectAllFlags_Click); + // + // btnResetFlags + // + this.btnResetFlags.Location = new System.Drawing.Point(6, 350); + this.btnResetFlags.Name = "btnResetFlags"; + this.btnResetFlags.Size = new System.Drawing.Size(87, 23); + this.btnResetFlags.TabIndex = 5; + this.btnResetFlags.Text = "Reset"; + this.btnResetFlags.UseVisualStyleBackColor = true; + this.btnResetFlags.Click += new System.EventHandler(this.btnResetFlags_Click); + // + // btnDeselectAllFlags + // + this.btnDeselectAllFlags.Location = new System.Drawing.Point(6, 48); + this.btnDeselectAllFlags.Name = "btnDeselectAllFlags"; + this.btnDeselectAllFlags.Size = new System.Drawing.Size(87, 23); + this.btnDeselectAllFlags.TabIndex = 4; + this.btnDeselectAllFlags.Text = "Deselect all"; + this.btnDeselectAllFlags.UseVisualStyleBackColor = true; + this.btnDeselectAllFlags.Click += new System.EventHandler(this.btnDeselectAllFlags_Click); + // + // cblstFlags + // + this.cblstFlags.FormattingEnabled = true; + this.cblstFlags.Location = new System.Drawing.Point(6, 6); + this.cblstFlags.Name = "cblstFlags"; + this.cblstFlags.Size = new System.Drawing.Size(442, 379); + this.cblstFlags.TabIndex = 9; + // // tabEnemiesSeen // - this.tabEnemiesSeen.Controls.Add(this.groupBox1); + this.tabEnemiesSeen.Controls.Add(this.grpEnemiesSeen); this.tabEnemiesSeen.Controls.Add(this.cblstEnemiesSeens); this.tabEnemiesSeen.Location = new System.Drawing.Point(4, 22); this.tabEnemiesSeen.Name = "tabEnemiesSeen"; @@ -1723,17 +1946,27 @@ private void InitializeComponent() this.tabEnemiesSeen.Text = "Enemies seen"; this.tabEnemiesSeen.UseVisualStyleBackColor = true; // - // groupBox1 + // grpEnemiesSeen // - this.groupBox1.Controls.Add(this.btnSelectAllEnemiesSeen); - this.groupBox1.Controls.Add(this.btnResetEnemiesSeen); - this.groupBox1.Controls.Add(this.btnDeselectAllEnemiesSeen); - this.groupBox1.Location = new System.Drawing.Point(454, 6); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(97, 379); - this.groupBox1.TabIndex = 10; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Enemies seen"; + this.grpEnemiesSeen.Controls.Add(this.label50); + this.grpEnemiesSeen.Controls.Add(this.btnSelectAllEnemiesSeen); + this.grpEnemiesSeen.Controls.Add(this.btnResetEnemiesSeen); + this.grpEnemiesSeen.Controls.Add(this.btnDeselectAllEnemiesSeen); + this.grpEnemiesSeen.Location = new System.Drawing.Point(454, 6); + this.grpEnemiesSeen.Name = "grpEnemiesSeen"; + this.grpEnemiesSeen.Size = new System.Drawing.Size(97, 379); + this.grpEnemiesSeen.TabIndex = 10; + this.grpEnemiesSeen.TabStop = false; + this.grpEnemiesSeen.Text = "Enemies seen"; + // + // label50 + // + this.label50.AutoSize = true; + this.label50.Location = new System.Drawing.Point(6, 74); + this.label50.Name = "label50"; + this.label50.Size = new System.Drawing.Size(72, 52); + this.label50.TabIndex = 8; + this.label50.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; // // btnSelectAllEnemiesSeen // @@ -1773,6 +2006,219 @@ private void InitializeComponent() this.cblstEnemiesSeens.Size = new System.Drawing.Size(442, 379); this.cblstEnemiesSeens.TabIndex = 9; // + // tabTrophies + // + this.tabTrophies.Controls.Add(this.grpTrophies); + this.tabTrophies.Controls.Add(this.cblstTrophies); + this.tabTrophies.Location = new System.Drawing.Point(4, 22); + this.tabTrophies.Name = "tabTrophies"; + this.tabTrophies.Size = new System.Drawing.Size(559, 396); + this.tabTrophies.TabIndex = 11; + this.tabTrophies.Text = "Trophies"; + this.tabTrophies.UseVisualStyleBackColor = true; + // + // grpTrophies + // + this.grpTrophies.Controls.Add(this.label59); + this.grpTrophies.Controls.Add(this.btnSelectAllTrophies); + this.grpTrophies.Controls.Add(this.btnResetTrophies); + this.grpTrophies.Controls.Add(this.btnDeselectAllTrophies); + this.grpTrophies.Location = new System.Drawing.Point(454, 6); + this.grpTrophies.Name = "grpTrophies"; + this.grpTrophies.Size = new System.Drawing.Size(97, 379); + this.grpTrophies.TabIndex = 12; + this.grpTrophies.TabStop = false; + this.grpTrophies.Text = "Trophies"; + // + // label59 + // + this.label59.AutoSize = true; + this.label59.Location = new System.Drawing.Point(6, 74); + this.label59.Name = "label59"; + this.label59.Size = new System.Drawing.Size(72, 52); + this.label59.TabIndex = 8; + this.label59.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // + // btnSelectAllTrophies + // + this.btnSelectAllTrophies.Location = new System.Drawing.Point(6, 19); + this.btnSelectAllTrophies.Name = "btnSelectAllTrophies"; + this.btnSelectAllTrophies.Size = new System.Drawing.Size(87, 23); + this.btnSelectAllTrophies.TabIndex = 3; + this.btnSelectAllTrophies.Text = "Select all"; + this.btnSelectAllTrophies.UseVisualStyleBackColor = true; + this.btnSelectAllTrophies.Click += new System.EventHandler(this.btnSelectAllTrophies_Click); + // + // btnResetTrophies + // + this.btnResetTrophies.Location = new System.Drawing.Point(6, 350); + this.btnResetTrophies.Name = "btnResetTrophies"; + this.btnResetTrophies.Size = new System.Drawing.Size(87, 23); + this.btnResetTrophies.TabIndex = 5; + this.btnResetTrophies.Text = "Reset"; + this.btnResetTrophies.UseVisualStyleBackColor = true; + this.btnResetTrophies.Click += new System.EventHandler(this.btnResetTrophies_Click); + // + // btnDeselectAllTrophies + // + this.btnDeselectAllTrophies.Location = new System.Drawing.Point(6, 48); + this.btnDeselectAllTrophies.Name = "btnDeselectAllTrophies"; + this.btnDeselectAllTrophies.Size = new System.Drawing.Size(87, 23); + this.btnDeselectAllTrophies.TabIndex = 4; + this.btnDeselectAllTrophies.Text = "Deselect all"; + this.btnDeselectAllTrophies.UseVisualStyleBackColor = true; + this.btnDeselectAllTrophies.Click += new System.EventHandler(this.btnDeselectAllTrophies_Click); + // + // cblstTrophies + // + this.cblstTrophies.FormattingEnabled = true; + this.cblstTrophies.Location = new System.Drawing.Point(6, 6); + this.cblstTrophies.Name = "cblstTrophies"; + this.cblstTrophies.Size = new System.Drawing.Size(442, 379); + this.cblstTrophies.TabIndex = 11; + // + // tabItemsSeen + // + this.tabItemsSeen.Controls.Add(this.grpItemsSeen); + this.tabItemsSeen.Controls.Add(this.cblstItemsSeen); + this.tabItemsSeen.Location = new System.Drawing.Point(4, 22); + this.tabItemsSeen.Name = "tabItemsSeen"; + this.tabItemsSeen.Size = new System.Drawing.Size(559, 396); + this.tabItemsSeen.TabIndex = 12; + this.tabItemsSeen.Text = "Items Seen"; + this.tabItemsSeen.UseVisualStyleBackColor = true; + // + // grpItemsSeen + // + this.grpItemsSeen.Controls.Add(this.label60); + this.grpItemsSeen.Controls.Add(this.btnSelectAllItemsSeen); + this.grpItemsSeen.Controls.Add(this.btnResetItemsSeen); + this.grpItemsSeen.Controls.Add(this.btnDeselectAllItemsSeen); + this.grpItemsSeen.Location = new System.Drawing.Point(454, 6); + this.grpItemsSeen.Name = "grpItemsSeen"; + this.grpItemsSeen.Size = new System.Drawing.Size(97, 379); + this.grpItemsSeen.TabIndex = 14; + this.grpItemsSeen.TabStop = false; + this.grpItemsSeen.Text = "Items Seen"; + // + // label60 + // + this.label60.AutoSize = true; + this.label60.Location = new System.Drawing.Point(6, 74); + this.label60.Name = "label60"; + this.label60.Size = new System.Drawing.Size(72, 52); + this.label60.TabIndex = 8; + this.label60.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // + // btnSelectAllItemsSeen + // + this.btnSelectAllItemsSeen.Location = new System.Drawing.Point(6, 19); + this.btnSelectAllItemsSeen.Name = "btnSelectAllItemsSeen"; + this.btnSelectAllItemsSeen.Size = new System.Drawing.Size(87, 23); + this.btnSelectAllItemsSeen.TabIndex = 3; + this.btnSelectAllItemsSeen.Text = "Select all"; + this.btnSelectAllItemsSeen.UseVisualStyleBackColor = true; + this.btnSelectAllItemsSeen.Click += new System.EventHandler(this.btnSelectAllItemsSeen_Click); + // + // btnResetItemsSeen + // + this.btnResetItemsSeen.Location = new System.Drawing.Point(6, 350); + this.btnResetItemsSeen.Name = "btnResetItemsSeen"; + this.btnResetItemsSeen.Size = new System.Drawing.Size(87, 23); + this.btnResetItemsSeen.TabIndex = 5; + this.btnResetItemsSeen.Text = "Reset"; + this.btnResetItemsSeen.UseVisualStyleBackColor = true; + this.btnResetItemsSeen.Click += new System.EventHandler(this.btnResetItemsSeen_Click); + // + // btnDeselectAllItemsSeen + // + this.btnDeselectAllItemsSeen.Location = new System.Drawing.Point(6, 48); + this.btnDeselectAllItemsSeen.Name = "btnDeselectAllItemsSeen"; + this.btnDeselectAllItemsSeen.Size = new System.Drawing.Size(87, 23); + this.btnDeselectAllItemsSeen.TabIndex = 4; + this.btnDeselectAllItemsSeen.Text = "Deselect all"; + this.btnDeselectAllItemsSeen.UseVisualStyleBackColor = true; + this.btnDeselectAllItemsSeen.Click += new System.EventHandler(this.btnDeselectAllItemsSeen_Click); + // + // cblstItemsSeen + // + this.cblstItemsSeen.FormattingEnabled = true; + this.cblstItemsSeen.Location = new System.Drawing.Point(6, 6); + this.cblstItemsSeen.Name = "cblstItemsSeen"; + this.cblstItemsSeen.Size = new System.Drawing.Size(442, 379); + this.cblstItemsSeen.TabIndex = 13; + // + // tabItemsCrafted + // + this.tabItemsCrafted.Controls.Add(this.groupBox1); + this.tabItemsCrafted.Controls.Add(this.cblstItemsCrafted); + this.tabItemsCrafted.Location = new System.Drawing.Point(4, 22); + this.tabItemsCrafted.Name = "tabItemsCrafted"; + this.tabItemsCrafted.Size = new System.Drawing.Size(559, 396); + this.tabItemsCrafted.TabIndex = 13; + this.tabItemsCrafted.Text = "Items Crafted"; + this.tabItemsCrafted.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.label61); + this.groupBox1.Controls.Add(this.btnSelectAllItemsCrafted); + this.groupBox1.Controls.Add(this.btnResetItemsCrafted); + this.groupBox1.Controls.Add(this.btnDeselectAllItemsCrafted); + this.groupBox1.Location = new System.Drawing.Point(454, 6); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(97, 379); + this.groupBox1.TabIndex = 16; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Items Crafted"; + // + // label61 + // + this.label61.AutoSize = true; + this.label61.Location = new System.Drawing.Point(6, 74); + this.label61.Name = "label61"; + this.label61.Size = new System.Drawing.Size(72, 52); + this.label61.TabIndex = 8; + this.label61.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // + // btnSelectAllItemsCrafted + // + this.btnSelectAllItemsCrafted.Location = new System.Drawing.Point(6, 19); + this.btnSelectAllItemsCrafted.Name = "btnSelectAllItemsCrafted"; + this.btnSelectAllItemsCrafted.Size = new System.Drawing.Size(87, 23); + this.btnSelectAllItemsCrafted.TabIndex = 3; + this.btnSelectAllItemsCrafted.Text = "Select all"; + this.btnSelectAllItemsCrafted.UseVisualStyleBackColor = true; + this.btnSelectAllItemsCrafted.Click += new System.EventHandler(this.btnSelectAllItemsCrafted_Click); + // + // btnResetItemsCrafted + // + this.btnResetItemsCrafted.Location = new System.Drawing.Point(6, 350); + this.btnResetItemsCrafted.Name = "btnResetItemsCrafted"; + this.btnResetItemsCrafted.Size = new System.Drawing.Size(87, 23); + this.btnResetItemsCrafted.TabIndex = 5; + this.btnResetItemsCrafted.Text = "Reset"; + this.btnResetItemsCrafted.UseVisualStyleBackColor = true; + this.btnResetItemsCrafted.Click += new System.EventHandler(this.btnResetItemsCrafted_Click); + // + // btnDeselectAllItemsCrafted + // + this.btnDeselectAllItemsCrafted.Location = new System.Drawing.Point(6, 48); + this.btnDeselectAllItemsCrafted.Name = "btnDeselectAllItemsCrafted"; + this.btnDeselectAllItemsCrafted.Size = new System.Drawing.Size(87, 23); + this.btnDeselectAllItemsCrafted.TabIndex = 4; + this.btnDeselectAllItemsCrafted.Text = "Deselect all"; + this.btnDeselectAllItemsCrafted.UseVisualStyleBackColor = true; + this.btnDeselectAllItemsCrafted.Click += new System.EventHandler(this.btnDeselectAllItemsCrafted_Click); + // + // cblstItemsCrafted + // + this.cblstItemsCrafted.FormattingEnabled = true; + this.cblstItemsCrafted.Location = new System.Drawing.Point(6, 6); + this.cblstItemsCrafted.Name = "cblstItemsCrafted"; + this.cblstItemsCrafted.Size = new System.Drawing.Size(442, 379); + this.cblstItemsCrafted.TabIndex = 15; + // // tabQuickslots // this.tabQuickslots.Controls.Add(this.label57); @@ -2796,28 +3242,6 @@ private void InitializeComponent() this.tabTalentsMagic.Text = "Talents: Magic"; this.tabTalentsMagic.UseVisualStyleBackColor = true; // - // tabTreasureMaps - // - this.tabTreasureMaps.Controls.Add(this.label41); - this.tabTreasureMaps.Location = new System.Drawing.Point(4, 22); - this.tabTreasureMaps.Name = "tabTreasureMaps"; - this.tabTreasureMaps.Padding = new System.Windows.Forms.Padding(3); - this.tabTreasureMaps.Size = new System.Drawing.Size(559, 396); - this.tabTreasureMaps.TabIndex = 6; - this.tabTreasureMaps.Text = "*Treasure Maps"; - this.tabTreasureMaps.UseVisualStyleBackColor = true; - // - // label41 - // - this.label41.AutoSize = true; - this.label41.BackColor = System.Drawing.Color.Transparent; - this.label41.ForeColor = System.Drawing.SystemColors.Desktop; - this.label41.Location = new System.Drawing.Point(6, 3); - this.label41.Name = "label41"; - this.label41.Size = new System.Drawing.Size(117, 13); - this.label41.TabIndex = 31; - this.label41.Text = "* = not yet implemented"; - // // msMenu // this.msMenu.ImageScalingSize = new System.Drawing.Size(20, 20); @@ -2936,6 +3360,77 @@ private void InitializeComponent() this.pictureBox3.TabStop = false; this.pictureBox3.Click += new System.EventHandler(this.PictureBox3_Click); // + // tabFishCaught + // + this.tabFishCaught.Controls.Add(this.groupBox2); + this.tabFishCaught.Controls.Add(this.cblstFishCaught); + this.tabFishCaught.Location = new System.Drawing.Point(4, 22); + this.tabFishCaught.Name = "tabFishCaught"; + this.tabFishCaught.Size = new System.Drawing.Size(559, 396); + this.tabFishCaught.TabIndex = 14; + this.tabFishCaught.Text = "Fish Caught"; + this.tabFishCaught.UseVisualStyleBackColor = true; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.label62); + this.groupBox2.Controls.Add(this.btnSelectAllFishCaught); + this.groupBox2.Controls.Add(this.btnResetFishCaught); + this.groupBox2.Controls.Add(this.btnDeselectAllFishCaught); + this.groupBox2.Location = new System.Drawing.Point(454, 6); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(97, 379); + this.groupBox2.TabIndex = 18; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Fish Caught"; + // + // label62 + // + this.label62.AutoSize = true; + this.label62.Location = new System.Drawing.Point(6, 74); + this.label62.Name = "label62"; + this.label62.Size = new System.Drawing.Size(72, 52); + this.label62.TabIndex = 8; + this.label62.Text = "Selecting the \r\n\'null\'-Value \r\ncould lead \r\nto issues"; + // + // btnSelectAllFishCaught + // + this.btnSelectAllFishCaught.Location = new System.Drawing.Point(6, 19); + this.btnSelectAllFishCaught.Name = "btnSelectAllFishCaught"; + this.btnSelectAllFishCaught.Size = new System.Drawing.Size(87, 23); + this.btnSelectAllFishCaught.TabIndex = 3; + this.btnSelectAllFishCaught.Text = "Select all"; + this.btnSelectAllFishCaught.UseVisualStyleBackColor = true; + this.btnSelectAllFishCaught.Click += new System.EventHandler(this.btnSelectAllFishCaught_Click); + // + // btnResetFishCaught + // + this.btnResetFishCaught.Location = new System.Drawing.Point(6, 350); + this.btnResetFishCaught.Name = "btnResetFishCaught"; + this.btnResetFishCaught.Size = new System.Drawing.Size(87, 23); + this.btnResetFishCaught.TabIndex = 5; + this.btnResetFishCaught.Text = "Reset"; + this.btnResetFishCaught.UseVisualStyleBackColor = true; + this.btnResetFishCaught.Click += new System.EventHandler(this.btnResetFishCaught_Click); + // + // btnDeselectAllFishCaught + // + this.btnDeselectAllFishCaught.Location = new System.Drawing.Point(6, 48); + this.btnDeselectAllFishCaught.Name = "btnDeselectAllFishCaught"; + this.btnDeselectAllFishCaught.Size = new System.Drawing.Size(87, 23); + this.btnDeselectAllFishCaught.TabIndex = 4; + this.btnDeselectAllFishCaught.Text = "Deselect all"; + this.btnDeselectAllFishCaught.UseVisualStyleBackColor = true; + this.btnDeselectAllFishCaught.Click += new System.EventHandler(this.btnDeselectAllFishCaught_Click); + // + // cblstFishCaught + // + this.cblstFishCaught.FormattingEnabled = true; + this.cblstFishCaught.Location = new System.Drawing.Point(6, 6); + this.cblstFishCaught.Name = "cblstFishCaught"; + this.cblstFishCaught.Size = new System.Drawing.Size(442, 379); + this.cblstFishCaught.TabIndex = 17; + // // FrmMain // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -2944,14 +3439,14 @@ private void InitializeComponent() this.ClientSize = new System.Drawing.Size(567, 570); this.Controls.Add(this.pictureBox3); this.Controls.Add(this.txtConsole); - this.Controls.Add(this.grpEnemiesSeen); + this.Controls.Add(this.tabs); this.Controls.Add(this.msMenu); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MainMenuStrip = this.msMenu; this.Name = "FrmMain"; this.Text = "SoG: Savegame Editor v16.9.30803.129 by tolik518"; this.Load += new System.EventHandler(this.FrmMain_Load); - this.grpEnemiesSeen.ResumeLayout(false); + this.tabs.ResumeLayout(false); this.tabChar.ResumeLayout(false); this.tabChar.PerformLayout(); this.grpPatch.ResumeLayout(false); @@ -2995,10 +3490,28 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.numPetHP)).EndInit(); this.tabCards.ResumeLayout(false); this.grpCards.ResumeLayout(false); + this.grpCards.PerformLayout(); + this.tabMaps.ResumeLayout(false); + this.grpMaps.ResumeLayout(false); + this.grpMaps.PerformLayout(); this.tabQuests.ResumeLayout(false); this.grpQuests.ResumeLayout(false); + this.grpQuests.PerformLayout(); + this.tabFlags.ResumeLayout(false); + this.grpFlags.ResumeLayout(false); + this.grpFlags.PerformLayout(); this.tabEnemiesSeen.ResumeLayout(false); + this.grpEnemiesSeen.ResumeLayout(false); + this.grpEnemiesSeen.PerformLayout(); + this.tabTrophies.ResumeLayout(false); + this.grpTrophies.ResumeLayout(false); + this.grpTrophies.PerformLayout(); + this.tabItemsSeen.ResumeLayout(false); + this.grpItemsSeen.ResumeLayout(false); + this.grpItemsSeen.PerformLayout(); + this.tabItemsCrafted.ResumeLayout(false); this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); this.tabQuickslots.ResumeLayout(false); this.tabQuickslots.PerformLayout(); this.grpQuickslots.ResumeLayout(false); @@ -3088,11 +3601,12 @@ private void InitializeComponent() ((System.ComponentModel.ISupportInitialize)(this.pictureBox25)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.sliderUtilityO2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox26)).EndInit(); - this.tabTreasureMaps.ResumeLayout(false); - this.tabTreasureMaps.PerformLayout(); this.msMenu.ResumeLayout(false); this.msMenu.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); + this.tabFishCaught.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -3100,7 +3614,7 @@ private void InitializeComponent() #endregion - private System.Windows.Forms.TabControl grpEnemiesSeen; + private System.Windows.Forms.TabControl tabs; private System.Windows.Forms.TabPage tabQuickslots; private System.Windows.Forms.MenuStrip msMenu; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; @@ -3153,7 +3667,7 @@ private void InitializeComponent() private System.Windows.Forms.Label label1; private System.Windows.Forms.TabPage tabEnemiesSeen; private System.Windows.Forms.TabPage tabCards; - private System.Windows.Forms.TabPage tabTreasureMaps; + private System.Windows.Forms.TabPage tabFlags; private System.Windows.Forms.GroupBox grpLevel; private System.Windows.Forms.Label label33; private System.Windows.Forms.Label label32; @@ -3198,7 +3712,6 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox cbStyleFacegear; private System.Windows.Forms.Label label17; private System.Windows.Forms.ComboBox cbStyleWeapon; - private System.Windows.Forms.Label label41; private System.Windows.Forms.TabPage tabPets; private System.Windows.Forms.ListView lstPets; private System.Windows.Forms.ColumnHeader Level; @@ -3337,10 +3850,54 @@ private void InitializeComponent() private Button btnDeselectAllQuests; private CheckedListBox cblstQuests; private ToolStripMenuItem openSavegameFolderToolStripMenuItem; - private GroupBox groupBox1; + private GroupBox grpEnemiesSeen; private Button btnSelectAllEnemiesSeen; private Button btnResetEnemiesSeen; private Button btnDeselectAllEnemiesSeen; private CheckedListBox cblstEnemiesSeens; + private GroupBox grpFlags; + private Button btnSelectAllFlags; + private Button btnResetFlags; + private Button btnDeselectAllFlags; + private CheckedListBox cblstFlags; + private TabPage tabMaps; + private GroupBox grpMaps; + private Button btnSelectAllMaps; + private Button btnResetMaps; + private Button btnDeselectAllMaps; + private CheckedListBox cblstMaps; + private Label label58; + private Label label39; + private Label label40; + private Label label41; + private Label label50; + private TabPage tabTrophies; + private GroupBox grpTrophies; + private Label label59; + private Button btnSelectAllTrophies; + private Button btnResetTrophies; + private Button btnDeselectAllTrophies; + private CheckedListBox cblstTrophies; + private TabPage tabItemsSeen; + private GroupBox grpItemsSeen; + private Label label60; + private Button btnSelectAllItemsSeen; + private Button btnResetItemsSeen; + private Button btnDeselectAllItemsSeen; + private CheckedListBox cblstItemsSeen; + private TabPage tabItemsCrafted; + private GroupBox groupBox1; + private Label label61; + private Button btnSelectAllItemsCrafted; + private Button btnResetItemsCrafted; + private Button btnDeselectAllItemsCrafted; + private CheckedListBox cblstItemsCrafted; + private TabPage tabFishCaught; + private GroupBox groupBox2; + private Label label62; + private Button btnSelectAllFishCaught; + private Button btnResetFishCaught; + private Button btnDeselectAllFishCaught; + private CheckedListBox cblstFishCaught; } } diff --git a/SoG_SGreader/Forms/FrmMain.cs b/SoG_SGreader/Forms/FrmMain.cs index 0e70b8f..649cb3b 100644 --- a/SoG_SGreader/Forms/FrmMain.cs +++ b/SoG_SGreader/Forms/FrmMain.cs @@ -1,21 +1,21 @@ -using System; +using SoG_SGreader.Wrapper; +using System; using System.Drawing; using System.IO; using System.Linq; using System.Windows.Forms; -using SoG_SGreader.Wrapper; namespace SoG_SGreader { public partial class FrmMain : Form { - public static readonly string SupportedPatch = "0.99g"; + public static readonly string SupportedPatch = "0.99xx"; public string InstalledGamePatch = ""; private Player playerObject = new Player(); private readonly ComboBox[] cbQuickslot = new ComboBox[10]; private readonly ComboBox[] cbQuickslotType = new ComboBox[10]; private string InitialPlaytime; - + public string OpenedSaveGamePath { get; set; } public FrmMain(string saveGamePath) @@ -23,12 +23,12 @@ public FrmMain(string saveGamePath) InitializeComponent(); //Initializing elements from the Designer InitElements(); //Initializing elements from this file txtConsole.AppendText("Official Repository: https://github.com/tolik518/SoG_SGreader \r\n"); - + if (File.Exists(saveGamePath)) { OpenedSaveGamePath = saveGamePath; LoadSaveGame(); - } + } else { txtConsole.AppendText("Savefile with the following path doesnt exist: " + saveGamePath + "\r\n"); @@ -40,7 +40,7 @@ private void OpenToolStripMenuItem_Click(object sender, EventArgs e) txtConsole.Text = ""; OpenFileDialog openFileDialog1 = new OpenFileDialog { - InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + Path.Combine("Secrets of Grindea","Characters"), + InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Path.DirectorySeparatorChar + Path.Combine("Secrets of Grindea", "Characters"), Filter = "SoG Savegame (*.cha)|*.cha", FilterIndex = 2, RestoreDirectory = true @@ -57,11 +57,11 @@ private void LoadSaveGame() { txtConsole.AppendText(OpenedSaveGamePath); InitVariables(); - + // TODO: This is a workaround to get the textbox into the wrapper (for easier testing) - ITextBoxWrapper txtConsoleWrapped = new UITextBox(txtConsole); + var txtConsoleWrapped = new UITextBox(txtConsole); playerObject = DataReader.ReadFromFile(OpenedSaveGamePath, txtConsoleWrapped); - + saveToolStripMenuItem.Enabled = true; InitFields(); @@ -127,7 +127,7 @@ private string[] FilterItems(string[] items, params string[] prefixes) { return items.Where(item => prefixes.Any(item.StartsWith) || item == "Null").ToArray(); } - + private void InitFields() { var items = Enum.GetNames(typeof(SogItem)); @@ -142,7 +142,7 @@ private void InitFields() cbAccessory1.DataSource = FilterItems(items, "Accessory_"); cbAccessory2.DataSource = FilterItems(items, "Accessory_"); cbStyleHat.DataSource = FilterItems(items, "Hat_"); - + cbStyleFacegear.DataSource = FilterItems(items, "Facegear_"); cbStyleWeapon.DataSource = FilterItems(items, "OneHanded_", "TwoHanded_", "Bow_"); cbStyleShield.DataSource = FilterItems(items, "Shield_"); @@ -172,6 +172,12 @@ private void InitFields() cblstCards.DataSource = Enum.GetNames(typeof(SogEnemy)); cblstQuests.DataSource = Enum.GetNames(typeof(SogQuest)); cblstEnemiesSeens.DataSource = Enum.GetNames(typeof(SogEnemy)); + cblstFlags.DataSource = Enum.GetNames(typeof(SogFlag)); + cblstMaps.DataSource = Enum.GetNames(typeof(SogTreasureMap)); + cblstTrophies.DataSource = Enum.GetNames(typeof(SogTrophy)); + cblstItemsSeen.DataSource = Enum.GetNames(typeof(SogItem)); + cblstItemsCrafted.DataSource = Enum.GetNames(typeof(SogItem)); + cblstFishCaught.DataSource = Enum.GetNames(typeof(SogFish)); } private void PopulateFields() @@ -209,10 +215,10 @@ private void PopulateFields() for (int i = 0; i != playerObject.ItemsCount; i++) { var vItem = new ListViewItem( - new[] { - playerObject.Inventory[i].ItemID.ToString(), - playerObject.Inventory[i].ItemCount.ToString(), - playerObject.Inventory[i].ItemPos.ToString() + new[] { + playerObject.Inventory[i].ItemID.ToString(), + playerObject.Inventory[i].ItemCount.ToString(), + playerObject.Inventory[i].ItemPos.ToString() } ); @@ -269,15 +275,15 @@ private void PopulateFields() sliderSkillMagicF0.Value = playerObject.GetSkillLevel(SogSkill.Magic_Fire_Fireball); sliderSkillMagicF1.Value = playerObject.GetSkillLevel(SogSkill.Magic_Fire_Meteor); sliderSkillMagicF2.Value = playerObject.GetSkillLevel(SogSkill.Magic_Fire_Flamethrower); - + sliderSkillMagicI0.Value = playerObject.GetSkillLevel(SogSkill.Magic_Ice_IceSpikes); sliderSkillMagicI1.Value = playerObject.GetSkillLevel(SogSkill.Magic_Ice_IceNova); sliderSkillMagicI2.Value = playerObject.GetSkillLevel(SogSkill.Magic_Ice_FrostyFriend); - + sliderSkillMagicE0.Value = playerObject.GetSkillLevel(SogSkill.Magic_Earth_EarthSpike); sliderSkillMagicE1.Value = playerObject.GetSkillLevel(SogSkill.Magic_Earth_SummonPlant); sliderSkillMagicE2.Value = playerObject.GetSkillLevel(SogSkill.Magic_Earth_InsectSwarm); - + sliderSkillMagicA0.Value = playerObject.GetSkillLevel(SogSkill.Magic_Wind_ChainLightning); sliderSkillMagicA1.Value = playerObject.GetSkillLevel(SogSkill.Magic_Wind_SummonCloud); sliderSkillMagicA2.Value = playerObject.GetSkillLevel(SogSkill.Magic_Wind_StaticTouch); @@ -296,11 +302,47 @@ private void PopulateFields() cblstQuests.SetItemChecked(i, playerHasQuest); } - for (int i = 0; i < cblstQuests.Items.Count; i++) + for (int i = 0; i < cblstEnemiesSeens.Items.Count; i++) { bool playerHasMetEnemy = playerObject.HasSeenEnemy((SogEnemy)Enum.Parse(typeof(SogEnemy), cblstEnemiesSeens.Items[i].ToString())); cblstEnemiesSeens.SetItemChecked(i, playerHasMetEnemy); } + + for (int i = 0; i < cblstFlags.Items.Count; i++) + { + bool playerHasFlag = playerObject.HasFlag((SogFlag)Enum.Parse(typeof(SogFlag), cblstFlags.Items[i].ToString())); + cblstFlags.SetItemChecked(i, playerHasFlag); + } + + for (int i = 0; i < cblstMaps.Items.Count; i++) + { + bool playerHasMap = playerObject.HasMap((SogTreasureMap)Enum.Parse(typeof(SogTreasureMap), cblstMaps.Items[i].ToString())); + cblstMaps.SetItemChecked(i, playerHasMap); + } + + for (int i = 0; i < cblstTrophies.Items.Count; i++) + { + bool playerHasTrophy = playerObject.HasTrophy((SogTrophy)Enum.Parse(typeof(SogTrophy), cblstTrophies.Items[i].ToString())); + cblstTrophies.SetItemChecked(i, playerHasTrophy); + } + + for (int i = 0; i < cblstItemsSeen.Items.Count; i++) + { + bool playerHasSeenItem = playerObject.HasSeenItem((SogItem)Enum.Parse(typeof(SogItem), cblstItemsSeen.Items[i].ToString())); + cblstItemsSeen.SetItemChecked(i, playerHasSeenItem); + } + + for (int i = 0; i < cblstItemsCrafted.Items.Count; i++) + { + bool playerHasCraftedItem = playerObject.HasCraftedItem((SogItem)Enum.Parse(typeof(SogItem), cblstItemsCrafted.Items[i].ToString())); + cblstItemsCrafted.SetItemChecked(i, playerHasCraftedItem); + } + + for (int i = 0; i < cblstFishCaught.Items.Count; i++) + { + bool playerHasCaughtFish = playerObject.HasCaughtFish((SogItem)Enum.Parse(typeof(SogItem), cblstFishCaught.Items[i].ToString())); + cblstFishCaught.SetItemChecked(i, playerHasCaughtFish); + } } //TODO: we need to clean all our variables before we load a new file @@ -348,7 +390,7 @@ private void GetDataFromFields() playerObject.Inventory.Clear(); for (int i = 0; i != lstInventory.Items.Count; i++) - { + { Item item = new Item { ItemID = (SogItem)Enum.Parse(typeof(SogItem), lstInventory.Items[i].SubItems[0].Text), @@ -397,9 +439,10 @@ private void GetDataFromFields() } playerObject.UniquePlayerId = (UInt32)numID.Value; - + // dont change the playtime if its not parseable - if (TimeSpan.TryParse(txtTimePlayed.Text, out TimeSpan result)) { + if (TimeSpan.TryParse(txtTimePlayed.Text, out TimeSpan result)) + { if (result.TotalSeconds > int.MaxValue) { txtConsole.AppendText("\r\n\r\nPlaytime is too high. Please check the format."); @@ -411,15 +454,17 @@ private void GetDataFromFields() if (InitialPlaytime != txtTimePlayed.Text) { playerObject.PlayTimeTotal = Math.Min((int)(result.TotalSeconds * 60), int.MaxValue); - } + } else { playerObject.PlayTimeTotal = playerObject.PlayTimeTotal; } - } else { + } + else + { txtConsole.AppendText("\r\n\r\nPlaytime is not parseable. Please check the format."); } - + playerObject.BirthdayDay = (int)numBirthdayDay.Value; playerObject.BirthdayMonth = (int)numBirtdayMonth.Value; @@ -431,21 +476,21 @@ private void GetDataFromFields() if (cblstCards.GetItemChecked(i)) { playerObject.Cards.Add( - new Card + new Card { CardID = (SogEnemy)Enum.Parse(typeof(SogEnemy), cblstCards.Items[i].ToString()) } ); } } - + playerObject.Quests.Clear(); for (int i = 0; i != cblstQuests.Items.Count; i++) { if (cblstQuests.GetItemChecked(i)) { playerObject.Quests.Add( - new Quest + new Quest { QuestID = (SogQuest)Enum.Parse(typeof(SogQuest), cblstQuests.Items[i].ToString()) } @@ -466,6 +511,90 @@ private void GetDataFromFields() ); } } + + playerObject.Flags.Clear(); + for (int i = 0; i != cblstFlags.Items.Count; i++) + { + if (cblstFlags.GetItemChecked(i)) + { + playerObject.Flags.Add( + new Flag + { + FlagID = (SogFlag)Enum.Parse(typeof(SogFlag), cblstFlags.Items[i].ToString()) + } + ); + } + } + + playerObject.TreasureMaps.Clear(); + for (int i = 0; i != cblstMaps.Items.Count; i++) + { + if (cblstMaps.GetItemChecked(i)) + { + playerObject.TreasureMaps.Add( + new TreasureMap + { + TreasureMapID = (SogTreasureMap)Enum.Parse(typeof(SogTreasureMap), cblstMaps.Items[i].ToString()) + } + ); + } + } + + playerObject.Trophies.Clear(); + for (int i = 0; i != cblstTrophies.Items.Count; i++) + { + if (cblstTrophies.GetItemChecked(i)) + { + playerObject.Trophies.Add( + new Trophy + { + TrophyID = (SogTrophy)Enum.Parse(typeof(SogTrophy), cblstTrophies.Items[i].ToString()) + } + ); + } + } + + playerObject.ItemsSeen.Clear(); + for (int i = 0; i != cblstItemsSeen.Items.Count; i++) + { + if (cblstItemsSeen.GetItemChecked(i)) + { + playerObject.ItemsSeen.Add( + new ItemSeen + { + ItemID = (SogItem)Enum.Parse(typeof(SogItem), cblstItemsSeen.Items[i].ToString()) + } + ); + } + } + + playerObject.ItemsCrafted.Clear(); + for (int i = 0; i != cblstItemsCrafted.Items.Count; i++) + { + if (cblstItemsCrafted.GetItemChecked(i)) + { + playerObject.ItemsCrafted.Add( + new ItemCrafted + { + ItemID = (SogItem)Enum.Parse(typeof(SogItem), cblstItemsCrafted.Items[i].ToString()) + } + ); + } + } + + playerObject.FishCaught.Clear(); + for (int i = 0; i != cblstFishCaught.Items.Count; i++) + { + if (cblstFishCaught.GetItemChecked(i)) + { + playerObject.FishCaught.Add( + new FishCaught + { + FishID = (SogItem)Enum.Parse(typeof(SogItem), cblstFishCaught.Items[i].ToString()) + } + ); + } + } } private void LstInventory_SelectedIndexChanged(object sender, EventArgs e) @@ -496,11 +625,11 @@ private void SaveToolStripMenuItem_Click(object sender, EventArgs e) FileStream fileStream = File.Create(sFilename); //there should be a better way to do this lol fileStream.Close(); } - + GetDataFromFields(); DataWriter dataWriter = new DataWriter(playerObject); dataWriter.WriteToFile(sFilename); - + txtConsole.AppendText("\r\n\r\nFile was saved successfully under: "); txtConsole.AppendText("\r\n" + sFilename); } @@ -631,15 +760,15 @@ private void NumPetStat_ValueChanged(object sender, EventArgs e) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[2].Text = numPetHP.Value.ToString(); - if ((Control) sender == numPetHP) + if ((Control)sender == numPetHP) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[2].Text = numPetHP.Value.ToString(); } - else if ((Control) sender == numPetEnergy) + else if ((Control)sender == numPetEnergy) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[3].Text = numPetEnergy.Value.ToString(); } - else if ((Control) sender == numPetDamage) + else if ((Control)sender == numPetDamage) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[4].Text = numPetDamage.Value.ToString(); } @@ -647,11 +776,11 @@ private void NumPetStat_ValueChanged(object sender, EventArgs e) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[5].Text = numPetCrit.Value.ToString(); } - else if ((Control) sender == numPetSpeed) + else if ((Control)sender == numPetSpeed) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[6].Text = numPetSpeed.Value.ToString(); } - else if ((Control) sender == numPetLevel) + else if ((Control)sender == numPetLevel) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[0].Text = numPetLevel.Value.ToString(); } @@ -662,13 +791,13 @@ private void TxtPetNickname_TextChanged(object sender, EventArgs e) { lstPets.Items[lstPets.FocusedItem.Index].SubItems[1].Text = txtPetNickname.Text; } - + private void JSONToolStripMenuItem_Click(object sender, EventArgs e) { string message = "File was saved successfully under\r\n"; string caption = "Save complete"; MessageBoxButtons buttons = MessageBoxButtons.OK; - + try { string jsonPath = JsonHandler.SaveGameToJson(playerObject, Directory.GetParent(OpenedSaveGamePath).FullName); @@ -711,7 +840,7 @@ private void PictureBox3_Click(object sender, EventArgs e) //:3 Icon in the top frmAbout.ShowDialog(); } - private async void FrmMain_Load(object sender, EventArgs e) + private async void FrmMain_Load(object sender, EventArgs e) { Text = "SoG: Savegame Editor v" + Application.ProductVersion + " by tolik518"; @@ -789,7 +918,7 @@ private void btnSelectAllEnemiesSeen_Click(object sender, EventArgs e) for (int i = 0; i < cblstEnemiesSeens.Items.Count; i++) { cblstEnemiesSeens.SetItemChecked(i, true); - } + } } private void btnDeselectAllEnemiesSeen_Click(object sender, EventArgs e) @@ -808,11 +937,161 @@ private void btnResetEnemiesSeen_Click(object sender, EventArgs e) cblstEnemiesSeens.SetItemChecked(i, playerHasMetEnemy); } } - + private void openSavegameFolderToolStripMenuItem_Click(object sender, EventArgs e) { string folderPath = Directory.GetParent(OpenedSaveGamePath).FullName; System.Diagnostics.Process.Start(folderPath); } + + private void btnSelectAllFlags_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstFlags.Items.Count; i++) + { + cblstFlags.SetItemChecked(i, true); + } + } + + private void btnDeselectAllFlags_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstFlags.Items.Count; i++) + { + cblstFlags.SetItemChecked(i, false); + } + } + + private void btnResetFlags_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstFlags.Items.Count; i++) + { + bool playerHasFlag = playerObject.HasFlag((SogFlag)Enum.Parse(typeof(SogFlag), cblstFlags.Items[i].ToString())); + cblstFlags.SetItemChecked(i, playerHasFlag); + } + } + + private void btnSelectAllMaps_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstMaps.Items.Count; i++) + { + cblstMaps.SetItemChecked(i, true); + } + } + + private void btnDeselectAllMaps_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstMaps.Items.Count; i++) + { + cblstMaps.SetItemChecked(i, false); + } + } + + private void btnResetMaps_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstMaps.Items.Count; i++) + { + bool playerHasMap = playerObject.HasMap((SogTreasureMap)Enum.Parse(typeof(SogTreasureMap), cblstMaps.Items[i].ToString())); + cblstMaps.SetItemChecked(i, playerHasMap); + } + } + + private void btnSelectAllTrophies_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstTrophies.Items.Count; i++) + { + cblstTrophies.SetItemChecked(i, true); + } + } + + private void btnDeselectAllTrophies_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstTrophies.Items.Count; i++) + { + cblstTrophies.SetItemChecked(i, false); + } + } + + private void btnResetTrophies_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstTrophies.Items.Count; i++) + { + bool playerHasTrophy = playerObject.HasTrophy((SogTrophy)Enum.Parse(typeof(SogTrophy), cblstTrophies.Items[i].ToString())); + cblstTrophies.SetItemChecked(i, playerHasTrophy); + } + } + + private void btnSelectAllItemsSeen_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstItemsSeen.Items.Count; i++) + { + cblstItemsSeen.SetItemChecked(i, true); + } + } + + private void btnDeselectAllItemsSeen_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstItemsSeen.Items.Count; i++) + { + cblstItemsSeen.SetItemChecked(i, false); + } + } + + private void btnResetItemsSeen_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstItemsSeen.Items.Count; i++) + { + bool playerHasSeenItem = playerObject.HasSeenItem((SogItem)Enum.Parse(typeof(SogItem), cblstItemsSeen.Items[i].ToString())); + cblstItemsSeen.SetItemChecked(i, playerHasSeenItem); + } + } + + private void btnSelectAllItemsCrafted_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstItemsCrafted.Items.Count; i++) + { + cblstItemsCrafted.SetItemChecked(i, true); + } + } + + private void btnDeselectAllItemsCrafted_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstItemsCrafted.Items.Count; i++) + { + cblstItemsCrafted.SetItemChecked(i, false); + } + } + + private void btnResetItemsCrafted_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstItemsCrafted.Items.Count; i++) + { + bool playerHasCraftedItem = playerObject.HasCraftedItem((SogItem)Enum.Parse(typeof(SogItem), cblstItemsCrafted.Items[i].ToString())); + cblstItemsCrafted.SetItemChecked(i, playerHasCraftedItem); + } + } + + private void btnSelectAllFishCaught_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstFishCaught.Items.Count; i++) + { + cblstFishCaught.SetItemChecked(i, true); + } + } + + private void btnDeselectAllFishCaught_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstFishCaught.Items.Count; i++) + { + cblstFishCaught.SetItemChecked(i, false); + } + } + + private void btnResetFishCaught_Click(object sender, EventArgs e) + { + for (int i = 0; i < cblstFishCaught.Items.Count; i++) + { + bool playerHasCaughtFish = playerObject.HasCaughtFish((SogItem)Enum.Parse(typeof(SogItem), cblstFishCaught.Items[i].ToString())); + cblstFishCaught.SetItemChecked(i, playerHasCaughtFish); + } + } } } \ No newline at end of file diff --git a/SoG_SGreader/GamePatchReader.cs b/SoG_SGreader/GamePatchReader.cs index 774ae9b..6db8d25 100644 --- a/SoG_SGreader/GamePatchReader.cs +++ b/SoG_SGreader/GamePatchReader.cs @@ -27,6 +27,8 @@ public static async Task GetCurrentGamePatchAsync(ITextBoxWrapper txtCon return "?.???a"; } + txtConsole.AppendText("\r\nGame patch-version wont be read."); + return "?.???a"; return await Task.Run(() => GetLatestGamePatch(exeFile, txtConsole)); // Run the heavy reflection code on a background thread } diff --git a/SoG_SGreader/Objects/Flag.cs b/SoG_SGreader/Objects/Flag.cs index 9fa3909..49af9c1 100644 --- a/SoG_SGreader/Objects/Flag.cs +++ b/SoG_SGreader/Objects/Flag.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class Flag { - public ushort FlagID { get; set; } + public SogFlag FlagID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/ItemsSeen.cs b/SoG_SGreader/Objects/ItemSeen.cs similarity index 75% rename from SoG_SGreader/Objects/ItemsSeen.cs rename to SoG_SGreader/Objects/ItemSeen.cs index baac034..a5cc1f3 100644 --- a/SoG_SGreader/Objects/ItemsSeen.cs +++ b/SoG_SGreader/Objects/ItemSeen.cs @@ -1,6 +1,6 @@ namespace SoG_SGreader { - public class ItemsSeen + public class ItemSeen { public SogItem ItemID { get; set; } } diff --git a/SoG_SGreader/Objects/KilledEnemy.cs b/SoG_SGreader/Objects/KilledEnemy.cs index 2e920cc..a77be5e 100644 --- a/SoG_SGreader/Objects/KilledEnemy.cs +++ b/SoG_SGreader/Objects/KilledEnemy.cs @@ -2,7 +2,7 @@ namespace SoG_SGreader { public class KilledEnemy { - public int EnemyID { get; set; } + public SogEnemy EnemyID { get; set; } public int KillCount { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/Player.cs b/SoG_SGreader/Objects/Player.cs index a3aa273..25a2b5a 100644 --- a/SoG_SGreader/Objects/Player.cs +++ b/SoG_SGreader/Objects/Player.cs @@ -53,11 +53,11 @@ public class Player public List Trophies; public ushort ItemsSeenCount { get; set; } - public List ItemsSeen; + public List ItemsSeen; public ushort ItemsCraftedCount { get; set; } public List ItemsCrafted; public ushort FishiesCaughtCount { get; set; } - public List FishiesCaught; + public List FishCaught; public ushort KilledEnemiesCount { get; set; } public List KilledEnemies; public byte PotionsMax { get; set; } @@ -92,18 +92,6 @@ internal bool HasCard(SogEnemy sogEnemies) return Cards.Any(card => card.CardID == sogEnemies); } - internal void AddCard(SogEnemy sogEnemies) - { - // add card to player, dont add duplicates - if (!HasCard(sogEnemies)) - { - Cards.Add(new Card - { - CardID = sogEnemies - }); - } - } - internal void RemoveCard(SogEnemy sogEnemies) { // remove card from player, if it exists @@ -113,38 +101,44 @@ internal void RemoveCard(SogEnemy sogEnemies) } } - //same as above, but for quests - internal bool HasQuest(SogQuest sogQuests) { return Quests.Any(quest => quest.QuestID == sogQuests); } - internal void AddQuest(SogQuest sogQuests) + internal bool HasSeenEnemy(SogEnemy sogEnemies) { - // add quest to player, dont add duplicates - if (!HasQuest(sogQuests)) - { - Quests.Add(new Quest - { - QuestID = sogQuests - }); - } + return EnemiesSeen.Any(enemy => enemy.EnemyID == sogEnemies); } - internal void RemoveQuest(SogQuest sogQuests) + internal bool HasFlag(SogFlag sogFlag) { - // remove quest from player, if it exists - if (HasQuest(sogQuests)) - { - Quests.RemoveAll(quest => quest.QuestID == sogQuests); - } + return Flags.Any(flag => flag.FlagID == sogFlag); } - //same as above, but for enemies - internal bool HasSeenEnemy(SogEnemy sogEnemies) + internal bool HasMap(SogTreasureMap sogMap) { - return EnemiesSeen.Any(enemy => enemy.EnemyID == sogEnemies); + return TreasureMaps.Any(map => map.TreasureMapID == sogMap); + } + + internal bool HasTrophy(SogTrophy sogTrophy) + { + return Trophies.Any(trophy => trophy.TrophyID == sogTrophy); + } + + internal bool HasSeenItem(SogItem sogItem) + { + return ItemsSeen.Any(item => item.ItemID == sogItem); + } + + internal bool HasCraftedItem(SogItem sogItem) + { + return ItemsCrafted.Any(item => item.ItemID == sogItem); + } + + internal bool HasCaughtFish(SogItem sogItem) + { + return FishCaught.Any(fish => fish.FishID == sogItem); } } } diff --git a/SoG_SGreader/Objects/TreasureMap.cs b/SoG_SGreader/Objects/TreasureMap.cs index 6fb2015..e6f8250 100644 --- a/SoG_SGreader/Objects/TreasureMap.cs +++ b/SoG_SGreader/Objects/TreasureMap.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class TreasureMap { - public short TreasureMapID { get; set; } + public SogTreasureMap TreasureMapID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/Trophy.cs b/SoG_SGreader/Objects/Trophy.cs index c3d6708..3ff3042 100644 --- a/SoG_SGreader/Objects/Trophy.cs +++ b/SoG_SGreader/Objects/Trophy.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class Trophy { - public ushort TrophyID { get; set; } + public SogTrophy TrophyID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/SoG_SGreader.csproj b/SoG_SGreader/SoG_SGreader.csproj index 0cea3ce..f2ebfce 100644 --- a/SoG_SGreader/SoG_SGreader.csproj +++ b/SoG_SGreader/SoG_SGreader.csproj @@ -129,10 +129,13 @@ - + + + + @@ -152,7 +155,7 @@ - + diff --git a/SoG_SGreader/VersionInc.cs b/SoG_SGreader/VersionInc.cs index 8b6d0be..5b99f78 100644 --- a/SoG_SGreader/VersionInc.cs +++ b/SoG_SGreader/VersionInc.cs @@ -1,7 +1,7 @@  using System.Reflection; -[assembly: AssemblyVersion("0.6.0")] -[assembly: AssemblyFileVersion("0.6.0.1437")] -[assembly: AssemblyInformationalVersionAttribute("0.6.0")] +[assembly: AssemblyVersion("0.7.0")] +[assembly: AssemblyFileVersion("0.7.0.1445")] +[assembly: AssemblyInformationalVersionAttribute("0.7.0")] diff --git a/SoG_SGreader/VersionInc.tt b/SoG_SGreader/VersionInc.tt index 1e9bef5..62aba72 100644 --- a/SoG_SGreader/VersionInc.tt +++ b/SoG_SGreader/VersionInc.tt @@ -9,7 +9,7 @@ using System.Reflection; <#+ public static int Major = 0; - public static int Minor = 6; + public static int Minor = 7; public static int Patch = 0; public static string Version = Major + "." + Minor + "." + Patch;