From f579f0c3c8a7a3c35408303bb46edb68b555915d Mon Sep 17 00:00:00 2001 From: tolik518 Date: Mon, 5 Aug 2024 21:20:06 +0200 Subject: [PATCH] added maxlevel attribute to skills --- .../Enum/Attribute/SkillMaxLevelAttribute.cs | 12 + SoG_SGreader/Enum/SogSkill.cs | 470 +++++++++++++----- SoG_SGreader/Forms/FrmMain.cs | 1 - SoG_SGreader/Objects/Skill.cs | 10 + SoG_SGreader/SoG_SGreader.csproj | 1 + 5 files changed, 377 insertions(+), 117 deletions(-) create mode 100644 SoG_SGreader/Enum/Attribute/SkillMaxLevelAttribute.cs diff --git a/SoG_SGreader/Enum/Attribute/SkillMaxLevelAttribute.cs b/SoG_SGreader/Enum/Attribute/SkillMaxLevelAttribute.cs new file mode 100644 index 0000000..c4c457a --- /dev/null +++ b/SoG_SGreader/Enum/Attribute/SkillMaxLevelAttribute.cs @@ -0,0 +1,12 @@ +namespace SoG_SGreader.Enum.Attribute +{ + public class SkillMaxLevelAttribute : System.Attribute + { + public int MaxLevel { get; } + + public SkillMaxLevelAttribute(int maxLevel) + { + MaxLevel = maxLevel; + } + } +} diff --git a/SoG_SGreader/Enum/SogSkill.cs b/SoG_SGreader/Enum/SogSkill.cs index 89f6b0f..f06103b 100644 --- a/SoG_SGreader/Enum/SogSkill.cs +++ b/SoG_SGreader/Enum/SogSkill.cs @@ -1,124 +1,359 @@ // Generated by JackTheEnumRipper // Source: Secrets of Grindea: SoG\SpellCodex\SpellTypes // Game Version: 1.00 +using SoG_SGreader.Enum.Attribute; + public enum SogSkill: ushort { NULL = 0, - Basic_HealthBoost = 1, - Basic_ManaBoost = 2, - Basic_AttackDamage = 3, - Basic_AttackSpeed = 4, - Basic_MagicDamage = 5, - Basic_CastSpeed = 6, - Skill_Bow_ShootArrow = 7, - Skill_Bow_SplittingArrow = 8, - Skill_Bow_MachineBow = 9, - Magic_Ice_IceSpikes = 100, - Magic_Ice_IceNova = 101, - Magic_Ice_FrostyFriend = 102, - Magic_Ice_FreezeControlInstance = 103, - Magic_Fire_Fireball = 200, - Magic_Fire_Meteor = 201, - Magic_Fire_Flamethrower = 202, - Magic_Fire_BurnControlInstance = 203, - Magic_Fire_Fireball_PhoenixTrail = 204, - Magic_Fire_MeteorBurningGround = 205, - Magic_Earth_EarthSpike = 300, - Magic_Earth_SummonPlant = 301, - Magic_Earth_InsectSwarm = 302, - Magic_Earth_SummonPlant_NutShot = 303, - Magic_Wind_SummonCloud = 400, - Magic_Wind_ChainLightning = 401, - Magic_Wind_StaticTouch = 402, - Magic_Wind_WindSlice = 403, - Magic_Wind_StaticTouchProjectile = 404, - Magic_Light_Heal = 500, - Magic_Light_Protect = 501, - Magic_Support_Haste = 502, - Magic_Support_Defensive3 = 503, - Magic_Support_Offensive1 = 504, - Magic_Support_Offensive2 = 505, - Magic_Support_Offensive3 = 506, - Magic_Support_BuffATK = 507, - Magic_Support_BuffSPD = 508, - Magic_Support_BuffDEF = 509, - Magic_Support_Blink = 510, - Magic_Support_Focus = 511, - Magic_Support_Barrier = 512, - Magic_Support_DeathMark = 513, - Magic_Support_Stasis = 514, - Magic_Support_Taunt = 515, - Magic_OneHandProjectile_Basic = 516, - Magic_TwoHandProjectile_Basic = 517, - Skill_TwoHanded_Overhead = 1000, - Skill_TwoHanded_Spin = 1001, - Skill_TwoHanded_Throw = 1002, - Skill_TwoHanded_Smash = 1003, - Skill_TwoHanded_BerserkMode = 1004, - Skill_TwoHanded_Smash_TravelInstance = 1005, - Skill_OneHanded_Stinger = 1200, - Skill_OneHanded_MillionStabs = 1201, - Skill_OneHanded_SpiritSlash = 1202, - Skill_OneHanded_QuickCounter = 1203, - Skill_OneHanded_ShadowClone = 1204, - Skill_OneHanded_StingerPostDamage = 1205, - Skill_CombatPassive1 = 1300, - Skill_CombatPassive2 = 1301, - Skill_CombatPassive3 = 1302, - Talent_QuickReflexes = 2000, - Talent_ShieldBearer = 2001, - Talent_Multitasking = 2002, - Talent_Adaptable = 2003, - Talent_Tenacious = 2004, - Talent_LastStand = 2005, - Talent_Surgeon = 2006, - Talent_Brutality = 2007, - Talent_Endurance = 2008, - Talent_FineTaste = 2009, - Talent_Strength = 2010, - Talent_Brawler = 2011, - Talent_SecondWind = 2012, - Talent_Wit = 2013, - Talent_BurningWeapon = 2014, - Talent_ChillyTouch = 2015, - Talent_StaticField = 2016, - Talent_Fencer = 2017, - Talent_LastBreath = 2018, - Talent_OBSOLETE1 = 2019, - Talent_Intelligence = 2020, - Talent_ArcaneCharge = 2021, - Talent_Prismatic = 2022, - Talent_Battlemage = 2023, - Talent_Turtle = 2024, - Talent_LastSpark = 2025, - Talent_ArcaneCollar = 2026, - Talent_Backhander = 2027, - Talent_InsultToInjury = 2028, - Talent_Manaburn = 2029, - Talent_SnapCast = 2030, - Talent_CripplingBlast = 2031, - Talent_Magic_FastTalker = 2032, - Talent_Magic_SoulEater = 2033, - Talent_Magic_Concentration = 2034, - Talent_Magic_Specialist = 2035, - Talent_Magic_WandMaster = 2036, - Talent_Melee_BloodThirst = 2037, - Talent_Melee_Riposte = 2038, - Talent_Melee_ComboStarter = 2039, - Talent_Melee_KnowledgeIsPower = 2040, - Talent_Melee_SuddenStrike = 2041, - Talent_General_GotYouCovered = 2042, - Talent_General_Metabolism = 2043, - Talent_General_HealthInsurance = 2044, - Talent_General_LadyLuck = 2045, - Talent_General_UtilityFlow = 2046, - Talent_General_KineticEnergy = 2047, - Talent_General_EfficientCounter = 2048, - Talent_General_AmmoScavenger = 2049, - Talent_General_QuickShot = 2050, - Talent_General_Alchemist = 2051, - Talent_General_SteadyDefense = 2052, - Talent_Last = 2999, + + [SkillMaxLevel(10)] + Basic_HealthBoost = 1, + + [SkillMaxLevel(10)] + Basic_ManaBoost = 2, + + [SkillMaxLevel(10)] + Basic_AttackDamage = 3, + + [SkillMaxLevel(10)] + Basic_AttackSpeed = 4, + + [SkillMaxLevel(10)] + Basic_MagicDamage = 5, + + [SkillMaxLevel(10)] + Basic_CastSpeed = 6, + + [SkillMaxLevel(10)] + Skill_Bow_ShootArrow = 7, + + [SkillMaxLevel(10)] + Skill_Bow_SplittingArrow = 8, + + [SkillMaxLevel(10)] + Skill_Bow_MachineBow = 9, + + [SkillMaxLevel(10)] + Magic_Ice_IceSpikes = 100, + + [SkillMaxLevel(10)] + Magic_Ice_IceNova = 101, + + [SkillMaxLevel(10)] + Magic_Ice_FrostyFriend = 102, + + [SkillMaxLevel(10)] + Magic_Ice_FreezeControlInstance = 103, + + [SkillMaxLevel(10)] + Magic_Fire_Fireball = 200, + + [SkillMaxLevel(10)] + Magic_Fire_Meteor = 201, + + [SkillMaxLevel(10)] + Magic_Fire_Flamethrower = 202, + + [SkillMaxLevel(10)] + Magic_Fire_BurnControlInstance = 203, + + [SkillMaxLevel(10)] + Magic_Fire_Fireball_PhoenixTrail = 204, + + [SkillMaxLevel(10)] + Magic_Fire_MeteorBurningGround = 205, + + [SkillMaxLevel(10)] + Magic_Earth_EarthSpike = 300, + + [SkillMaxLevel(10)] + Magic_Earth_SummonPlant = 301, + + [SkillMaxLevel(10)] + Magic_Earth_InsectSwarm = 302, + + [SkillMaxLevel(10)] + Magic_Earth_SummonPlant_NutShot = 303, + + [SkillMaxLevel(10)] + Magic_Wind_SummonCloud = 400, + + [SkillMaxLevel(10)] + Magic_Wind_ChainLightning = 401, + + [SkillMaxLevel(10)] + Magic_Wind_StaticTouch = 402, + + [SkillMaxLevel(10)] + Magic_Wind_WindSlice = 403, + + [SkillMaxLevel(10)] + Magic_Wind_StaticTouchProjectile = 404, + + [SkillMaxLevel(10)] + Magic_Light_Heal = 500, + + [SkillMaxLevel(10)] + Magic_Light_Protect = 501, + + [SkillMaxLevel(10)] + Magic_Support_Haste = 502, + + [SkillMaxLevel(10)] + Magic_Support_Defensive3 = 503, + + [SkillMaxLevel(10)] + Magic_Support_Offensive1 = 504, + + [SkillMaxLevel(10)] + Magic_Support_Offensive2 = 505, + + [SkillMaxLevel(10)] + Magic_Support_Offensive3 = 506, + + [SkillMaxLevel(10)] + Magic_Support_BuffATK = 507, + + [SkillMaxLevel(10)] + Magic_Support_BuffSPD = 508, + + [SkillMaxLevel(10)] + Magic_Support_BuffDEF = 509, + + [SkillMaxLevel(10)] + Magic_Support_Blink = 510, + + [SkillMaxLevel(10)] + Magic_Support_Focus = 511, + + [SkillMaxLevel(10)] + Magic_Support_Barrier = 512, + + [SkillMaxLevel(10)] + Magic_Support_DeathMark = 513, + + [SkillMaxLevel(10)] + Magic_Support_Stasis = 514, + + [SkillMaxLevel(10)] + Magic_Support_Taunt = 515, + + [SkillMaxLevel(10)] + Magic_OneHandProjectile_Basic = 516, + + [SkillMaxLevel(10)] + Magic_TwoHandProjectile_Basic = 517, + + + [SkillMaxLevel(10)] + Skill_TwoHanded_Overhead = 1000, + + [SkillMaxLevel(10)] + Skill_TwoHanded_Spin = 1001, + + [SkillMaxLevel(10)] + Skill_TwoHanded_Throw = 1002, + + [SkillMaxLevel(10)] + Skill_TwoHanded_Smash = 1003, + + [SkillMaxLevel(10)] + Skill_TwoHanded_BerserkMode = 1004, + + [SkillMaxLevel(10)] + Skill_TwoHanded_Smash_TravelInstance = 1005, + + [SkillMaxLevel(10)] + Skill_OneHanded_Stinger = 1200, + + [SkillMaxLevel(10)] + Skill_OneHanded_MillionStabs = 1201, + + [SkillMaxLevel(10)] + Skill_OneHanded_SpiritSlash = 1202, + + [SkillMaxLevel(10)] + Skill_OneHanded_QuickCounter = 1203, + + [SkillMaxLevel(10)] + Skill_OneHanded_ShadowClone = 1204, + + [SkillMaxLevel(10)] + Skill_OneHanded_StingerPostDamage = 1205, + + [SkillMaxLevel(10)] + Skill_CombatPassive1 = 1300, + + [SkillMaxLevel(10)] + Skill_CombatPassive2 = 1301, + + [SkillMaxLevel(10)] + Skill_CombatPassive3 = 1302, + + + [SkillMaxLevel(3)] + Talent_QuickReflexes = 2000, + + [SkillMaxLevel(3)] + Talent_ShieldBearer = 2001, + + [SkillMaxLevel(5)] + Talent_Multitasking = 2002, + + [SkillMaxLevel(5)] + Talent_Adaptable = 2003, + + [SkillMaxLevel(5)] + Talent_Tenacious = 2004, + + [SkillMaxLevel(3)] + Talent_LastStand = 2005, + + [SkillMaxLevel(5)] + Talent_Surgeon = 2006, + + [SkillMaxLevel(3)] + Talent_Brutality = 2007, + + [SkillMaxLevel(5)] + Talent_Endurance = 2008, + + [SkillMaxLevel(3)] + Talent_FineTaste = 2009, + + [SkillMaxLevel(5)] + Talent_Strength = 2010, + + [SkillMaxLevel(5)] + Talent_Brawler = 2011, + + [SkillMaxLevel(5)] + Talent_SecondWind = 2012, + + [SkillMaxLevel(3)] + Talent_Wit = 2013, + + [SkillMaxLevel(3)] + Talent_BurningWeapon = 2014, + + [SkillMaxLevel(3)] + Talent_ChillyTouch = 2015, + + [SkillMaxLevel(5)] + Talent_StaticField = 2016, + + [SkillMaxLevel(5)] + Talent_Fencer = 2017, + + [SkillMaxLevel(3)] + Talent_LastBreath = 2018, + + [SkillMaxLevel(5)] + Talent_OBSOLETE1 = 2019, + + [SkillMaxLevel(5)] + Talent_Intelligence = 2020, + + [SkillMaxLevel(3)] + Talent_ArcaneCharge = 2021, + + [SkillMaxLevel(5)] + Talent_Prismatic = 2022, + + [SkillMaxLevel(5)] + Talent_Battlemage = 2023, + + [SkillMaxLevel(5)] + Talent_Turtle = 2024, + + [SkillMaxLevel(3)] + Talent_LastSpark = 2025, + + [SkillMaxLevel(5)] + Talent_ArcaneCollar = 2026, + + [SkillMaxLevel(3)] + Talent_Backhander = 2027, + + [SkillMaxLevel(3)] + Talent_InsultToInjury = 2028, + + [SkillMaxLevel(3)] + Talent_Manaburn = 2029, + + [SkillMaxLevel(3)] + Talent_SnapCast = 2030, + + [SkillMaxLevel(5)] + Talent_CripplingBlast = 2031, + + [SkillMaxLevel(5)] + Talent_Magic_FastTalker = 2032, + + [SkillMaxLevel(3)] + Talent_Magic_SoulEater = 2033, + + [SkillMaxLevel(3)] + Talent_Magic_Concentration = 2034, + + [SkillMaxLevel(5)] + Talent_Magic_Specialist = 2035, + + [SkillMaxLevel(3)] + Talent_Magic_WandMaster = 2036, + + [SkillMaxLevel(3)] + Talent_Melee_BloodThirst = 2037, + + [SkillMaxLevel(3)] + Talent_Melee_Riposte = 2038, + + [SkillMaxLevel(3)] + Talent_Melee_ComboStarter = 2039, + + [SkillMaxLevel(5)] + Talent_Melee_KnowledgeIsPower = 2040, + + [SkillMaxLevel(3)] + Talent_Melee_SuddenStrike = 2041, + + [SkillMaxLevel(5)] + Talent_General_GotYouCovered = 2042, + + [SkillMaxLevel(5)] + Talent_General_Metabolism = 2043, + + [SkillMaxLevel(3)] + Talent_General_HealthInsurance = 2044, + + [SkillMaxLevel(5)] + Talent_General_LadyLuck = 2045, + + [SkillMaxLevel(3)] + Talent_General_UtilityFlow = 2046, + + [SkillMaxLevel(3)] + Talent_General_KineticEnergy = 2047, + + [SkillMaxLevel(3)] + Talent_General_EfficientCounter = 2048, + + [SkillMaxLevel(3)] + Talent_General_AmmoScavenger = 2049, + + [SkillMaxLevel(3)] + Talent_General_QuickShot = 2050, + + [SkillMaxLevel(5)] + Talent_General_Alchemist = 2051, + + [SkillMaxLevel(5)] + Talent_General_SteadyDefense = 2052, + + [SkillMaxLevel(5)] + Talent_Last = 2999, + Misc_PotionBuffControl = 3000, Misc_SolemShieldBeam = 3001, Misc_PlayerCacuteProjectile = 3002, @@ -134,6 +369,7 @@ public enum SogSkill: ushort Misc_BadgeNova = 3012, Misc_SunShieldSun = 3013, Misc_PooHatFlies = 3014, + Hidden_MaxHPPenalty1 = 4000, Hidden_MaxHPPenalty10 = 4001, Hidden_MaxEPPenalty1 = 4002, @@ -157,6 +393,7 @@ public enum SogSkill: ushort Hidden_DEFBonus1 = 4020, Hidden_DEFBonus10 = 4021, Hidden_Last = 4999, + Ridiculon_ButterflySwarm = 30000, Ridiculon_SnowCharm = 30001, Ridiculon_SpringFlowerCharm = 30002, @@ -168,6 +405,7 @@ public enum SogSkill: ushort Ridiculon_LaserwingEvil = 30008, Ridiculon_CardTrinket = 30009, Ridiculon_GrindeaLights = 30010, + EnemySkill_JackLantern_Flame = 40000, EnemySkill_Halloweed_Root = 40001, EnemySkill_BallSpark_HomingSpark = 40002, @@ -277,4 +515,4 @@ public enum SogSkill: ushort EnemySkill_Zhamla_SideDashShadowClone = 40106, EnemySkill_Zhamla_BugSwarm = 40107, EnemySkill_Zhamla_ShadowHealthPotionBreak = 40108, -} +} \ No newline at end of file diff --git a/SoG_SGreader/Forms/FrmMain.cs b/SoG_SGreader/Forms/FrmMain.cs index 8ad1658..9a47efe 100644 --- a/SoG_SGreader/Forms/FrmMain.cs +++ b/SoG_SGreader/Forms/FrmMain.cs @@ -1,7 +1,6 @@ using SoG_SGreader.Wrapper; using System; using System.Drawing; -using System.Drawing.Drawing2D; using System.IO; using System.Linq; using System.Windows.Forms; diff --git a/SoG_SGreader/Objects/Skill.cs b/SoG_SGreader/Objects/Skill.cs index 3d92aed..8845a26 100644 --- a/SoG_SGreader/Objects/Skill.cs +++ b/SoG_SGreader/Objects/Skill.cs @@ -1,8 +1,18 @@ +using SoG_SGreader.Enum.Attribute; + namespace SoG_SGreader { public class Skill { public SogSkill SkillID { get; set; } public byte SkillLevel { get; set; } + + public static int GetMaxLevel(SogSkill skill) + { + var type = skill.GetType(); + var memInfo = type.GetMember(skill.ToString()); + var attributes = memInfo[0].GetCustomAttributes(typeof(SkillMaxLevelAttribute), false); + return (attributes.Length > 0) ? ((SkillMaxLevelAttribute)attributes[0]).MaxLevel : 255; + } } } \ No newline at end of file diff --git a/SoG_SGreader/SoG_SGreader.csproj b/SoG_SGreader/SoG_SGreader.csproj index 5486cfc..5364276 100644 --- a/SoG_SGreader/SoG_SGreader.csproj +++ b/SoG_SGreader/SoG_SGreader.csproj @@ -135,6 +135,7 @@ Component +