Fixed issues relating to gift codes with profile modifications

Updated enums to match client formatting and ids
Added `SkillClass` enum

#368
This commit is contained in:
Chomp
2025-06-07 23:08:21 +01:00
parent 2d67d8002b
commit 3a2f68a232
13 changed files with 131 additions and 121 deletions
@@ -470,7 +470,7 @@ public class ProfileHelper(
return false;
}
var profileSkill = profileSkills.FirstOrDefault(s => s.Id == skill.ToString());
var profileSkill = profileSkills.FirstOrDefault(s => s.Id == skill);
if (profileSkill == null)
{
_logger.Error(_localisationService.GetText("quest-no_skill_found", skill));
@@ -504,7 +504,7 @@ public class ProfileHelper(
return;
}
var profileSkill = profileSkills.FirstOrDefault(s => s.Id == skill.ToString());
var profileSkill = profileSkills.FirstOrDefault(s => s.Id == skill);
if (profileSkill == null)
{
_logger.Error(_localisationService.GetText("quest-no_skill_found", skill));
@@ -539,7 +539,7 @@ public class ProfileHelper(
/// <returns>Common skill object from desired profile</returns>
public BaseSkill? GetSkillFromProfile(PmcData pmcData, SkillTypes skill)
{
var skillToReturn = pmcData?.Skills?.Common.FirstOrDefault(s => s.Id == skill.ToString());
var skillToReturn = pmcData?.Skills?.Common.FirstOrDefault(s => s.Id == skill);
if (skillToReturn == null)
{
_logger.Warning($"Profile {pmcData.SessionId} does not have a skill named: {skill.ToString()}");