diff --git a/SoG_SGreader/DataReader.cs b/SoG_SGreader/DataReader.cs index f89ed8b..69ae2ee 100644 --- a/SoG_SGreader/DataReader.cs +++ b/SoG_SGreader/DataReader.cs @@ -51,10 +51,10 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) switch (quickSlotType) { case 1: - playerObject.Quickslots.Add((SogItem)readBinary.ReadInt32()); + playerObject.Quickslots.Add(readBinary.ReadInt32()); break; case 2: - playerObject.Quickslots.Add((SogSkill)readBinary.ReadUInt16()); + playerObject.Quickslots.Add(readBinary.ReadUInt16()); break; default: playerObject.Quickslots.Add(0); @@ -82,7 +82,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.Inventory.Add(new Item { - ItemID = (SogItem)readBinary.ReadInt32(), + ItemID = readBinary.ReadInt32(), ItemCount = readBinary.ReadInt32(), ItemPos = readBinary.ReadUInt32() }); @@ -292,7 +292,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.ItemsSeen.Add(new ItemSeen { - ItemID = (SogItem) readBinary.ReadInt32() + ItemID = readBinary.ReadInt32() }); } @@ -305,7 +305,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.ItemsCrafted.Add(new ItemCrafted { - ItemID = (SogItem) readBinary.ReadInt32() + ItemID = readBinary.ReadInt32() }); } @@ -318,7 +318,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.FishCaught.Add(new FishCaught { - FishID = (SogItem) readBinary.ReadInt32() + FishID = readBinary.ReadInt32() }); } @@ -349,7 +349,7 @@ public static Player ReadFromFile(string fileName, ITextBoxWrapper txtConsole) { playerObject.Potions.Add(new Potion { - PotionID = (SogItem)readBinary.ReadInt32() + PotionID = readBinary.ReadInt32() }); } diff --git a/SoG_SGreader/DataWriter.cs b/SoG_SGreader/DataWriter.cs index 8bce8a4..490f5b1 100644 --- a/SoG_SGreader/DataWriter.cs +++ b/SoG_SGreader/DataWriter.cs @@ -211,7 +211,7 @@ public void WriteToFile(string fileName) writeBinary.Write(playerObject.PlayTimeTotal); // check for overflow - writeBinary.Write((byte )playerObject.PhaseShiftStuff); + writeBinary.Write((byte)playerObject.PhaseShiftStuff); writeBinary.Write((ushort) playerObject.CharacterFlags.Count); for (int i = 0; i != playerObject.CharacterFlags.Count; i++) diff --git a/SoG_SGreader/Enum/DynamicEnum.cs b/SoG_SGreader/Enum/DynamicEnum.cs new file mode 100644 index 0000000..3752751 --- /dev/null +++ b/SoG_SGreader/Enum/DynamicEnum.cs @@ -0,0 +1,63 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SoG_SGreader.Enum +{ + public class DynamicEnum + { + private readonly string filePath; + private Dictionary nameToValue = new Dictionary(); + private Dictionary valueToName = new Dictionary(); + + public DynamicEnum(string filePath, string key) + { + var jsonData = File.ReadAllText(filePath); + var items = JsonConvert.DeserializeObject>>(jsonData); + if (items != null && items.ContainsKey(key)) + { + foreach (var item in items[key]) + { + nameToValue[RemoveLeadingUnderscore(item.Key)] = item.Value; + valueToName[item.Value] = RemoveLeadingUnderscore(item.Key); + } + } + else + { + throw new KeyNotFoundException($"The key '{key}' is not found in the JSON data."); + } + } + + public int GetValue(string name) + { + if (nameToValue.ContainsKey(name)) + { + return nameToValue[name]; + } + throw new KeyNotFoundException($"The name '{name}' is not found in the {filePath} enum."); + } + + public string GetName(int value) + { + if (valueToName.ContainsKey(value)) + { + return valueToName[value]; + } + throw new KeyNotFoundException($"The value '{value}' is not found in the {filePath} enum."); + } + + public IEnumerable GetNames() + { + return nameToValue.Keys; + } + + private static string RemoveLeadingUnderscore(string input) + { + return input.StartsWith("_") ? input.Substring(1) : input; + } + } +} diff --git a/SoG_SGreader/Enum/GameEnums.cs b/SoG_SGreader/Enum/GameEnums.cs new file mode 100644 index 0000000..80d1bad --- /dev/null +++ b/SoG_SGreader/Enum/GameEnums.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SoG_SGreader.Enum +{ + public static class GameEnums + { + public static DynamicEnum SogItem; + + public static void InitializeEnums() + { + SogItem = new DynamicEnum("ItemTypes.json", "ItemTypes"); + } + } +} diff --git a/SoG_SGreader/Enum/SogFish.cs b/SoG_SGreader/Enum/SogFish.cs deleted file mode 100644 index 4069a98..0000000 --- a/SoG_SGreader/Enum/SogFish.cs +++ /dev/null @@ -1,53 +0,0 @@ -// Generated by JackTheEnumRipper -// Source: Secrets of Grindea: SoG\ItemCodex\ItemTypes -// This enum is part of the SoG\ItemCodex\ItemTypes -// Game Version: 1.00 -public enum SogFish : int -{ - Misc_Fish_Fishie = 11000, - Misc_Fish_FishieGreen = 11001, - Misc_Fish_Clam = 11002, - Misc_Fish_Crabby = 11003, - Misc_Fish_DeadFish = 11004, - Misc_Fish_Eel = 11005, - Misc_Fish_EelDisplay = 11006, - Misc_Fish_Fatty = 11007, - Misc_Fish_FattyDisplay = 11008, - Misc_Fish_Mes = 11009, - Misc_Fish_Moray = 11010, - Misc_Fish_MorayDisplay = 11011, - Misc_Fish_Octopus = 11012, - Misc_Fish_OctopusDisplay = 11013, - Misc_Fish_Salmon = 11014, - Misc_Fish_SeaHorse = 11015, - Misc_Fish_Shrimp = 11016, - Misc_Fish_Squid = 11017, - Misc_Fish_Starfish = 11018, - Misc_Fish_Stingray = 11019, - Misc_Fish_StingrayDisplay = 11020, - Misc_Fish_Ghostfish = 11021, - Misc_Fish_Zombiefish = 11022, - Misc_Fish_Vampirefish = 11023, - Misc_Fish_FrankenFish = 11024, - Misc_Fish_FrankenFishDisplay = 11025, - Misc_Fish_RedFatty_Token = 11026, - Misc_Fish_RedFatty = 11027, - Misc_Fish_RedFattyDisplay = 11028, - Misc_Fish_Fishstick = 11029, - Misc_Fish_Icefish = 11030, - Misc_Fish_Penguish = 11031, - Misc_Fish_PenguishDisplay = 11032, - Misc_Fish_SnowFish = 11033, - Misc_Fish_Yetish = 11034, - Misc_Fish_YetishDisplay = 11035, - Misc_Fish_Rockfish = 11036, - Misc_Fish_Anglerfish = 11037, - Misc_Fish_AnglerfishDisplay = 11038, - Misc_Fish_Crystalfish = 11039, - Misc_Fish_Goldfish = 11040, - Misc_Fish_Mossfish = 11041, - Misc_Fish_Bottle = 11042, - Misc_Fish_SandShark = 11043, - Misc_Fish_Cactish = 11044, - Misc_Fish_LASTFISH = 11045, -} \ No newline at end of file diff --git a/SoG_SGreader/Enum/SogItem.cs b/SoG_SGreader/Enum/SogItem.cs deleted file mode 100644 index 13bcb3a..0000000 --- a/SoG_SGreader/Enum/SogItem.cs +++ /dev/null @@ -1,1173 +0,0 @@ -// Generated by JackTheEnumRipper -// Source: Secrets of Grindea: SoG\ItemCodex\ItemTypes -// Game Version: 1.03a -public enum SogItem: int -{ - Null = -1, - Apple = 0, - Carrot = 1, - VegetableJuice = 2, - Consumable_Berries = 3, - Consumable_HealthPotion = 4, - Misc_SpeedPetFood = 5, - Misc_ManaPetFood = 6, - Misc_DefensePetFood = 7, - Misc_DamagePetFood = 8, - Usable_ButterflySummoner = 9, - Usable_SpringCharm = 10, - Usable_SnowflakeCharm = 11, - Usable_FaeCharm = 12, - Usable_GhostCharm = 13, - Usable_CardAlbum = 14, - Usable_PhaseReSequencer = 15, - Usable_PotionSingle = 16, - Usable_PotionDuo = 17, - Usable_PotionTrio = 18, - Usable_PotionSingleDISPLAY = 19, - Usable_SpiderCharm = 20, - Usable_ButterflyPheromones = 21, - Usable_RainMaker = 22, - Usable_LoodTrinket = 23, - Usable_LaserWings_Good = 24, - Usable_LaserWings_Evil = 25, - Usable_CardSummoner = 26, - Usable_GoddessRays = 27, - Usable_PotionSoloSlotOne = 28, - Usable_PotionSoloSlotTwo = 29, - Usable_PotionSoloSlotThree = 30, - PotionType_Health = 250, - PotionType_Crit = 251, - PotionType_Damage = 252, - PotionType_Spirit = 253, - PotionType_Arrow = 254, - PotionType_Speed = 255, - PotionType_Chicken = 256, - PotionType_LOCKED = 257, - PotionType_Wealth = 258, - PotionType_Loot = 259, - PotionType_EMPTY = 260, - PotionType_UNKNOWN = 261, - PotionType_HealthDISABLED = 262, - PotionType_Lightning = 263, - PotionType_HealthZHAMLA = 264, - Consumable_FirstItem = 300, - Consumable_SuperPotion_Attack = 301, - Consumable_SuperPotion_Speed = 302, - Consumable_SuperPotion_Energy = 303, - Consumable_SuperPotion_Lightning = 304, - Consumable_SuperPotion_Placeholder1 = 305, - Consumable_SuperPotion_Placeholder2 = 306, - Consumable_SuperPotion_Placeholder3 = 307, - Consumable_SuperPotion_Placeholder4 = 308, - Consumable_SuperPotion_Last = 309, - Furniture_Carpet_MasterHQBlue = 1000, - Furniture_Carpet_MasterHQRed = 1001, - Furniture_Carpet_MasterHQGreen = 1002, - Furniture_Carpet_FlyingFortressHoleWithGlass = 1003, - Furniture_Carpet_HalloweenModular = 1004, - Furniture_Carpet_HalloweenBig = 1005, - Furniture_Carpet_Seasonne = 1006, - Furniture_Carpet_MtBloom = 1007, - Furniture_Carpet_TaiMing = 1008, - Furniture_Carpet_RedGigaSlimeCarpet = 1009, - Furniture_Carpet_DesertunoRed = 1010, - Furniture_Carpet_DesertunoGreen = 1011, - Furniture_Carpet_DesertunoOrange = 1012, - Furniture_Carpet_DesertunoPurple = 1013, - Furniture_Carpet_DesertidosRed = 1014, - Furniture_Carpet_DesertidosGreen = 1015, - Furniture_Carpet_DesertidosOrange = 1016, - Furniture_Carpet_DesertidosPurple = 1017, - Furniture_Table_BasicLongBlack = 1500, - Furniture_Table_BasicLongWhite = 1501, - Furniture_Table_BasicLongWood = 1502, - Furniture_Table_BasicShortWood = 1503, - Furniture_Table_BasicShortBlack = 1504, - Furniture_Table_BasicRoundDark_OBSOLETE = 1505, - Furniture_Table_BasicRoundWhite_OBSOLETE = 1506, - Furniture_Table_BasicRoundWood_OBSOLETE = 1507, - Furniture_Table_BasicBigWood = 1508, - Furniture_Table_BedsideHalloween = 1509, - Furniture_Table_BedsideFlyingFortress = 1510, - Furniture_Table_BedsideTempleOfSeasons = 1511, - Furniture_Table_BedsideWhite = 1512, - Furniture_Table_BedsideSeasonne = 1513, - Furniture_Table_LongTempleOfSeasons = 1514, - Furniture_Table_BigTempleOfSeasons = 1515, - Furniture_Table_BigFlyingFortress = 1516, - Furniture_Table_BigWhite_OBSOLETE = 1517, - Furniture_Table_LongWhite_OBSOLETE = 1518, - Furniture_Table_RoundWhite_OBSOLETE = 1519, - Furniture_Table_LongFlyingFortress = 1520, - Furniture_Table_BigSeasonne = 1521, - Furniture_Table_LongSeasonne = 1522, - Furniture_Table_LongHalloween = 1523, - Furniture_Table_BigHalloween = 1524, - Furniture_Table_BedsideTaiMing = 1525, - Furniture_Table_BedsideMtBloom = 1526, - Furniture_Table_LongTaiMing = 1527, - Furniture_Table_LongMtBloom = 1528, - Furniture_Table_BigTaiMing = 1529, - Furniture_Table_BigMtBloom = 1530, - Furniture_Table_BasicBigBlack = 1531, - Furniture_Table_BasicBigWhite = 1532, - Furniture_Table_BedsideDesert = 1533, - Furniture_Table_BigDesert = 1534, - Furniture_Table_LongDesert = 1535, - Furniture_Table_LongShip = 1536, - Furniture_Table_BedsideShip = 1537, - Furniture_Table_BigShip = 1538, - Furniture_Table_Funstack_Gold_OBSOLETE = 1970, - Furniture_Table_Funstack_Silver_OBSOLETE = 1971, - Furniture_Chair_BasicDark = 2000, - Furniture_Chair_BasicWhite = 2001, - Furniture_Chair_BasicWood = 2002, - Furniture_Chair_BenchDark = 2003, - Furniture_Chair_BenchWhite = 2004, - Furniture_Chair_BenchWood = 2005, - Furniture_Chair_CouchRed = 2006, - Furniture_Chair_CouchGreen = 2007, - Furniture_Chair_CouchBlue = 2008, - Furniture_Chair_CouchDark = 2009, - Furniture_Chair_CouchWhite = 2010, - Furniture_Chair_StoolDark = 2011, - Furniture_Chair_StoolWhite = 2012, - Furniture_Chair_StoolWood = 2013, - Furniture_Chair_BasicHalloween = 2014, - Furniture_Chair_BenchHalloween = 2015, - Furniture_Chair_StoolSeasonne = 2016, - Furniture_Chair_BenchSeasonne = 2017, - Furniture_Chair_StoolFlyingFortress = 2018, - Furniture_Chair_BenchFlyingFortress = 2019, - Furniture_Chair_StoolTempleOfSeasons = 2020, - Furniture_Chair_BenchTempleOfSeasons = 2021, - Furniture_Chair_StoolMtBloom = 2022, - Furniture_Chair_BenchMtBloom = 2023, - Furniture_Chair_StoolTaiMing = 2024, - Furniture_Chair_BenchTaiMing = 2025, - Furniture_Chair_SlimeBeanBag = 2026, - Furniture_Chair_StoolDesert = 2027, - Furniture_Chair_BenchDesert = 2028, - Furniture_Chair_ChairShip = 2029, - Furniture_Chair_BenchShip = 2030, - Furniture_Decoration_Bonsai = 3000, - Furniture_Decoration_CandleStick = 3001, - Furniture_Decoration_Papers = 3002, - Furniture_Decoration_BookGreen = 3003, - Furniture_Decoration_BookRed = 3004, - Furniture_Decoration_BookPile_OBSOLETE = 3005, - Furniture_Decoration_SakuraBonsai = 3006, - Furniture_Decoration_ClothSmallSeasonne_OBSOLETE = 3007, - Furniture_Decoration_PresentPile = 3008, - Furniture_Decoration_CavePick = 3009, - Furniture_Decoration_CaveFigurine = 3010, - Furniture_Decoration_TaiMingBottle = 3011, - Furniture_Decoration_SwordStand = 3012, - Furniture_Decoration_Knife = 3013, - Furniture_Decoration_ClothSmallTaiMing_OBSOLETE = 3014, - Furniture_Decoration_JarTaiMing = 3015, - Furniture_Decoration_CardInGlass = 3016, - Furniture_Decoration_FlyingFortressFloorDetails = 3017, - Furniture_Decoration_PhasePlate = 3018, - Furniture_Decoration_CatFoodBowl = 3019, - Furniture_Decoration_FakeCardAlbum = 3020, - Furniture_Decoration_SkullAndBones = 3021, - Furniture_Decoration_SmallBone = 3022, - Furniture_Decoration_BigBone = 3023, - Furniture_Decoration_HauntedBucket = 3024, - Furniture_Decoration_Spider = 3025, - Furniture_Decoration_Lizard = 3026, - Furniture_Decoration_FondMemories = 3027, - Furniture_Decoration_LampCrystal = 3500, - Furniture_Decoration_LampLantern = 3501, - Furniture_Decoration_LampLava = 3502, - Furniture_Decoration_LampCandles = 3503, - Furniture_Decoration_LampFlyingFortressCrystal = 3504, - Furniture_Decoration_PlantGreen = 3600, - Furniture_Decoration_PlantPurple = 3601, - Furniture_Decoration_PlantPurpleSmall = 3602, - Furniture_Decoration_PlantSeasonneFlowers = 3603, - Furniture_Decoration_WeaponDisplayStanding1H = 3604, - Furniture_Decoration_WeaponDisplayStanding2H = 3605, - Furniture_Decoration_DesertCarrots = 3606, - Furniture_Decoration_DesertBag = 3607, - Furniture_Decoration_DesertLamp = 3608, - Furniture_Decoration_DesertGrindeaFigurine = 3609, - Furniture_Decoration_DesertModelship = 3610, - Furniture_Decoration_DecorativeSkull = 3611, - Furniture_Decoration_Balloon_ClassicSingle = 3612, - Furniture_Decoration_Balloon_ClassicCluster = 3613, - Furniture_Decoration_Balloon_Slime = 3614, - Furniture_Decoration_Balloon_Rabby = 3615, - Furniture_Decoration_Balloon_Promotional = 3616, - Furniture_Decoration_AmbienceBox = 3617, - Furniture_Decoration_CompletedPlant_OneHandWeaponPlant_Empty = 3618, - Furniture_Decoration_RecordPlayer = 3619, - Furniture_Decoration_ArcadeChallengeTrophyF01 = 3620, - Furniture_Decoration_ArcadeChallengeTrophyF02 = 3621, - Furniture_Decoration_ArcadeChallengeTrophyF03 = 3622, - Furniture_Decoration_ArcadeChallengeTrophyF04 = 3623, - Furniture_Decoration_ArcadeChallengeTrophyF05 = 3624, - Furniture_Decoration_ArcadeChallengeTrophyF06 = 3625, - Furniture_Decoration_ArcadeChallengeTrophyF07 = 3626, - Furniture_Decoration_ArcadeChallengeTrophyF08 = 3627, - Furniture_Decoration_ArcadeChallengeTrophyF09 = 3628, - Furniture_Decoration_ArcadeChallengeTrophyF10 = 3629, - Furniture_Decoration_HatDisplay = 3630, - Furniture_Decorations_SmallAquarium = 3631, - Furniture_WallDecor_Painting_Flowers = 4000, - Furniture_WallDecor_Painting_FlyingFortress = 4001, - Furniture_WallDecor_Painting_Sky = 4002, - Furniture_WallDecor_Painting_TempleOfSeasons = 4003, - Furniture_WallDecor_Painting_LostShip = 4004, - Furniture_WallDecor_Window_ShortBlue = 4200, - Furniture_WallDecor_Window_ShortGreen = 4201, - Furniture_WallDecor_Window_ShortRed = 4202, - Furniture_WallDecor_Window_TempleOfSeasons = 4203, - Furniture_WallDecor_Window_Halloween = 4204, - Furniture_WallDecor_Window_FlyingFortress = 4205, - Furniture_WallDecor_Window_Seasonne = 4206, - Furniture_WallDecor_Window_MtBloom = 4207, - Furniture_WallDecor_Window_TaiMing = 4208, - Furniture_WallDecor_Window_Desert = 4209, - Furniture_WallDecor_Banner_Blue = 4260, - Furniture_WallDecor_Banner_BlueThin = 4261, - Furniture_WallDecor_Banner_Green = 4262, - Furniture_WallDecor_Banner_GreenThin = 4263, - Furniture_WallDecor_Banner_Red = 4264, - Furniture_WallDecor_Banner_RedThin = 4265, - Furniture_WallDecor_Banner_Collector = 4266, - Furniture_WallDecor_Banner_DesertStyle = 4267, - Furniture_WallDecor_Decor_Clock = 4300, - Furniture_WallDecor_Decor_RedFish = 4301, - Furniture_WallDecor_Decor_LampCandle = 4302, - Furniture_WallDecor_Decor_LampOil = 4303, - Furniture_WallDecor_Decor_LampTorch = 4304, - Furniture_WallDecor_Decor_CollectorEmblem = 4305, - Furniture_WallDecor_Decor_CollectorEmblem_Dark = 4306, - Furniture_WallDecor_Decor_SeasonEmblem = 4307, - Furniture_WallDecor_Decor_FlyingFortressLamps = 4308, - Furniture_WallDecor_Decor_FlyingFortressGiantScreen = 4309, - Furniture_WallDecor_Decor_FlyingFortressSmallScreen = 4310, - Furniture_WallDecor_Decor_FlyingFortressMediumScreen = 4311, - Furniture_WallDecor_Decor_SeasonneSock = 4312, - Furniture_WallDecor_Decor_TempleOfSeasonsVines = 4313, - Furniture_WallDecor_Decor_SeasonneGarland = 4314, - Furniture_WallDecor_Decor_CaveCrystalSmall = 4315, - Furniture_WallDecor_Decor_CaveCrystalBig = 4316, - Furniture_WallDecor_Decor_CaveVines = 4317, - Furniture_WallDecor_Decor_Mirror = 4318, - Furniture_WallDecor_Decor_TaiMing_Spears = 4319, - Furniture_WallDecor_Decor_TaiMing_SkyPainting = 4320, - Furniture_WallDecor_Decor_TaiMing_FlowerPaintingSmall = 4321, - Furniture_WallDecor_Decor_TaiMing_MoonPainting = 4322, - Furniture_WallDecor_Decor_TaiMing_WallDecor = 4323, - Furniture_WallDecor_Decor_TaiMing_Lantern = 4324, - Furniture_WallDecor_Decor_TaiMing_SwordBig = 4325, - Furniture_WallDecor_Decor_TaiMing_SwordMedium = 4326, - Furniture_WallDecor_Decor_TaiMing_FlowerPaintingSquare = 4327, - Furniture_WallDecor_Decor_TaiMing_FlowerPaintingMedium = 4328, - Furniture_WallDecor_Decor_TaiMing_MountainPainting = 4329, - Furniture_WallDecor_Decor_TaiMing_Wallflower = 4330, - Furniture_WallDecor_Decor_WeaponDisplayHanging = 4331, - Furniture_WallDecor_Decor_ToyTrain = 4332, - Furniture_WallDecor_Decor_PhotoPainting_SmashingGiga = 4333, - Furniture_WallDecor_Decor_PhotoPainting_BoarKillWhiteRabby = 4334, - Furniture_WallDecor_Decor_PhotoPainting_PumpkinMixer = 4335, - Furniture_WallDecor_Decor_DesertPoster = 4336, - Furniture_WallDecor_Decor_PuzzleCounter = 4337, - Furniture_WallDecor_Decor_DeadFish = 4338, - Furniture_WallDecor_Decor_HauntedBag = 4339, - Furniture_WallDecor_Decor_WallSpider = 4340, - Furniture_WallDecor_Decor_HauntedVines = 4341, - Furniture_WallDecor_Decor_SmallShipShelf = 4342, - Furniture_WallDecor_Decor_BigShipShelf = 4343, - Furniture_WallDecor_Decor_ShipWindow = 4344, - Furniture_WallDecor_Decor_HauntedPainting = 4345, - Furniture_BigStuff_BeerBarrel = 5000, - Furniture_BigStuff_BookCaseDark = 5001, - Furniture_BigStuff_BookCaseWhite = 5002, - Furniture_BigStuff_BookCaseWood = 5003, - Furniture_BigStuff_CandleStick = 5004, - Furniture_BigStuff_Fireplace = 5005, - Furniture_BigStuff_PlantBig = 5006, - Furniture_BigStuff_PlantSmall = 5007, - Furniture_BigStuff_ShelfDark_OBSOLETE = 5008, - Furniture_BigStuff_ShelfWhite_OBSOLETE = 5009, - Furniture_BigStuff_ShelfWood_OBSOLETE = 5010, - Furniture_BigStuff_WaterThingyTempleOfSeasons = 5011, - Furniture_BigStuff_BushTempleOfSeasons = 5012, - Furniture_BigStuff_TripleBushTempleOfSeasons = 5013, - Furniture_BigStuff_FaeStatue = 5014, - Furniture_BigStuff_Pumpkin = 5015, - Furniture_BigStuff_FlyingBroom = 5016, - Furniture_BigStuff_Cauldron = 5017, - Furniture_BigStuff_BigCrystalFlyingFortress = 5018, - Furniture_BigStuff_CrystalPillarFlyingFortress = 5019, - Furniture_BigStuff_ChristmasTree = 5020, - Furniture_BigStuff_SeasonOrb = 5021, - Furniture_BigStuff_FlyingFortressWisp = 5022, - Furniture_BigStuff_HugeMushroomBlue = 5023, - Furniture_BigStuff_HugeMushroomPurple = 5024, - Furniture_BigStuff_MediumMushroomBlue = 5025, - Furniture_BigStuff_MediumMushroomPurple = 5026, - Furniture_BigStuff_SmallMushroomBlue_OBSOLETE = 5027, - Furniture_BigStuff_SmallMushroomPurple_OBSOLETE = 5028, - Furniture_BigStuff_CavePlantSmall = 5029, - Furniture_BigStuff_CavePlantBig = 5030, - Furniture_BigStuff_CavePlantThin = 5031, - Furniture_BigStuff_FluffyFeathers = 5032, - Furniture_BigStuff_CaveSpear = 5033, - Furniture_BigStuff_CaveBag = 5034, - Furniture_BigStuff_CaveHugeCrystal = 5035, - Furniture_BigStuff_CaveRock = 5036, - Furniture_BigStuff_CaveStatue = 5037, - Furniture_BigStuff_TaiMingBoxes = 5038, - Furniture_BigStuff_TaiMingBoxThin = 5039, - Furniture_BigStuff_TaiMingBookCase = 5040, - Furniture_BigStuff_TaiMingBottleShelf = 5041, - Furniture_BigStuff_TaiMingFlowerBox = 5042, - Furniture_BigStuff_TaiMingFlowerCrate = 5043, - Furniture_BigStuff_TaiMingWeaponStand = 5044, - Furniture_BigStuff_FlyingFortressHole = 5045, - Furniture_BigStuff_UnGrownPlant_Bloomo = 5200, - Furniture_BigStuff_UnGrownPlant_Halloweed = 5201, - Furniture_BigStuff_UnGrownPlant_Moss = 5202, - Furniture_BigStuff_UnGrownPlant_PoisonFlower = 5203, - Furniture_BigStuff_UnGrownPlant_PowerFlower = 5204, - Furniture_BigStuff_UnGrownPlant_MotherPlant = 5205, - Furniture_SmallStuff_UnGrownPlant_Cactus = 5206, - Furniture_SmallStuff_UnGrownPlant_SuperSalad = 5207, - Furniture_SmallStuff_UnGrownPlant_Tomato = 5208, - Furniture_SmallStuff_UnGrownPlant_Lettuce = 5209, - Furniture_SmallStuff_UnGrownPlant_Carrot = 5210, - Furniture_SmallStuff_UnGrownPlant_Onion = 5211, - Furniture_SmallStuff_UnGrownPlant_Jumpkin = 5212, - Furniture_SmallStuff_UnGrownPlant_OneHandWeaponPlant = 5213, - Furniture_BigStuff_CompletedPlant_Bloomo = 5230, - Furniture_BigStuff_CompletedPlant_Halloweed = 5231, - Furniture_BigStuff_CompletedPlant_Moss = 5232, - Furniture_BigStuff_CompletedPlant_PoisonFlower = 5233, - Furniture_BigStuff_CompletedPlant_PowerFlower = 5234, - Furniture_BigStuff_CompletedPlant_MotherPlant = 5235, - Furniture_SmallStuff_CompletedPlant_Cactus = 5236, - Furniture_SmallStuff_CompletedPlant_SuperSalad = 5237, - Furniture_SmallStuff_CompletedPlant_Tomato = 5238, - Furniture_SmallStuff_CompletedPlant_Lettuce = 5239, - Furniture_SmallStuff_CompletedPlant_Carrot = 5240, - Furniture_SmallStuff_CompletedPlant_Onion = 5241, - Furniture_SmallStuff_CompletedPlant_Jumpkin = 5242, - Furniture_SmallStuff_CompletedPlant_OneHandWeaponPlant = 5243, - Furniture_BigStuff_Tree_MossyElm = 5260, - Furniture_BigStuff_Tree_AutumnOak = 5261, - Furniture_BigStuff_Tree_SummerOak = 5262, - Furniture_BigStuff_Tree_ScaryOak = 5263, - Furniture_BigStuff_Tree_CherryTree = 5264, - Furniture_BigStuff_Tree_SeasonTree = 5265, - Furniture_BigStuff_Tree_BigBirch = 5266, - Furniture_BigStuff_Tree_DryTree = 5267, - Furniture_BigStuff_BedWhite = 5300, - Furniture_BigStuff_BedBlack = 5301, - Furniture_BigStuff_BedWood = 5302, - Furniture_BigStuff_BedHalloween = 5303, - Furniture_BigStuff_BedSeasonne = 5304, - Furniture_BigStuff_BedFlyingFortress = 5305, - Furniture_BigStuff_BedTaiMing = 5306, - Furniture_BigStuff_BedCave = 5307, - Furniture_BigStuff_BedTempleOfSeasons = 5308, - Furniture_BigStuff_AncientStatue = 5309, - Furniture_BigStuff_Palm = 5310, - Furniture_BigStuff_ExquisitePlant = 5311, - Furniture_BigStuff_DeadPlant = 5312, - Furniture_BigStuff_CrateOfDirt = 5313, - Furniture_BigStuff_WateringCan = 5314, - Furniture_BigStuff_DesertBed = 5315, - Furniture_BigStuff_DesertBookcase = 5316, - Furniture_BigStuff_LargeGrayJar = 5317, - Furniture_BigStuff_LargeBlueJar = 5318, - Furniture_BigStuff_LargeBeigeJar = 5319, - Furniture_BigStuff_LargeBrownJar = 5320, - Furniture_BigStuff_LargeGreenJar = 5321, - Furniture_BigStuff_Cutout_Chicken = 5322, - Furniture_BigStuff_Cutout_WeddingPair = 5323, - Furniture_BigStuff_Cutout_Snowbacca = 5324, - Furniture_BigStuff_GhostBed = 5325, - Furniture_BigStuff_Cannon = 5326, - Furniture_BigStuff_CannonBallPile = 5327, - Furniture_BigStuff_HauntedBookcase = 5328, - Furniture_BigStuff_HauntedGhostBag = 5329, - Furniture_BigStuff_GrindeaStatue_Big = 5330, - Furniture_BigStuff_GrindeaStatue_Small = 5331, - Furniture_BigStuff_Anvil = 5332, - Furniture_BigStuff_MediumAquarium = 5333, - Furniture_BigStuff_BigAquarium = 5334, - Furniture_BigStuff_HugeAquarium = 5335, - Furniture_WallType00 = 7000, - Furniture_WallType01 = 7001, - Furniture_WallType02 = 7002, - Furniture_WallType03_Halloween = 7003, - Furniture_WallType04_FlyingFortress = 7004, - Furniture_WallType05_Seasonne = 7005, - Furniture_WallType06_TempleOfSeasons_Autumn = 7006, - Furniture_WallType07_MtBloom = 7007, - Furniture_WallType08_TaiMing = 7008, - Furniture_WallType09_TempleOfSeasons_Summer = 7009, - Furniture_WallType10_TempleOfSeasons_Winter = 7010, - Furniture_WallType11_GreenFlowers = 7011, - Furniture_WallType12_Desert = 7012, - Furniture_WallType13_LostShip = 7013, - Furniture_FloorType00 = 7200, - Furniture_FloorType01 = 7201, - Furniture_FloorType02 = 7202, - Furniture_FloorType03_Halloween = 7203, - Furniture_FloorType04_FlyingFortress = 7204, - Furniture_FloorType05_Seasonne = 7205, - Furniture_FloorType06_TempleOfSeasons_Autumn = 7206, - Furniture_FloorType07_MtBloom = 7207, - Furniture_FloorType08_TaiMing = 7208, - Furniture_FloorType09_TempleOfSeasons_Summer = 7209, - Furniture_FloorType10_TempleOfSeasons_Winter = 7210, - Furniture_FloorType11_Desert = 7211, - Furniture_FloorType12_LostShip = 7212, - StickyMucus = 10000, - Misc_Branch = 10001, - Misc_Trunk = 10002, - Misc_Steel = 10003, - Misc_MickySucus = 10004, - Misc_Honey = 10005, - Misc_Fur = 10006, - Misc_Stinger = 10007, - Misc_Stick = 10008, - Misc_Button = 10009, - Misc_Ectoplasm = 10010, - Misc_Fabric = 10011, - Misc_Hay = 10012, - Misc_Lantern = 10013, - Misc_PetalBlue = 10014, - Misc_PetalPurple = 10015, - Misc_Pollen = 10016, - Misc_PumpkinMeat = 10017, - Misc_PumpkinSeeds = 10018, - Misc_Root = 10019, - Misc_Sheet = 10020, - Misc_BagLol = 10021, - Misc_Tusk = 10022, - Misc_ToughSkin = 10023, - Misc_CrystalCrumbs = 10024, - Misc_PowerCore = 10025, - Misc_MetalPiece = 10026, - Misc_Turkey = 10027, - Misc_PeckoDoll = 10028, - Misc_PeckoFeather = 10029, - Misc_GuardianCrystal = 10030, - Misc_ChickenPlushie = 10031, - Misc_BasicJarShard = 10032, - Misc_CyberJarShard = 10033, - Misc_EmitterMatrix = 10034, - Misc_SlimeCube = 10035, - Misc_GiftBox_Consumable = 10036, - Misc_Icicle = 10037, - Misc_Orange = 10038, - Misc_Pinecone = 10039, - Misc_CandyCane = 10040, - Misc_IcyGoo = 10041, - Misc_YetiDoll = 10042, - Misc_YetiFur = 10043, - Misc_Season_ArmorScrap = 10044, - Misc_Season_BrokenGreave = 10045, - Misc_Season_ShieldPiece = 10046, - Misc_Season_EmblemAutumn = 10047, - Misc_Season_EmblemSummer = 10048, - Misc_Season_EmblemWinter = 10049, - Misc_Season_MagicalSeasoning = 10050, - Misc_Season_SeasonShard = 10051, - Misc_MtBloom_LargeCrystal = 10052, - Misc_MtBloom_LarvaBall = 10053, - Misc_MtBloom_LarvaAcid = 10054, - Misc_MtBloom_CaveMoss = 10055, - Misc_MtBloom_SmallMushroom = 10056, - Misc_MtBloom_Silk = 10057, - Misc_MtBloom_SpinsectLeg = 10058, - Misc_MtBloom_SpinsectCarapacePart = 10059, - Misc_MtBloom_MushroomSpores = 10060, - Misc_RedEmitterMatrix = 10061, - Misc_PhaseResequencer_Part1 = 10062, - Misc_PhaseResequencer_Part2 = 10063, - Misc_PhaseResequencer_Part3 = 10064, - Misc_TaiMing_AncientRocks = 10065, - Misc_Bamboo = 10066, - Misc_UNUSED = 10067, - Misc_TaiMing_Dandelion = 10068, - Misc_TaiMing_Dirt = 10069, - Misc_TaiMing_FabricOfTime = 10070, - Misc_TaiMing_MossFlower = 10071, - Misc_TaiMing_Lettuce = 10072, - Misc_TaiMing_MagicalCore = 10073, - Misc_TaiMing_MonkeyFur = 10074, - Misc_TaiMing_WormTeeth = 10075, - Misc_TaiMing_WormThorn = 10076, - Misc_TaiMing_PorcelainShard = 10077, - Misc_TaiMing_WornSoldierDoll = 10078, - Misc_TaiMing_SwordPiece = 10079, - Misc_TaiMing_MikiPlushie = 10080, - Misc_TaiMing_Banana = 10081, - Misc_CritPetFood = 10082, - Misc_MtBloom_MagmaSpore = 10083, - Misc_Desert_Beak = 10084, - Misc_Desert_CactusFlesh = 10085, - Misc_Desert_CactusFlower = 10086, - Misc_Desert_CactusNeedle = 10087, - Misc_Desert_Orange = 10088, - Misc_Desert_OrangeGoo = 10089, - Misc_Desert_Quill = 10090, - Misc_Desert_FineSand = 10091, - Misc_Desert_CoarseSand = 10092, - Misc_Desert_Onion = 10093, - Misc_Desert_Tomato = 10094, - Misc_Desert_RecipePage = 10095, - Misc_GhostShip_Bone = 10096, - Misc_GhostShip_WarriorCloth = 10097, - Misc_GhostShip_WizardCloth = 10098, - Misc_GhostShip_HauntiePurpleEctoplasm = 10099, - Misc_GhostShip_HauntieFabric = 10100, - Misc_GhostShip_HauntieTwilightCore = 10101, - Misc_GhostShip_CrabbyShellPiece = 10102, - Misc_RedSlimeCube = 10103, - Misc_RedGoo = 10104, - Misc_HeartOfSeasons = 10105, - Misc_PowerFlowerSeed = 10106, - Misc_BloomoSeed = 10107, - Misc_HalloweedSeed = 10108, - Misc_MossSeed = 10109, - Misc_PoisonFlowerSeed = 10110, - Misc_MotherPlantSeed = 10111, - Misc_CactusSeed = 10112, - Misc_SuperSaladSeed = 10113, - Misc_TomatoSeed = 10114, - Misc_LettuceSeed = 10115, - Misc_CarrotSeed = 10116, - Misc_OnionSeed = 10117, - Misc_JumpkinSeed = 10118, - Misc_OneHandedWeaponSeed = 10119, - Misc_Diamond = 10120, - UNKNOWN = 10498, - INVISIBLE = 10499, - Furniture_FlyingFortressPainting_OBSOLETE = 10500, - Furniture_LampCrystal_OBSOLETE = 10501, - Furniture_LampLantern_OBSOLETE = 10502, - Furniture_LampGreenSlime_OBSOLETE = 10503, - Furniture_GigaSlimeBeanbag_OBSOLETE = 10504, - Furniture_Fireplace_OBSOLETE = 10505, - Furniture_Clock01_OBSOLETE = 10506, - Furniture_Plant01_OBSOLETE = 10507, - Furniture_SlimeCarpet_OBSOLETE = 10508, - Furniture_BeerBarrel_OBSOLETE = 10509, - Furniture_FishDisplay_OBSOLETE = 10510, - Furniture_ChristmasTree_OBSOLETE = 10511, - Furniture_SeasonTemplePainting_OBSOLETE = 10512, - Furniture_CatScreen = 10513, - Furniture_Bonsai_OBSOLETE = 10514, - Furniture_TaiMingLantern_OBSOLETE = 10515, - Furniture_WallPlanks_OBSOLETE = 10516, - Misc_Fish_Fishie = 11000, - Misc_Fish_FishieGreen = 11001, - Misc_Fish_Clam = 11002, - Misc_Fish_Crabby = 11003, - Misc_Fish_DeadFish = 11004, - Misc_Fish_Eel = 11005, - Misc_Fish_EelDisplay = 11006, - Misc_Fish_Fatty = 11007, - Misc_Fish_FattyDisplay = 11008, - Misc_Fish_Mes = 11009, - Misc_Fish_Moray = 11010, - Misc_Fish_MorayDisplay = 11011, - Misc_Fish_Octopus = 11012, - Misc_Fish_OctopusDisplay = 11013, - Misc_Fish_Salmon = 11014, - Misc_Fish_SeaHorse = 11015, - Misc_Fish_Shrimp = 11016, - Misc_Fish_Squid = 11017, - Misc_Fish_Starfish = 11018, - Misc_Fish_Stingray = 11019, - Misc_Fish_StingrayDisplay = 11020, - Misc_Fish_Ghostfish = 11021, - Misc_Fish_Zombiefish = 11022, - Misc_Fish_Vampirefish = 11023, - Misc_Fish_FrankenFish = 11024, - Misc_Fish_FrankenFishDisplay = 11025, - Misc_Fish_RedFatty_Token = 11026, - Misc_Fish_RedFatty = 11027, - Misc_Fish_RedFattyDisplay = 11028, - Misc_Fish_Fishstick = 11029, - Misc_Fish_Icefish = 11030, - Misc_Fish_Penguish = 11031, - Misc_Fish_PenguishDisplay = 11032, - Misc_Fish_SnowFish = 11033, - Misc_Fish_Yetish = 11034, - Misc_Fish_YetishDisplay = 11035, - Misc_Fish_Rockfish = 11036, - Misc_Fish_Anglerfish = 11037, - Misc_Fish_AnglerfishDisplay = 11038, - Misc_Fish_Crystalfish = 11039, - Misc_Fish_Goldfish = 11040, - Misc_Fish_Mossfish = 11041, - Misc_Fish_Bottle = 11042, - Misc_Fish_SandShark = 11043, - Misc_Fish_Cactish = 11044, - Misc_Fish_LASTFISH = 11045, - Card = 18000, - Coin_SmallSilver = 19000, - Coin_BigSilver = 19001, - Coin_SmallGold = 19002, - Coin_BigGold = 19003, - Orb_Health_Medium = 19100, - Shield_WoodenShield = 20000, - Shield_TestShield = 20001, - Shield_Barrel = 20002, - Shield_Crystal = 20003, - Shield_Iron = 20004, - Shield_Wisp = 20005, - Shield_WintersGuard = 20006, - Shield_GiftBoxShield = 20007, - Shield_MushroomShield = 20008, - Shield_Polished = 20009, - Shield_Shiidu = 20010, - Shield_ThornWormShield = 20011, - Shield_SuperCrystal = 20012, - Shield_CameraShield = 20013, - Shield_SolemShield = 20014, - Shield_CalculatorShield = 20015, - Shield_RobustShield = 20016, - Shield_CrabShield = 20017, - Shield_Promo = 20018, - Shield_PromoLocked = 20019, - Shield_CogShield = 20020, - Shield_BookShield = 20021, - Shield_SunShield = 20022, - Shield_GoldenShield = 20023, - Hat_Strawboater = 30000, - Hat_BabyDevilHorns = 30001, - Hat_Halo = 30002, - Hat_SlimeHat = 30003, - Hat_AppleHat = 30004, - Hat_PumpkinMask = 30005, - Hat_Bandana = 30006, - Hat_Can = 30007, - Hat_GuardHat = 30008, - Hat_Keps = 30009, - Hat_Mossa = 30010, - Hat_Rosett_Blue = 30011, - Hat_Rosett_Green = 30012, - Hat_Rosett_Pink = 30013, - Hat_Rosett_Red = 30014, - Hat_Garland_BluePetals = 30015, - Hat_Garland_PurplePetals = 30016, - Hat_Ushanka = 30017, - Hat_ChickenHat = 30018, - Hat_Chimney = 30019, - Hat_ArchersApple = 30020, - Hat_Crown = 30021, - Hat_Eggshell = 30022, - Hat_Fish = 30023, - Hat_PopeHat = 30024, - Hat_WitchHat = 30025, - Hat_Phaseface = 30026, - Hat_LeatherCap = 30027, - Hat_IronCap = 30028, - Hat_BrawlerHelmet = 30029, - Hat_GoblinHat = 30030, - Hat_SlimeHat_Blue = 30031, - Hat_Paperbag = 30032, - Hat_Earmuffs = 30033, - Hat_CatEars = 30034, - Hat_Turban = 30035, - Hat_ChefHat = 30036, - Hat_ValkyrieHat_Neutral = 30037, - Hat_SlimeHat_Red = 30038, - Hat_SeasonKnight_Summer = 30039, - Hat_SeasonKnight_Winter = 30040, - Hat_SeasonKnight_Autumn = 30041, - Hat_SeasonMage_Summer = 30042, - Hat_SeasonMage_Winter = 30043, - Hat_SeasonMage_Autumn = 30044, - Hat_SantaHat = 30045, - Hat_RedSlimeKingHat = 30046, - Hat_BoarHat = 30047, - Hat_PeckoHat = 30048, - Hat_SnowbaccaHat = 30049, - Hat_HoodOfDarkness = 30050, - Hat_BunnyEars = 30051, - Hat_Beret = 30052, - Hat_HornedCap = 30053, - Hat_Crystal = 30054, - Hat_CrystalMulti = 30055, - Hat_Mushroom = 30056, - Hat_MushroomMulti = 30057, - Hat_AnglerFish = 30058, - Hat_Helmet = 30059, - Hat_OrnateHelmet = 30060, - Hat_StatueMask = 30061, - Hat_BananaHat = 30062, - Hat_SideBow_Red = 30063, - Hat_SideBow_Green = 30064, - Hat_SideBow_Purple = 30065, - Hat_SideBow_Blue = 30066, - Hat_FancyHat = 30067, - Hat_BigBandana = 30068, - Hat_PowerFlower = 30069, - Hat_Wormy = 30070, - Hat_DojoHeadbelt_White = 30071, - Hat_DojoHeadbelt_Yellow = 30072, - Hat_DojoHeadbelt_Blue = 30073, - Hat_DojoHeadbelt_Purple = 30074, - Hat_DojoHeadbelt_Brown = 30075, - Hat_DojoHeadbelt_Black = 30076, - Hat_DojoHeadbelt_Red = 30077, - Hat_FaeWings_Summer = 30078, - Hat_FaeWings_Autumn = 30079, - Hat_FaeWings_Spring = 30080, - Hat_FaeWings_Winter = 30081, - Hat_SailorHat = 30082, - Hat_SlimeHat_Orange = 30083, - Hat_BarrelHat = 30084, - Hat_Fez = 30085, - Hat_JesterHat = 30086, - Hat_Pan = 30087, - Hat_Pyramid = 30088, - Hat_Partyhat_Blue = 30089, - Hat_Partyhat_Red = 30090, - Hat_Partyhat_Green = 30091, - Hat_CrabHelm = 30092, - Hat_PirateHat = 30093, - Hat_RoboticEars = 30094, - Hat_Promo = 30095, - Hat_PromoLocked = 30096, - Hat_ArenaHat = 30097, - Hat_ThornMane = 30098, - Hat_Antlers = 30099, - Hat_SkullMask = 30100, - Hat_SolemMask = 30101, - Hat_ZhamlaCrown = 30102, - Hat_FlowerPot = 30103, - Hat_Kiwi = 30104, - Hat_Fertilizer = 30105, - Hat_Chest = 30106, - Hat_IvyHood = 30107, - Hat_ZhamlaFace = 30108, - Facegear_Blindfold = 40000, - Facegear_Glasses = 40001, - Facegear_Beard = 40002, - Facegear_Cigarr = 40003, - Facegear_Masque = 40004, - Facegear_ScreamMask = 40005, - Facegear_Scar = 40006, - Facegear_EyebrowsAngry = 40007, - Facegear_FancyBeard = 40008, - Facegear_SkiGoggles = 40009, - Facegear_SantaBeard = 40010, - Facegear_SpinsectFeelers = 40011, - Facegear_GasMask = 40012, - Facegear_NohMask = 40013, - Facegear_OniMask = 40014, - Facegear_MonkeyEars = 40015, - Facegear_BlindfoldWhite = 40016, - Facegear_HybridGlasses = 40017, - Facegear_SpectralBlindfold = 40018, - Facegear_Promo = 40019, - Facegear_PromoLocked = 40020, - Facegear_EyeMask = 40021, - Facegear_FunnyMask = 40022, - Facegear_BookishGlasses = 40023, - OneHanded_WoodenSword = 50000, - OneHanded_CarrotSword = 50001, - OneHanded_Morningstar = 50002, - OneHanded_IronSword = 50003, - OneHanded_Stinger = 50004, - OneHanded_Rod = 50005, - OneHanded_RubyRod = 50006, - OneHanded_SteelSword = 50007, - OneHanded_LaserSword = 50008, - OneHanded_RedFlowerWhip = 50009, - OneHanded_ToyWand = 50010, - OneHanded_AutumnSword = 50011, - OneHanded_Pickaxe = 50012, - OneHanded_RedLaserSword = 50013, - OneHanded_Scimitar = 50014, - OneHanded_AncientFan = 50015, - OneHanded_BambooSword = 50016, - OneHanded_MarinoRapier = 50017, - OneHanded_EggstraDeliciousRecipes = 50018, - OneHanded_TheQuill = 50019, - OneHanded_Mace = 50020, - OneHanded_WarlockRod = 50021, - OneHanded_BestOfEggstraDeliciousRecipes = 50022, - OneHanded_CrabClaw = 50023, - OneHanded_SkeletonHand = 50024, - OneHanded_WoodenLeg = 50025, - OneHanded_EmptyBottle = 50026, - OneHanded_Promo = 50027, - OneHanded_PromoLocked = 50028, - OneHanded_UgrasScroll = 50029, - OneHanded_PlantBlade = 50030, - TwoHanded_Claymore = 60000, - TwoHanded_Stick = 60001, - TwoHanded_Lantern = 60002, - TwoHanded_Club = 60003, - TwoHanded_SpikedClub = 60004, - TwoHanded_GreatAxe = 60005, - TwoHanded_LumberAxe = 60006, - TwoHanded_SlimeHammer = 60007, - TwoHanded_WinterSpear = 60008, - TwoHanded_SummerHammer = 60009, - TwoHanded_BirchBranch = 60010, - TwoHanded_Icicle = 60011, - TwoHanded_Staff = 60012, - TwoHanded_Mushroom = 60013, - TwoHanded_Broadsword = 60014, - TwoHanded_AngelsThirst = 60015, - TwoHanded_BladeOfEchoes = 60016, - TwoHanded_CactusClub = 60017, - TwoHanded_CurvedSpear = 60018, - TwoHanded_GiantScimitar = 60019, - TwoHanded_LaserClaymore = 60020, - TwoHanded_BugNet = 60021, - TwoHanded_Promo = 60022, - TwoHanded_RedSlimeHammer = 60023, - TwoHanded_PromoLocked = 60024, - TwoHanded_SlimeStaff = 60025, - Bow_WoodenBow = 70000, - Bow_Level2 = 70001, - Bow_Level3 = 70002, - Bow_Level4 = 70003, - Bow_Level5 = 70004, - Bow_Level6 = 70005, - Bow_Arrows = 70200, - Accessory_RabbitsFoot = 80000, - Accessory_Scarf = 80001, - Accessory_VoodooDoll = 80002, - Accessory_Amulet01Blue = 80003, - Accessory_Amulet01Red = 80004, - Accessory_Amulet01Yellow = 80005, - Accessory_Ring01Yellow = 80006, - Accessory_Ring01Blue = 80007, - Accessory_Ring01Red = 80008, - Accessory_SlimeRing = 80009, - Accessory_PlasmaBracelet = 80010, - Accessory_MissileControlUnit = 80011, - Accessory_Gloves = 80012, - Accessory_EarringsOfBalance = 80013, - Accessory_IceCrystalPendant = 80014, - Accessory_LarvaArmband = 80015, - Accessory_LightningGlove = 80016, - Accessory_Ring02Yellow = 80017, - Accessory_Ring02Blue = 80018, - Accessory_Ring02Red = 80019, - Accessory_ButterflyBrooch = 80020, - Accessory_RibbonBroochRed = 80021, - Accessory_RibbonBroochGreen = 80022, - Accessory_RibbonBroochBlue = 80023, - Accessory_AncientPendant = 80024, - Accessory_MagicBattery = 80025, - Accessory_CameraLens = 80026, - Accessory_LuckyNumberSeven = 80027, - Accessory_GoldenEarrings = 80028, - Accessory_CaptainBonesHead = 80029, - Accessory_SkullRing = 80030, - Accessory_RestlessSpirit = 80031, - Accessory_KobesTag = 80032, - Accessory_EndasilsMysteryCube = 80033, - Accessory_GoldenThree = 80034, - Accessory_Triskele = 80035, - Accessory_EazsunsRing = 80036, - Accessory_TripleA = 80037, - Armor_Shawl = 90000, - Armor_AdventureShirt = 90001, - Armor_Vest = 90002, - Armor_Shirt = 90003, - Armor_KnittedShirt = 90004, - Armor_BrawlerPlate = 90005, - Armor_SlimeArmor = 90006, - Armor_AdventureVest = 90007, - Armor_ChainMail = 90008, - Armor_GoblinJacket = 90009, - Armor_ArmorOfAutumn = 90010, - Armor_ApprenticeRobe = 90011, - Armor_RobeOfEnergy = 90012, - Armor_RobeOfFocus = 90013, - Armor_SpinsectArmor = 90014, - Armor_LabCoat = 90015, - Armor_PurpleKimono = 90016, - Armor_RedKimono = 90017, - Armor_Breastplate = 90018, - Armor_WornCropTop = 90019, - Armor_BarbarianStrap = 90020, - Armor_FightingVest = 90021, - Armor_WizardArmor = 90022, - Armor_WarriorArmor = 90023, - Armor_CrabbyArmor = 90024, - Armor_DaisyArmor = 90025, - Armor_NinjaSuit = 90026, - Shoes_MountainBoots = 100000, - Shoes_Sandals = 100001, - Shoes_BirdFeet = 100002, - Shoes_Socks = 100003, - Shoes_GoblinShoes = 100004, - Shoes_PhasemanBoots = 100005, - Shoes_SummerGreaves = 100006, - Shoes_Rollerblades = 100007, - Shoes_CrystalPumps = 100008, - Shoes_SturdyBoots = 100009, - Shoes_Geta = 100010, - Shoes_TaiMingShoes = 100011, - Shoes_FancySandals = 100012, - Shoes_VeryOrdinaryShoes = 100013, - Shoes_BootsOfBloodthirst = 100014, - Shoes_MushroomSlippers = 100015, - Hairdo_Def = 160000, - Hairdo_Ron = 160001, - Hairdo_Random = 160002, - Hairdo_Ful = 160003, - Hairdo_Trist = 160004, - Hairdo_Struts = 160005, - Hairdo_Saiya = 160006, - Hairdo_Afro = 160007, - Hairdo_Samurai = 160008, - Hairdo_Long01 = 160009, - Hairdo_Mohawk = 160010, - Hairdo_Baldie = 160011, - Hairdo_Curly = 160012, - Hairdo_Braid = 160013, - Hairdo_Halfcut = 160014, - Hairdo_Munk = 160015, - Hairdo_Snedd = 160016, - Hairdo_Snoddas = 160017, - Hairdo_Tail = 160018, - Hairdo_Tofsar = 160019, - Hairdo_LongShort = 160020, - Hairdo_Sephina = 160500, - Hairdo_Ponytail = 160501, - Hairdo_Buns = 160502, - Hairdo_FemG = 160503, - Hairdo_Quistis = 160504, - Hairdo_Short01 = 160505, - Hairdo_Short02 = 160506, - Hairdo_Sidetails = 160507, - Hairdo_Buns02 = 160508, - Hairdo_Buns02Single = 160509, - Hairdo_Short03 = 160510, - Hairdo_BaldieFem = 160511, - SpecialPickup_DiggingToken = 170000, - Special_TeleportDevice = 170001, - Special_TeleportPlate = 170002, - Special_SlimeRing = 170003, - Special_CarrotSwordPickup = 170004, - Special_CoinPurseA = 170005, - Special_OneArrow = 170006, - Special_SomeArrows = 170007, - Special_CarpenterHammer = 170008, - Special_StonecutterMaterials = 170009, - Special_GiantSlimeEssence = 170010, - Special_BloomoSeed = 170011, - Special_FatfishToken = 170012, - Special_EternalFlame = 170013, - Special_GhastlyVeil = 170014, - Special_LastStraw = 170015, - Special_RootOfEvil = 170016, - Special_SeedOfDoubt = 170017, - Special_GrinchPresentA = 170018, - Special_GrinchPresentB = 170019, - Special_GrinchPresentC = 170020, - Special_GrinchPresentD = 170021, - Special_RoyalJelly = 170022, - Special_BakingSoda = 170023, - Special_CavelingRelic01 = 170024, - Special_CavelingRelic02 = 170025, - Special_CavelingRelic03 = 170026, - Special_LurifixReward01 = 170027, - Special_LurifixReward02 = 170028, - Special_LurifixReward03 = 170029, - Special_TimekeeperCrown = 170030, - Special_Chicken = 170031, - Special_ThousandYearAle = 170032, - Special_TaiMingBottle = 170033, - Special_EmblemOfValor = 170034, - Special_EmblemOfLoyalty = 170035, - Special_EmblemOfFaith = 170036, - Special_ZhamlasCrown_Untainted = 170037, - Special_AngelsThirstPickup = 170038, - Special_RabbyDisplay = 170039, - Special_TalentOrbPickup = 170040, - Special_ChestIcon_FlyingFortress = 170041, - Special_SilverSkillPointPickup = 170042, - Special_GoldSkillPointPickup = 170043, - Special_SpawnPin = 170044, - Special_RedSlimeCubeToken = 170045, - Special_SlimeStaffDisplay = 170046, - Special_GoodWeaponCasinoDisplay = 170047, - Special_GoodArmorCasinoDisplay = 170048, - Special_GoodAccessoryCasinoDisplay = 170049, - Special_ArcadeModeLightningPotUnlock = 170050, - Special_ArcadeModePinShelfUnlock = 170051, - Special_EssenceInFinalChest = 170052, - ArcadiaBlessings_ThreeTalents = 171000, - ArcadiaBlessings_GoldSkillPoint = 171001, - ArcadiaBlessings_Level = 171002, - ArcadiaBlessings_TonsOfGold = 171003, - ArcadiaBlessings_Heal = 171004, - ArcadiaBlessings_LoodGold = 171005, - ChaosModeUpgrade_HPUp = 172000, - ChaosModeUpgrade_ATKUp = 172001, - ChaosModeUpgrade_CSPDUp = 172002, - ChaosModeUpgrade_EPRegUp = 172003, - ChaosModeUpgrade_MaxEPUp = 172004, - ChaosModeUpgrade_TalentPoints = 172005, - ChaosModeUpgrade_LastDroppableGeneric = 172006, - ChaosModeUpgrade_SpellStart = 173000, - ChaosModeUpgrade_SpellEnd = 175999, - KeyItem_FishingRod = 180000, - KeyItem_GoldenCarrot = 180001, - KeyItem_JuicyApple = 180002, - KeyItem_CandyCane = 180003, - KeyItem_Quiver = 180004, - KeyItem_Key = 180005, - KeyItem_FFAmulet = 180006, - KeyItem_RoguelikeEssence = 180007, - KeyItem_STGauntlet = 180008, - KeyItem_SantaCookie = 180009, - KeyItem_MiniSantaTruffles = 180010, - KeyItem_GiftBand = 180011, - KeyItem_FriedEel = 180012, - KeyItem_GiftBand_Display = 180013, - KeyItem_BeeTamingFlower = 180014, - KeyItem_LotsOfHoney = 180015, - KeyItem_CavelingKey = 180016, - KeyItem_CavelingFlute = 180017, - KeyItem_StevesFathersPickaxe = 180018, - KeyItem_CrystalChisel = 180019, - KeyItem_TaiMingResidenceKey = 180020, - KeyItem_MikiBall = 180021, - KeyItem_MikiBall_Cursed = 180022, - KeyItem_PuzzleWorldMonkeyKey = 180023, - KeyItem_ZhamlaCrown = 180024, - KeyItem_ZhamlaBraazlet = 180025, - KeyItem_ZhamlaSword = 180026, - KeyItem_PlayerHomeKey = 180027, - KeyItem_Lumber = 180028, - KeyItem_TimeshiftCrystal = 180029, - KeyItem_CursedRedApple = 180030, - KeyItem_WhiteCarrot = 180031, - KeyItem_LifeInsuranceStep1 = 180032, - KeyItem_LifeInsuranceStep2 = 180033, - KeyItem_LifeInsuranceStep3 = 180034, - KeyItem_LifeInsuranceStep4 = 180035, - KeyItem_Camera = 180036, - KeyItem_BirdFeedSack = 180037, - KeyItem_TranslationTome = 180038, - KeyItem_RedSunRuby = 180039, - KeyItem_PennAutograph = 180040, - KeyItem_VegetableTamingItem = 180041, - KeyItem_KnotsHat = 180042, - KeyItem_KingweedRoot = 180043, - KeyItem_StatueHairOrnament = 180044, - KeyItem_KatarinaSunscreen = 180045, - KeyItem_MalletIceCream = 180046, - KeyItem_CatLocket = 180047, - KeyItem_FinderStuff_PlateShard = 180048, - KeyItem_FinderStuff_Comb = 180049, - KeyItem_FinderStuff_Fork = 180050, - KeyItem_GhostShipKey = 180051, - KeyItem_Gunpowder = 180052, - KeyItem_SheetMusic = 180053, - KeyItem_BouncerTShirt = 180054, - KeyItem_BarbackCleaningRag = 180055, - KeyItem_Psychosis_Obsession = 180056, - KeyItem_Psychosis_Expectations = 180057, - KeyItem_Psychosis_Deceit = 180058, - KeyItem_TwiSight = 180059, - KeyItem_DrBorisBook = 180060, - KeyItem_DivaMirror = 180061, - KeyItem_TanniesTicket = 180062, - KeyItem_BrulesHead = 180063, - KeyItem_AgedRum = 180064, - KeyItem_Fertilizer = 180065, - KeyItem_BigButterfly_Blue = 180066, - KeyItem_BigButterfly_Red = 180067, - KeyItem_BigButterfly_Green = 180068, - KeyItem_BigButterfly_Pink = 180069, - KeyItem_BigButterfly_Magenta = 180070, - KeyItem_BigButterfly_Purple = 180071, - KeyItem_BigButterfly_Yellow = 180072, - KeyItem_BigButterfly_Teal = 180073, - KeyItem_GildedFlasks = 180074, - KeyItem_Eacorn = 180075, - KeyItem_SuperSaladLeaf = 180076, - KeyItem_DesertRose = 180077, - KeyItem_GenericIceCream = 180078, - KeyItem_DeviousToaster = 180079, - KeyItem_Leafcifer = 180080, - KeyItem_GhostTrap = 180081, - KeyItem_GhostTrapPine = 180082, - KeyItem_CharlottesLetter = 180083, - KeyItem_CharlottesPendant = 180084, - KeyItem_CatalystOfMortality = 180085, - KeyItem_CatalystOfPower = 180086, - KeyItem_CatalystOfAwakening = 180087, - KeyItem_PennWryteFinale_Love = 180088, - KeyItem_PennWryteFinale_Power = 180089, - KeyItem_PennWryteFinale_Duty = 180090, - KeyItem_CasinoChestKey = 180091, - KeyItem_RoguelikeGoldenEssence = 180092, - KeyItem_RileysGuitar = 180093, - KeyItem_ManasShawl = 180094, - KeyItem_KailansID = 180095, - Egg_Chicken = 181000, - Egg_MiniChicken = 181001, - Egg_FluffyFeathers = 181002, - Egg_HealthLood = 181003, - Egg_TalentLood = 181004, - Egg_GoldenLood = 181005, - Egg_TreasureLood = 181006, - Egg_PinLood = 181007, - Icon_PhaseShape_Orb = 190000, - Icon_PhaseShape_Cube = 190001, - Icon_PhaseShape_Heart = 190002, - Icon_PhaseShape_Star = 190003, - TreasureMap_Special_TrialPlayer01 = 200000, - TreasureMap_TaiMing_TessensMap = 200001, - TreasureMap_001 = 201000, - TreasureMap_002 = 201001, - TreasureMap_003 = 201002, - TreasureMap_004 = 201003, - TreasureMap_005 = 201004, - TreasureMap_006 = 201005, - TreasureMap_007 = 201006, - TreasureMap_008 = 201007, - TreasureMap_009_Fertilizer = 201008, - TreasureMap_010_Ugras = 201009, - TreasureMap_011 = 201010, - TreasureMap_012 = 201011, - TreasureMap_013 = 201012, - TreasureMap_014 = 201013, - TreasureMap_015 = 201014, - TreasureMap_016 = 201015, - TreasureMap_Last = 209999, - RogueLikeArcadiaReward_TavernTent = 300000, - RogueLikeArcadiaReward_Roads = 300001, - RogueLikeArcadiaReward_Well = 300002, - RogueLikeArcadiaReward_FarmField = 300003, - RogueLikeArcadiaReward_NoticeBoard = 300004, - RogueLikeArcadiaReward_StartingtonHouses = 300005, - RogueLikeArcadiaReward_ChickenCoop = 300006, - RogueLikeArcadiaReward_GrindeaRenewed = 300007, - RogueLikeArcadiaReward_PavedRoads = 300008, - RogueLikeArcadiaReward_BetterFarmsAndFlowers = 300009, - RogueLikeArcadiaReward_StreetLights = 300010, - RogueLikeArcadiaReward_Fountain = 300011, - RogueLikeArcadiaReward_EvergrindHouses = 300012, - RogueLikeArcadiaReward_StatueObtained = 300013, - RogueLikeArcadiaReward_IntroCutsceneWatched = 300014, - RogueLikeArcadiaReward_BloomoFound = 300015, - RogueLikeArcadiaReward_NPC_RobinHood = 300016, - RogueLikeArcadiaReward_NPC_PapaGuard = 300017, - RogueLikeArcadiaReward_PidgysBirds = 300018, -} diff --git a/SoG_SGreader/Forms/FrmMain.cs b/SoG_SGreader/Forms/FrmMain.cs index 3270ae6..d4b5627 100644 --- a/SoG_SGreader/Forms/FrmMain.cs +++ b/SoG_SGreader/Forms/FrmMain.cs @@ -1,4 +1,5 @@ -using SoG_SGreader.Wrapper; +using SoG_SGreader.Enum; +using SoG_SGreader.Wrapper; using System; using System.Diagnostics; using System.Drawing; @@ -106,7 +107,7 @@ private void InitElements() // Designer Items //was selected in the Type combobox private void QuickslotType_SelectedIndexChanged(object sender, EventArgs e) { - var items = System.Enum.GetNames(typeof(SogItem)); + var items = GameEnums.SogItem.GetNames().ToArray(); var skills = System.Enum.GetNames(typeof(SogSkill)); for (int i = 0; i < 10; i++) @@ -128,9 +129,10 @@ private string[] FilterItems(string[] items, params string[] prefixes) private void InitFields() { - var items = System.Enum.GetNames(typeof(SogItem)); + var items = GameEnums.SogItem.GetNames().ToArray(); var skills = System.Enum.GetNames(typeof(SogSkill)); + cbHat.DataSource = FilterItems(items, "Hat_"); cbFacegear.DataSource = FilterItems(items, "Facegear_"); cbWeapon.DataSource = FilterItems(items, "OneHanded_", "TwoHanded_"); @@ -170,30 +172,32 @@ private void InitFields() cblstFlags.DataSource = System.Enum.GetNames(typeof(SogFlag)); cblstMaps.DataSource = System.Enum.GetNames(typeof(SogTreasureMap)); cblstTrophies.DataSource = System.Enum.GetNames(typeof(SogTrophy)); - cblstItemsSeen.DataSource = System.Enum.GetNames(typeof(SogItem)); - cblstItemsCrafted.DataSource = System.Enum.GetNames(typeof(SogItem)); - cblstFishCaught.DataSource = System.Enum.GetNames(typeof(SogFish)); + cblstItemsSeen.DataSource = GameEnums.SogItem.GetNames().ToArray(); + cblstItemsCrafted.DataSource = GameEnums.SogItem.GetNames().ToArray(); + cblstFishCaught.DataSource = FilterItems(items, "Misc_Fish_"); } private void PopulateFields() { + var items = GameEnums.SogItem.GetNames(); + txtNickname.Text = playerObject.Nickname; - cbHat.Text = ((SogItem)playerObject.Equip.Hat).ToString(); - cbFacegear.Text = ((SogItem)playerObject.Equip.Facegear).ToString(); - cbWeapon.Text = ((SogItem)playerObject.Equip.Weapon).ToString(); - cbShield.Text = ((SogItem)playerObject.Equip.Shield).ToString(); - cbArmor.Text = ((SogItem)playerObject.Equip.Armor).ToString(); - cbShoes.Text = ((SogItem)playerObject.Equip.Shoes).ToString(); + cbHat.Text = GameEnums.SogItem.GetName(playerObject.Equip.Hat); + cbFacegear.Text = GameEnums.SogItem.GetName(playerObject.Equip.Facegear); + cbWeapon.Text = GameEnums.SogItem.GetName(playerObject.Equip.Weapon); + cbShield.Text = GameEnums.SogItem.GetName(playerObject.Equip.Shield); + cbArmor.Text = GameEnums.SogItem.GetName(playerObject.Equip.Armor); + cbShoes.Text = GameEnums.SogItem.GetName(playerObject.Equip.Shoes); - cbAccessory1.Text = ((SogItem)playerObject.Equip.Accessory1).ToString(); - cbAccessory2.Text = ((SogItem)playerObject.Equip.Accessory2).ToString(); + cbAccessory1.Text = GameEnums.SogItem.GetName(playerObject.Equip.Accessory1); + cbAccessory2.Text = GameEnums.SogItem.GetName(playerObject.Equip.Accessory2); - cbStyleHat.Text = ((SogItem)playerObject.Style.Hat).ToString(); - cbStyleFacegear.Text = ((SogItem)playerObject.Style.Facegear).ToString(); - cbStyleWeapon.Text = ((SogItem)playerObject.Style.Weapon).ToString(); - cbStyleShield.Text = ((SogItem)playerObject.Style.Shield).ToString(); + cbStyleHat.Text = GameEnums.SogItem.GetName(playerObject.Style.Hat); + cbStyleFacegear.Text = GameEnums.SogItem.GetName(playerObject.Style.Facegear); + cbStyleWeapon.Text = GameEnums.SogItem.GetName(playerObject.Style.Weapon); + cbStyleShield.Text = GameEnums.SogItem.GetName(playerObject.Style.Shield); numPotionsEquipped.Value = playerObject.PotionsEquipped; numPotionsMax.Value = playerObject.PotionsMax; @@ -232,7 +236,7 @@ private void PopulateFields() { var vItem = new ListViewItem( new[] { - playerObject.Inventory[i].ItemID.ToString(), + GameEnums.SogItem.GetName(playerObject.Inventory[i].ItemID), playerObject.Inventory[i].ItemCount.ToString(), playerObject.Inventory[i].ItemPos.ToString() } @@ -337,19 +341,21 @@ private void PopulateFields() for (int i = 0; i < cblstItemsSeen.Items.Count; i++) { - bool playerHasSeenItem = playerObject.HasSeenItem((SogItem)System.Enum.Parse(typeof(SogItem), cblstItemsSeen.Items[i].ToString())); + string itemName = cblstItemsSeen.Items[i].ToString(); + int itemValue = GameEnums.SogItem.GetValue(itemName); // Retrieve the integer value from the enum name. + bool playerHasSeenItem = playerObject.HasSeenItem(itemValue); cblstItemsSeen.SetItemChecked(i, playerHasSeenItem); } for (int i = 0; i < cblstItemsCrafted.Items.Count; i++) { - bool playerHasCraftedItem = playerObject.HasCraftedItem((SogItem)System.Enum.Parse(typeof(SogItem), cblstItemsCrafted.Items[i].ToString())); + bool playerHasCraftedItem = playerObject.HasCraftedItem(GameEnums.SogItem.GetValue(cblstItemsCrafted.Items[i].ToString())); cblstItemsCrafted.SetItemChecked(i, playerHasCraftedItem); } for (int i = 0; i < cblstFishCaught.Items.Count; i++) { - bool playerHasCaughtFish = playerObject.HasCaughtFish((SogItem)System.Enum.Parse(typeof(SogItem), cblstFishCaught.Items[i].ToString())); + bool playerHasCaughtFish = playerObject.HasCaughtFish(GameEnums.SogItem.GetValue(cblstFishCaught.Items[i].ToString())); cblstFishCaught.SetItemChecked(i, playerHasCaughtFish); } } @@ -357,36 +363,36 @@ private void PopulateFields() private void GetDataFromFields() { playerObject.Nickname = txtNickname.Text; - playerObject.Equip.Hat = (int)System.Enum.Parse(typeof(SogItem), cbHat.Text); - playerObject.Equip.Facegear = (int)System.Enum.Parse(typeof(SogItem), cbFacegear.Text); - playerObject.Equip.Weapon = (int)System.Enum.Parse(typeof(SogItem), cbWeapon.Text); - playerObject.Equip.Shield = (int)System.Enum.Parse(typeof(SogItem), cbShield.Text); - playerObject.Equip.Armor = (int)System.Enum.Parse(typeof(SogItem), cbArmor.Text); - playerObject.Equip.Shoes = (int)System.Enum.Parse(typeof(SogItem), cbShoes.Text); + playerObject.Equip.Hat = GameEnums.SogItem.GetValue(cbHat.Text); + playerObject.Equip.Facegear = GameEnums.SogItem.GetValue(cbFacegear.Text); + playerObject.Equip.Weapon = GameEnums.SogItem.GetValue(cbWeapon.Text); + playerObject.Equip.Shield = GameEnums.SogItem.GetValue(cbShield.Text); + playerObject.Equip.Armor = GameEnums.SogItem.GetValue(cbArmor.Text); + playerObject.Equip.Shoes = GameEnums.SogItem.GetValue(cbShoes.Text); - playerObject.Equip.Accessory1 = (int)System.Enum.Parse(typeof(SogItem), cbAccessory1.Text); - playerObject.Equip.Accessory2 = (int)System.Enum.Parse(typeof(SogItem), cbAccessory2.Text); + playerObject.Equip.Accessory1 = GameEnums.SogItem.GetValue(cbAccessory1.Text); + playerObject.Equip.Accessory2 = GameEnums.SogItem.GetValue(cbAccessory2.Text); - playerObject.Style.Hat = (int)System.Enum.Parse(typeof(SogItem), cbStyleHat.Text); - playerObject.Style.Facegear = (int)System.Enum.Parse(typeof(SogItem), cbStyleFacegear.Text); - playerObject.Style.Weapon = (int)System.Enum.Parse(typeof(SogItem), cbStyleWeapon.Text); - playerObject.Style.Shield = (int)System.Enum.Parse(typeof(SogItem), cbStyleShield.Text); + playerObject.Style.Hat = GameEnums.SogItem.GetValue(cbStyleHat.Text); + playerObject.Style.Facegear = GameEnums.SogItem.GetValue(cbStyleFacegear.Text); + playerObject.Style.Weapon = GameEnums.SogItem.GetValue(cbStyleWeapon.Text); + playerObject.Style.Shield = GameEnums.SogItem.GetValue(cbStyleShield.Text); // set the potion for all potions playerObject.Potions.Clear(); if (cbPotion1.Enabled == true) { - playerObject.Potions.Add(new Potion { PotionID = (SogItem)System.Enum.Parse(typeof(SogItem), cbPotion1.Text) }); + playerObject.Potions.Add(new Potion { PotionID = GameEnums.SogItem.GetValue(cbPotion1.Text) }); } if (cbPotion2.Enabled == true) { - playerObject.Potions.Add(new Potion { PotionID = (SogItem)System.Enum.Parse(typeof(SogItem), cbPotion2.Text) }); + playerObject.Potions.Add(new Potion { PotionID = GameEnums.SogItem.GetValue(cbPotion2.Text) }); } if (cbPotion3.Enabled == true) { - playerObject.Potions.Add(new Potion { PotionID = (SogItem)System.Enum.Parse(typeof(SogItem), cbPotion3.Text) }); + playerObject.Potions.Add(new Potion { PotionID = GameEnums.SogItem.GetValue(cbPotion3.Text) }); } /* TODO: Quickslots are not being saved correctly, we need to fix this @@ -416,7 +422,7 @@ private void GetDataFromFields() { Item item = new Item { - ItemID = (SogItem)System.Enum.Parse(typeof(SogItem), lstInventory.Items[i].SubItems[0].Text), + ItemID = GameEnums.SogItem.GetValue(lstInventory.Items[i].SubItems[0].Text), ItemCount = int.Parse(lstInventory.Items[i].SubItems[1].Text), ItemPos = uint.Parse(lstInventory.Items[i].SubItems[2].Text) }; @@ -600,7 +606,7 @@ private void GetDataFromFields() playerObject.ItemsSeen.Add( new ItemSeen { - ItemID = (SogItem)System.Enum.Parse(typeof(SogItem), cblstItemsSeen.Items[i].ToString()) + ItemID = GameEnums.SogItem.GetValue(cblstItemsSeen.Items[i].ToString()) } ); } @@ -614,7 +620,7 @@ private void GetDataFromFields() playerObject.ItemsCrafted.Add( new ItemCrafted { - ItemID = (SogItem)System.Enum.Parse(typeof(SogItem), cblstItemsCrafted.Items[i].ToString()) + ItemID = GameEnums.SogItem.GetValue(cblstItemsCrafted.Items[i].ToString()) } ); } @@ -628,7 +634,7 @@ private void GetDataFromFields() playerObject.FishCaught.Add( new FishCaught { - FishID = (SogItem)System.Enum.Parse(typeof(SogItem), cblstFishCaught.Items[i].ToString()) + FishID = GameEnums.SogItem.GetValue(cblstFishCaught.Items[i].ToString()) } ); } @@ -1187,7 +1193,7 @@ private void btnResetItemsSeen_Click(object sender, EventArgs e) { for (int i = 0; i < cblstItemsSeen.Items.Count; i++) { - bool playerHasSeenItem = playerObject.HasSeenItem((SogItem)System.Enum.Parse(typeof(SogItem), cblstItemsSeen.Items[i].ToString())); + bool playerHasSeenItem = playerObject.HasSeenItem(GameEnums.SogItem.GetValue(cblstItemsSeen.Items[i].ToString())); cblstItemsSeen.SetItemChecked(i, playerHasSeenItem); } } @@ -1212,7 +1218,7 @@ private void btnResetItemsCrafted_Click(object sender, EventArgs e) { for (int i = 0; i < cblstItemsCrafted.Items.Count; i++) { - bool playerHasCraftedItem = playerObject.HasCraftedItem((SogItem)System.Enum.Parse(typeof(SogItem), cblstItemsCrafted.Items[i].ToString())); + bool playerHasCraftedItem = playerObject.HasCraftedItem(GameEnums.SogItem.GetValue(cblstItemsCrafted.Items[i].ToString())); cblstItemsCrafted.SetItemChecked(i, playerHasCraftedItem); } } @@ -1237,7 +1243,7 @@ private void btnResetFishCaught_Click(object sender, EventArgs e) { for (int i = 0; i < cblstFishCaught.Items.Count; i++) { - bool playerHasCaughtFish = playerObject.HasCaughtFish((SogItem)System.Enum.Parse(typeof(SogItem), cblstFishCaught.Items[i].ToString())); + bool playerHasCaughtFish = playerObject.HasCaughtFish(GameEnums.SogItem.GetValue(cblstFishCaught.Items[i].ToString())); cblstFishCaught.SetItemChecked(i, playerHasCaughtFish); } } diff --git a/SoG_SGreader/Objects/FishCaught.cs b/SoG_SGreader/Objects/FishCaught.cs index 7bc4f67..d88ba6f 100644 --- a/SoG_SGreader/Objects/FishCaught.cs +++ b/SoG_SGreader/Objects/FishCaught.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class FishCaught { - public SogItem FishID { get; set; } + public int FishID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/Item.cs b/SoG_SGreader/Objects/Item.cs index f500a05..8538582 100644 --- a/SoG_SGreader/Objects/Item.cs +++ b/SoG_SGreader/Objects/Item.cs @@ -2,7 +2,7 @@ namespace SoG_SGreader { public class Item { - public SogItem ItemID { get; set; } + public int ItemID { get; set; } public int ItemCount { get; set; } public uint ItemPos { get; set; } diff --git a/SoG_SGreader/Objects/ItemCrafted.cs b/SoG_SGreader/Objects/ItemCrafted.cs index 9d9b3d2..476858d 100644 --- a/SoG_SGreader/Objects/ItemCrafted.cs +++ b/SoG_SGreader/Objects/ItemCrafted.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class ItemCrafted { - public SogItem ItemID { get; set; } + public int ItemID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/ItemSeen.cs b/SoG_SGreader/Objects/ItemSeen.cs index a5cc1f3..0689320 100644 --- a/SoG_SGreader/Objects/ItemSeen.cs +++ b/SoG_SGreader/Objects/ItemSeen.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class ItemSeen { - public SogItem ItemID { get; set; } + public int ItemID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/MerchantItem.cs b/SoG_SGreader/Objects/MerchantItem.cs index eac81a1..40ab735 100644 --- a/SoG_SGreader/Objects/MerchantItem.cs +++ b/SoG_SGreader/Objects/MerchantItem.cs @@ -2,7 +2,7 @@ namespace SoG_SGreader { public class MerchantItem { - public SogItem ItemID { get; set; } + public int ItemID { get; set; } public int ItemCount { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Objects/Player.cs b/SoG_SGreader/Objects/Player.cs index aa51837..cbc91bb 100644 --- a/SoG_SGreader/Objects/Player.cs +++ b/SoG_SGreader/Objects/Player.cs @@ -49,7 +49,7 @@ public class Player public ushort UnknownVariable02Count { get; set; } //something to do with challenges? public List UnknownVariables02; public int RobinBowHighscore { get; set; } - public ushort TrophiesCount { get; set; } //trophies? + public ushort TrophiesCount { get; set; } public List Trophies; public ushort ItemsSeenCount { get; set; } @@ -125,17 +125,17 @@ internal bool HasTrophy(SogTrophy sogTrophy) return Trophies.Any(trophy => trophy.TrophyID == sogTrophy); } - internal bool HasSeenItem(SogItem sogItem) + internal bool HasSeenItem(int sogItem) { return ItemsSeen.Any(item => item.ItemID == sogItem); } - internal bool HasCraftedItem(SogItem sogItem) + internal bool HasCraftedItem(int sogItem) { return ItemsCrafted.Any(item => item.ItemID == sogItem); } - internal bool HasCaughtFish(SogItem sogItem) + internal bool HasCaughtFish(int sogItem) { return FishCaught.Any(fish => fish.FishID == sogItem); } diff --git a/SoG_SGreader/Objects/Potion.cs b/SoG_SGreader/Objects/Potion.cs index 26ef479..3638461 100644 --- a/SoG_SGreader/Objects/Potion.cs +++ b/SoG_SGreader/Objects/Potion.cs @@ -2,6 +2,6 @@ namespace SoG_SGreader { public class Potion { - public SogItem PotionID { get; set; } + public int PotionID { get; set; } } } \ No newline at end of file diff --git a/SoG_SGreader/Program.cs b/SoG_SGreader/Program.cs index 79032e3..158c83a 100644 --- a/SoG_SGreader/Program.cs +++ b/SoG_SGreader/Program.cs @@ -5,6 +5,7 @@ using CommandLine; using System.Diagnostics; using System.Security.Cryptography; +using SoG_SGreader.Enum; namespace SoG_SGreader { @@ -140,6 +141,7 @@ private static void RunApp() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //SetProcessDpiAwareness((int)DpiAwareness.SystemAware); + GameEnums.InitializeEnums(); Application.Run(new FrmLoadSaveGame()); } } diff --git a/SoG_SGreader/SoG_SGreader.csproj b/SoG_SGreader/SoG_SGreader.csproj index ba9b00d..4704ecd 100644 --- a/SoG_SGreader/SoG_SGreader.csproj +++ b/SoG_SGreader/SoG_SGreader.csproj @@ -140,7 +140,8 @@ Component - + + @@ -150,7 +151,6 @@ -